{
return;
}
// Setup OSGi configuration propery map
StringMap configMap = new StringMap(false);
// Add the bundle provided service interface package and the core OSGi
// packages to be exported from the class path via the system bundle.
configMap.put(FRAMEWORK_SYSTEMPACKAGES,
"org.osgi.framework; version=1.3.0," +
"org.osgi.service.packageadmin; version=1.2.0," +
"org.osgi.service.startlevel; version=1.0.0," +
"org.osgi.service.url; version=1.0.0," +
"org.osgi.util.tracker; version=1.0.0," +
"org.apache.qpid.junit.extensions.util; " + QPID_VER_SUFFIX +
"org.apache.qpid; " + QPID_VER_SUFFIX +
"org.apache.qpid.common; " + QPID_VER_SUFFIX +
"org.apache.qpid.exchange; " + QPID_VER_SUFFIX +
"org.apache.qpid.framing; " + QPID_VER_SUFFIX +
"org.apache.qpid.management.common.mbeans.annotations; " + QPID_VER_SUFFIX +
"org.apache.qpid.protocol; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.binding; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.configuration; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.configuration.plugins; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.configuration.management; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.exchange; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.logging; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.logging.actors; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.logging.subjects; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.management; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.persistent; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.plugins; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.protocol; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.queue; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.registry; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.security; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.security.access; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.security.access.plugins; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.virtualhost; " + QPID_VER_SUFFIX +
"org.apache.qpid.server.virtualhost.plugins; " + QPID_VER_SUFFIX +
"org.apache.qpid.util; " + QPID_VER_SUFFIX +
"org.apache.commons.configuration; version=1.0.0," +
"org.apache.commons.lang; version=1.0.0," +
"org.apache.commons.lang.builder; version=1.0.0," +
"org.apache.commons.logging; version=1.0.0," +
"org.apache.log4j; version=1.2.12," +
"javax.management.openmbean; version=1.0.0," +
"javax.management; version=1.0.0"
);
// No automatic shutdown hook
configMap.put("felix.shutdown.hook", "false");
// Add system activator
List<BundleActivator> activators = new ArrayList<BundleActivator>();
_activator = new Activator();
activators.add(_activator);
configMap.put(SYSTEMBUNDLE_ACTIVATORS_PROP, activators);
if (cachePath != null)
{
File cacheDir = new File(cachePath);
if (!cacheDir.exists() && cacheDir.canWrite())
{
_logger.info("Creating plugin cache directory: " + cachePath);
cacheDir.mkdir();
}
// Set plugin cache directory and empty it
_logger.info("Cache bundles in directory " + cachePath);
configMap.put(FRAMEWORK_STORAGE, cachePath);
}
configMap.put(FRAMEWORK_STORAGE_CLEAN, FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT);
// Set directory with plugins to auto-deploy
_logger.info("Auto deploying bundles from directory " + pluginPath);
configMap.put(AUTO_DEPLOY_DIR_PROPERY, pluginPath);
configMap.put(AUTO_DEPLOY_ACTION_PROPERY, AUTO_DEPLOY_INSTALL_VALUE + "," + AUTO_DEPLOY_START_VALUE);
// Start plugin manager and trackers
_felix = new Felix(configMap);
try
{