Index: core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java
===================================================================
--- core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java (revision 44807)
+++ core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java (working copy)
@@ -209,12 +209,21 @@
final String gosh_args_value = "--nointeractive";
System.setProperty(gosh_args, gosh_args_value);
}
- startBundle("org.apache.felix.shell");
- startBundle("org.apache.felix.gogo.runtime");
- startBundle("org.apache.felix.gogo.shell");
- startBundle("org.apache.felix.gogo.command");
- startBundle("org.apache.felix.shell.remote");
- startBundle("org.apache.felix.fileinstall");
+ String additionalOSGiBundlesToStart = bundleContext.getProperty("org.glassfish.additionalOSGiBundlesToStart");
+ if (additionalOSGiBundlesToStart == null) {
+ // a 3.0.x domain won't have the necessary property set, so for seamless upgrade,
+ // we need to set this property. It is just simpler to do than registering a UpgradeService to do the needful.
+ additionalOSGiBundlesToStart =
+ "org.apache.felix.shell, " +
+ "org.apache.felix.gogo.runtime, " +
+ "org.apache.felix.gogo.shell, " +
+ "org.apache.felix.gogo.command, " +
+ "org.apache.felix.shell.remote, " +
+ "org.apache.felix.fileinstall";
+ }
+ for (String bsn : additionalOSGiBundlesToStart.split(",")) {
+ startBundle(bsn.trim());
+ }
}
/**
Index: packager/nucleus-base/lib/templates/domain.xml
===================================================================
--- packager/nucleus-base/lib/templates/domain.xml (revision 44807)
+++ packager/nucleus-base/lib/templates/domain.xml (working copy)
@@ -190,6 +190,8 @@
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
+
+ -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
@@ -366,6 +368,8 @@
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-XX:NewRatio=2
-Xmx512m
+
+ -Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}