}
}
DeploymentContext context = null;
try {
Descriptor descriptor = wrapper.getServicemixDescriptor();
Map name = new HashMap();
name.put("Config", configId.toString());
context = new DeploymentContext(configurationDir,
inPlaceDeployment ? DeploymentUtil.toFile(jarFile) : null, environment,
new AbstractName(configId, name),
ConfigurationModuleType.SERVICE, kernel.getNaming(), ConfigurationUtil
.getConfigurationManager(kernel), repositories);
if (descriptor.getComponent() != null) {
buildComponent(descriptor, context, jarFile);
} else if (descriptor.getServiceAssembly() != null) {
buildServiceAssembly(descriptor, context, jarFile);
} else if (descriptor.getSharedLibrary() != null) {
buildSharedLibrary(descriptor, context, jarFile);
} else {
throw new IllegalStateException("Invalid jbi descriptor");
}
} catch (Exception e) {