final ConnectorClassFinder ccf = new ConnectorClassFinder(parent, moduleName, librariesCL);
if (processEnv.getProcessType().isEmbedded()) {
events.register(new EventListener() {
public void event(Event event) {
if (event.is(EventTypes.PREPARE_SHUTDOWN)) {
ccf.done();
}
}
});
}
return ccf;