}
}
if (!started_) {
logger.log(Level.WARNING, "endpointfactory.unavailable");
throw new UnavailableException(
"EndpointFactory is currently not available");
}
MessageEndpoint endpoint = null;
try {
ResourceHandle resourceHandle = allocator_.createResource(xaResource);
MessageBeanListener listener =
messageBeanPM_.createMessageBeanListener(resourceHandle);
MessageEndpointInvocationHandler handler =
new MessageEndpointInvocationHandler(listener, messageBeanPM_);
endpoint = (MessageEndpoint) messageBeanPM_.createMessageBeanProxy(handler);
} catch (Exception ex) {
throw (UnavailableException)
(new UnavailableException()).initCause(ex);
}
return endpoint;
}