}
@Override
public synchronized void start(StartContext startContext) throws StartException {
// setup the context with the receivers
final EJBClientContext context;
if (this.clientContextClassloader != null) {
context = EJBClientContext.create(this.ejbClientConfiguration, this.clientContextClassloader);
} else {
context = EJBClientContext.create(this.ejbClientConfiguration);
}
// add the (optional) local EJB receiver
final LocalEjbReceiver localEjbReceiver = this.localEjbReceiverInjectedValue.getOptionalValue();
if (localEjbReceiver != null) {
context.registerEJBReceiver(localEjbReceiver);
logger.debug("Added a local EJB receiver to descriptor based EJB client context named " + startContext.getController().getName());
}
// now process the remoting receivers
this.registerRemotingEJBReceivers(startContext, context);
// we now have a fully configured EJB client context for use