URI configurationId = (URI) configuration.getAttribute("id");
ObjectName configName = Configuration.getConfigurationObjectName(configurationId);
configuration.setName(configName);
// build a basic kernel without a configuration-store, our configuration store is
Kernel kernel = KernelFactory.newInstance().createKernel(getKernelName());
kernel.boot();
kernel.loadGBean(configuration, this.getClass().getClassLoader());
kernel.setAttribute(configName, "baseURL", systemURL);
kernel.startRecursiveGBean(configName);
// load the rest of the configuration listed on the command line
ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
try {
for (Iterator i = configList.iterator(); i.hasNext();) {
URI configID = (URI) i.next();
List list = configurationManager.loadRecursive(configID);
for (Iterator iterator = list.iterator(); iterator.hasNext();) {
ObjectName name = (ObjectName) iterator.next();
kernel.startRecursiveGBean(name);
System.out.println("started gbean: " + name);
}
}
} finally {
ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);