String assemblyName = files[i].getName();
try {
ServiceAssemblyEnvironment env = environmentContext.getServiceAssemblyEnvironment(assemblyName);
Descriptor root = DescriptorFactory.buildDescriptor(env.getInstallDir());
if (root != null) {
ServiceAssembly sa = root.getServiceAssembly();
if (sa != null && sa.getIdentification() != null) {
registry.registerServiceAssembly(sa, env);
}
}
} catch (Exception e) {
LOG.error("Failed to initialized service assembly: " + assemblyName, e);