if (LOG.isDebugEnabled()) {
LOG.debug("Activate service: "+serviceName+" config="+config);
}
BPELExchangeHandler handler = BPELExchangeHandlerFactory.instance().newBPELExchangeHandler(getServiceDomain());
BPELComponentImplementationModel bciModel = (BPELComponentImplementationModel)config.getImplementation();
ComponentServiceModel service = null;
for (ComponentServiceModel csm : config.getServices()) {
if (csm.getQName().equals(serviceName)) {
service = csm;
break;
}
}
if ((service == null) || (service.getInterface() == null)) {
throw BPELMessages.MESSAGES.interfaceNotDefinedForComponentWithBPELImplementation();
}
// take care of references
for (ComponentReferenceModel crm : config.getReferences()) {
_locator.addServiceDomain(crm.getQName(), getServiceDomain());
_locator.initialiseReference(crm);
}
handler.init(serviceName, bciModel,
service.getInterface().getInterface(), _engine, _config);
_handlers.put(serviceName, handler);
return handler;