Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVEM-502 Make it possible to configure boot delegation in OSGI frame… #344

Merged
merged 1 commit into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ public File getSystemPackageCache() {
return this.systemPackageCache;
}

public String getBootdelegation() {
return bootdelegation;
}

public void setBootdelegation(String bootdelegation) {
this.bootdelegation = bootdelegation;
}

private String bootdelegation = null;


private static File createTempFile(String child) {
return new File(System.getProperty(TMP_DIR), child);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public Map<String, String> toMap() {
configuration.put(FRAMEWORK_SYSTEMPACKAGES_EXTRA,
createSystemPackagesConfiguration(getAdditionalSystemPackages()));
}
if (getBootdelegation() != null) {
configuration.put(FRAMEWORK_BOOTDELEGATION, getBootdelegation());
}
return configuration;
}

Expand Down Expand Up @@ -87,6 +90,10 @@ public File getStorageDirectory() {
return getConfiguration().getStorageDirectory();
}

public String getBootdelegation() {
return getConfiguration().getBootdelegation();
}

public boolean isFlushBundleCacheOnFirstInit() {
return flushBundleCacheOnFirstInit;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ http://www.springframework.org/schema/beans/spring-beans.xsd">
<property name="hotDeployEnabled" value="${osgi.container.hot-deploy:true}" />
<property name="repositoryBundlesEnabled" value="${osgi.container.repository-bundles:true}" />
<property name="storageDirectory" value="${osgi.container.storage-directory:#{null}}" />
<property name="bootdelegation" value="${osgi.container.bootdelegation:#{null}" />

<!-- DISABLE by default, see: https://github.com/xenit-eu/dynamic-extensions-for-alfresco/issues/281 -->
<property name="systemPackageCacheMode" value="${osgi.container.system-package-cache.mode:DISABLE}" />
Expand Down
17 changes: 9 additions & 8 deletions documentation/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ determine the root of the classpath from the location of 'alfresco-global.proper

## Configuration settings

| Description | Default | Example |
------------------------------------------------------------------------------- | :------------------------ | -------------------
| Allow restart of the container: useful for development | true | osgi.container.restartable=true/false |
| Enable starting bundles stored in the repository. | true | osgi.container.repository-bundles=true/false |
| Hot-deploy bundles on a running Alfresco If disabled, only classpath bundles and/or optionally repository bundles will be loaded. | true | osgi.container.hot-deploy=true/false |
| Configures the OSGI framework's storage directory. This can be either a relative or absolute path. Specifying an absolute path is recommended. (absolute or relative path) | tmp (relative to the current working directory) | osgi.container.storage-directory=tmp |
| Configures the OSGI framework's directory from which to automatically install or uninstall bundles. (absolute or relative path) | dynamic-extensions (relative to the current working directory) | osgi.container.bundle-directory=dynamic-extensions |
| Web application classpath scanning behaviour <br><br> ENABLE: Use existing cache or create a new cache if a: none exists or b: cache ts < WEB-INF/lib ts. Default setting. <br><br> DISABLE: Disable the cache. Rescans the WEB-INF/lib directory at every startup boot, but does not persist it. <br><br> UPDATE: Force update of the existing cache. | DISABLE | osgi.container.system-package-cache.mode = ENABLE/DISABLE/UPDATE |
| Description | Default | Example |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------| -------------------
| Allow restart of the container: useful for development | true | osgi.container.restartable=true/false |
| Enable starting bundles stored in the repository. | true | osgi.container.repository-bundles=true/false |
| Hot-deploy bundles on a running Alfresco If disabled, only classpath bundles and/or optionally repository bundles will be loaded. | true | osgi.container.hot-deploy=true/false |
| Configures the OSGI framework's storage directory. This can be either a relative or absolute path. Specifying an absolute path is recommended. (absolute or relative path) | tmp (relative to the current working directory) | osgi.container.storage-directory=tmp |
| Configures the OSGI framework's directory from which to automatically install or uninstall bundles. (absolute or relative path) | dynamic-extensions (relative to the current working directory) | osgi.container.bundle-directory=dynamic-extensions |
| Web application classpath scanning behaviour <br><br> ENABLE: Use existing cache or create a new cache if a: none exists or b: cache ts < WEB-INF/lib ts. Default setting. <br><br> DISABLE: Disable the cache. Rescans the WEB-INF/lib directory at every startup boot, but does not persist it. <br><br> UPDATE: Force update of the existing cache. | DISABLE | osgi.container.system-package-cache.mode = ENABLE/DISABLE/UPDATE |
| Configure the OSGI framework's bootdelegation. This property is added for supporting [AppDynamics](https://docs.appdynamics.com/21.3/en/application-monitoring/install-app-server-agents/java-agent/install-the-java-agent/agent-installation-by-java-framework/osgi-infrastructure-configuration). | | osgi.container.bootdelegation=com.singularity.*|