[jboss-user] [EJB 3.0] - My MdB receives the same message again and again
schausson
do-not-reply at jboss.com
Mon Feb 9 05:11:44 EST 2009
I'm currently setting up a MdB that is in charge of long-running processes :
basically, when it receives a message, it might cause many objects (up to thousands) to be persisted in the database, which can last dozens of minutes in some cases.
When this process lasts less than 5 minutes (approximately), everything works fine.
When this process lasts more than 5 minutes, onMessage() is invoked again (with redelivery_count increase) and the previous processing stops without any warning/logs !
I first suspected that it was a transaction timeout issue, and added following annotations on the onMessage() method of the MdB :
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
@TransactionTimeout(value=100000)
(I also tried to set a NOT_SUPPORTED transaction mode, but the entityManager (container injected one) just failed to persist my object outside of any transactional context)
I also tried to remove the code that invoke the entityManager to isolate from DB issues.
Finally, it always behaves in the same manner and I couldn't figure out what I can change to make it work...
Any idea ?
Many thanks,
Sebastien
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4208112#4208112
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4208112
More information about the jboss-user
mailing list