Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes EJB and other Java EE Technologies and the fly likes  Failed to deliver message in jms to MDB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark " Failed to deliver message in jms to MDB" Watch " Failed to deliver message in jms to MDB" New topic
Author

Failed to deliver message in jms to MDB

Deva Devan
Ranch Hand

Joined: Sep 22, 2010
Posts: 39
Hi

I am using jboss-6.1.0 with hornetq persistence.

Sometimes I am getting the following error when jms delever mesage to mdb.

2011-04-08 07:25:17,595 ERROR [org.hornetq.ra.inflow.HornetQMessageHandler] (Thread-3941 (group:HornetQ-client-global-threads-655728959)) Failed to deliver message: java.lang.IllegalStateException: This message endpoint + myMDB is already in use by another thread Thread[Thread-3880 (group:HornetQ-client-global-threads-655728959),5,]
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:118) [:1.7.20]
at $Proxy136.beforeDelivery(Unknown Source) at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:254) [:]
at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:829) [:]
at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:940) [:]
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [:]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]

Please let me know the how to solve this exception.

Thanks in Advance


Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Your scenario indicates that, a previous instance of MDB is still working on the last message that triggered it. This is preventing the new message from being processed by your MDB. I believe, increasing the size of the MDB pool in your application server, should resolve this issue.


S.D. MADHAN
Not many get the right opportunity !
Deva Devan
Ranch Hand

Joined: Sep 22, 2010
Posts: 39
Hi Madhan,


Thanks for your suggestion.

Already I was increased the consumer count from 15(default) to 50. but the same issue replicated.

any other way to solve this problem ?

Thanks..
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Please configure the concurrent connection settings of your JMS provider to accommodate more concurrent connections.
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Failed to deliver message in jms to MDB