activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vineetc <vinicha...@gmail.com>
Subject Problems with RA under Geronimo MDB container
Date Tue, 19 Jun 2007 19:59:25 GMT

Hello All,

I am trying to build a MDB based recv. application that will process
messages delivered by AMQ RA.

ENVIRONMENT
Windows XP
JDK 1.6.0_01
ActiveMQ 4.1.1 and the the RA provided by the dist.
Geronimo1.1.1
MySQL 5x

I have set the "maxSessions" to 29 and "maxMessagesPerSession" to 900 on the
ActivationSpec. for the MDB

Scenario:
I send a bunch of messages while the EAR with the MDB is not running.
After the messages have been sent (say 1000 messages) I start the EAR
application.
The EAR application deadlocks after processing 29 messages.
The connector Thread Pool is configured with a size of 30 threads and the
property "waitWhenBlocked" is set to "true".
Ofcourse this WorkManager thread pool is provided by Geronimo.
After looking at the threads from JConsole i saw following stack trace(s)
for Connector Threads which are stuck.

The first connector thread pool thread has following stack trace.

Name: ConnectorThreadPool 0
Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar.await(CondVar.java:75)
edu.emory.mathcs.backport.java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:318)
org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:42)
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:75)
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1175)
org.apache.activemq.ActiveMQConnectionConsumer.<init>(ActiveMQConnectionConsumer.java:86)
org.apache.activemq.ActiveMQConnection.createConnectionConsumer(ActiveMQConnection.java:1085)
org.apache.activemq.ra.ActiveMQEndpointWorker$1.run(ActiveMQEndpointWorker.java:164)
   - locked org.apache.activemq.ra.ActiveMQEndpointWorker$1@4b755
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172)
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:289)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Thread.java:619)


All the rest of 29 threads from the pool have the same stack trace as below.

Name: ConnectorThreadPool 29
State: WAITING on
edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar@4dd658
Total blocked: 156  Total waited: 1

Stack trace: 
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar.await(CondVar.java:75)
edu.emory.mathcs.backport.java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:318)
org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:42)
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:75)
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1175)
org.apache.activemq.TransactionContext.setXid(TransactionContext.java:578)
org.apache.activemq.TransactionContext.end(TransactionContext.java:329)
org.apache.activemq.ra.LocalAndXATransaction.end(LocalAndXATransaction.java:90)
org.apache.geronimo.transaction.manager.WrapperNamedXAResource.end(WrapperNamedXAResource.java:51)
org.apache.geronimo.transaction.manager.TransactionImpl.delistResource(TransactionImpl.java:209)
   - locked org.apache.geronimo.transaction.manager.TransactionImpl@1221045
org.apache.geronimo.transaction.context.InheritableTransactionContext.delistResource(InheritableTransactionContext.java:99)
org.openejb.mdb.EndpointHandler.teardownDelivery(EndpointHandler.java:360)
org.openejb.mdb.EndpointHandler.afterDelivery(EndpointHandler.java:256)
org.openejb.mdb.EndpointProxy.afterDelivery(EndpointProxy.java:72)
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.afterDelivery(MessageEndpointProxy.java:126)
org.apache.activemq.ra.MessageEndpointProxy.afterDelivery(MessageEndpointProxy.java:65)
org.apache.activemq.ra.ServerSessionImpl.afterDelivery(ServerSessionImpl.java:216)
org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:751)
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:165)
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172)
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:289)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Thread.java:619)


After looking at the stack trace it looks like all threads are blocked on an
ArrayBlockingQueue that has a size of 1. It looks like somehow the
"Response" is not getting set in the Queue.
Also i shld mention that the "ResponseCallback" object is null.

Any idea whats causing the problem.
Any help is appreciated.

Thanks,
Vineet
-- 
View this message in context: http://www.nabble.com/Problems-with-RA-under-Geronimo-MDB-container-tf3948560s2354.html#a11201768
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message