// Otherwise use default client factory. The default is set to
// a client factory that uses the S1AS 7 style JMS connection
// consumer contracts. This will be changed once the Connector 1.5
// implementation is ready.
String factoryClassName = System.getProperty(MESSAGE_BEAN_CLIENT_FACTORY_PROP);
MessageBeanClientFactory clientFactory = null;
if(factoryClassName != null){
Class clientFactoryClass = loader.loadClass(factoryClassName);
clientFactory = (MessageBeanClientFactory) clientFactoryClass
.newInstance();
} else {
clientFactory = ejbContainerUtilImpl.getServices().getService(
MessageBeanClientFactory.class, DEFAULT_MESSAGE_BEAN_CLIENT_FACTORY );
}
_logger.log(Level.FINE, "Using " + clientFactory.getClass().getName()
+ " for message bean client factory in " + appEJBName_);
// Create message bean pool before calling setup on
// Message-bean client, since pool properties can be retrieved
// through MessageBeanProtocolManager interface.
createMessageBeanPool(msgBeanDesc);
// Set resource limit for message bean listeners created through
// Protocol Manager. For now, just use max pool size. However,
// we might want to bump this up once the ejb timer service is
// integrated.
maxMessageBeanListeners_ = beanPoolDesc_.getMaxPoolSize();
numMessageBeanListeners_ = 0;
messageBeanClient_ = clientFactory
.createMessageBeanClient(msgBeanDesc);
componentInvocation = createComponentInvocation();
componentInvocation.container = this;
invocationManager.preInvoke(componentInvocation);