Hi,
(WSAD/J2EE/local MQ)
I'm trying to replace our old EJB receive handlers that polled queues
every 10 seconds or so for messages and sent replies to the
DEFAULT_REPLY_QUEUE with a Message Driven Bean version (now Websphere
supports it). My message driven beans that monitor the queues in our
application are based on a superclass and use it's ejbCreate/ejbRemove
methods to set up and remove connections/sessions. Currently they use
transaction type Container. They use the same connection factory and
send responses to the same DEFAULT_REPLY_QUEUE. When using MQ
Explorer to manually put messages, it all works fine for 2 different
queues, but on the third queue the MDB fails to connection. I get:
_____________________________________________________________________________
[25/04/03 09:42:10:193 BST] 2a12617b SystemOut O About to create
queue connection
[25/04/03 09:42:10:193 BST] 2a12617b PrivExAction W J2CA0114W: No
container-managed authentication alias found.
[25/04/03 09:44:10:182 BST] 6d81617c CoordinatorIm I WTRN0066W:
Transaction 0001bba9:000000040d143cf743de6e670dd75ac857e5d7bd2e7ff0610be5[]
has timed out after 120 seconds.
[25/04/03 09:45:10:231 BST] 2a12617b FreePool E J2CA0045E:
Connection not available while invoking method queueRequest for
resource JMS$CX Queue Manager Connection.
[25/04/03 09:45:10:559 BST] 2a12617b ConnectionMan E J2CA0020E: The
Connection Pool Manager could not allocate a Managed Connection:
com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection
not available, Timed out waiting.
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:865)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1065)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:560)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:374)
at com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle.createQueueConnection(JMSQueueConnectionFactoryHandle.java:80)
at test.TestMDBBean.ejbCreate(TestMDBBean.java:47)
at test.OrderDetailsTestHarnessBean.ejbCreate(OrderDetailsTestHarnessBean.java:60)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.container.MessageDrivenBeanO.<init>(MessageDrivenBeanO.java:120)
at com.ibm.ejs.container.CMMessageDrivenBeanO.<init>(CMMessageDrivenBeanO.java:66)
at com.ibm.ejs.container.CMMessageDrivenBeanOFactory.create(CMMessageDrivenBeanOFactory.java:39)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:566)
at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:653)
at com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:78)
at com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:518)
at com.ibm.ejs.container.EJSContainer.preInvoke_internal(EJSContainer.java:2522)
at com.ibm.ejs.container.EJSContainer.preInvoke(EJSContainer.java:2259)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:86)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:120)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
.
[25/04/03 09:45:10:794 BST] 2a12617b SystemOut O JMS Exception
creating mdb queue connection
[25/04/03 09:45:10:966 BST] 2a12617b XATransaction E J2CA0026E: Method
addSync caught javax.transaction.RollbackException
at com.ibm.ejs.jts.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:955)
at com.ibm.ejs.jts.jta.JTSXA.registerSynchronization(JTSXA.java:1096)
at com.ibm.ejs.j2c.XATransactionWrapper.addSync(XATransactionWrapper.java:254)
at com.ibm.ejs.j2c.ConnectionManager.initializeForUOW(ConnectionManager.java:776)
at com.ibm.ejs.j2c.MCWrapper.getCurrentTranWrapper(MCWrapper.java:790)
at com.ibm.ejs.j2c.ConnectionEventListener.interactionPending(ConnectionEventListener.java:665)
at com.ibm.ejs.jms.JMSManagedSession.interactionPending(JMSManagedSession.java:962)
at com.ibm.ejs.jms.JMSManagedSession.enlist(JMSManagedSession.java:805)
at com.ibm.ejs.jms.JMSSessionHandle.enlist(JMSSessionHandle.java:933)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:465)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:448)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:90)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:120)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
while trying to register the Resource Adapter with the
Synchronization Manager for the current transaction, and threw a
ResourceException.
--------------------------------------------------------------------------
When I use my stateful session bean (bean transactions) to put
messages on to the queues however, I can only do so to one queue (any
one). There after, trying to put a message on another queue causes
the bean to fail to connect with the same exception as above. This
bean opens its connections/sessions in ejbcreate/remove as well but
there shouldn't be any problem here because I can see that it runs
both methods and closes everything after sending it's message.
What is it that is limiting the number of connections that I can
make??!
Any help would be greatly appreciated!
Mark
ps. The resource references I've specified that define queues and
connections factory are all sharable.