projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve subframework launch
[lgpl/argeo-commons.git]
/
org.argeo.cms
/
src
/
org
/
argeo
/
cms
/
internal
/
osgi
/
CmsActivator.java
diff --git
a/org.argeo.cms/src/org/argeo/cms/internal/osgi/CmsActivator.java
b/org.argeo.cms/src/org/argeo/cms/internal/osgi/CmsActivator.java
index fe7c80d3b0b5c0a91fc2686cf48eebe4a52707d5..94b08da4d316a37d7d614c74904c91c09a72ced3 100644
(file)
--- a/
org.argeo.cms/src/org/argeo/cms/internal/osgi/CmsActivator.java
+++ b/
org.argeo.cms/src/org/argeo/cms/internal/osgi/CmsActivator.java
@@
-21,19
+21,13
@@
import org.osgi.service.permissionadmin.PermissionInfo;
*/
public class CmsActivator implements BundleActivator {
// private final static CmsLog log = CmsLog.getLog(CmsActivator.class);
*/
public class CmsActivator implements BundleActivator {
// private final static CmsLog log = CmsLog.getLog(CmsActivator.class);
+ private final static String PROP_ARGEO_OSGI_PARENT_UUID = "argeo.osgi.parent.uuid";
// TODO make it configurable
private boolean hardened = false;
private static BundleContext bundleContext;
// TODO make it configurable
private boolean hardened = false;
private static BundleContext bundleContext;
- void init() {
- }
-
- void destroy() {
- new GogoShellKiller().start();
- }
-
protected void initSecurity() {
// code-level permissions
String osgiSecurity = bundleContext.getProperty(Constants.FRAMEWORK_SECURITY);
protected void initSecurity() {
// code-level permissions
String osgiSecurity = bundleContext.getProperty(Constants.FRAMEWORK_SECURITY);
@@
-96,15
+90,15
@@
public class CmsActivator implements BundleActivator {
cmsState.start();
bundleContext.registerService(new String[] { CmsState.class.getName(), NodeIdSupplier.class.getName() },
cmsState, null);
cmsState.start();
bundleContext.registerService(new String[] { CmsState.class.getName(), NodeIdSupplier.class.getName() },
cmsState, null);
- init();
-
}
@Override
public void stop(BundleContext bc) throws Exception {
try {
}
@Override
public void stop(BundleContext bc) throws Exception {
try {
- destroy();
CmsStateImpl cmsState = (CmsStateImpl) getService(CmsState.class);
CmsStateImpl cmsState = (CmsStateImpl) getService(CmsState.class);
+ String parentFrameworkuuid = bc.getProperty(PROP_ARGEO_OSGI_PARENT_UUID);
+ if (parentFrameworkuuid == null)
+ new GogoShellKiller().start();
cmsState.stop();
} finally {
bundleContext = null;
cmsState.stop();
} finally {
bundleContext = null;