in core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java [219:261]
public void updateArchive(String location, ArchiveEntry entry, boolean autoStart) throws DeploymentException {
// Call listeners
try {
DeploymentListener[] listeners = (DeploymentListener[]) container.getListeners(DeploymentListener.class);
DeploymentEvent event = new DeploymentEvent(new File(location), DeploymentEvent.FILE_CHANGED);
for (int i = 0; i < listeners.length; i++) {
if (listeners[i].fileChanged(event)) {
return;
}
}
} catch (IOException e) {
throw failure("deploy", "Error when deploying: " + location, e);
}
// Standard processing
File tmpDir = null;
try {
tmpDir = AutoDeploymentService.unpackLocation(environmentContext.getTmpDir(), location);
} catch (Exception e) {
throw failure("deploy", "Unable to unpack archive: " + location, e);
}
// unpackLocation returns null if no jbi descriptor is found
if (tmpDir == null) {
throw failure("deploy", "Unable to find jbi descriptor: " + location);
}
Descriptor root = null;
try {
root = DescriptorFactory.buildDescriptor(tmpDir);
} catch (Exception e) {
throw failure("deploy", "Unable to build jbi descriptor: " + location, e);
}
if (root == null) {
throw failure("deploy", "Unable to find jbi descriptor: " + location);
}
if (root != null) {
if (root.getComponent() != null) {
updateComponent(entry, autoStart, tmpDir, root);
} else if (root.getSharedLibrary() != null) {
updateSharedLibrary(entry, tmpDir, root);
} else if (root.getServiceAssembly() != null) {
updateServiceAssembly(entry, autoStart, tmpDir, root);
}
}
}