-
1. Re: Bug? Transaction timeout....
modjoe23 Jun 22, 2006 4:46 PM (in response to modjoe23)I know that I can change the default timeout value from the default 300 seconds in jta-service.xml but I am looking to change the transaction timeout for this transaction only. I've also read the spec but with no luck.
Anybody out there?? Please help! -
2. Re: Bug? Transaction timeout....
peter_kaas Jul 6, 2006 1:06 PM (in response to modjoe23)Any change if you add the @TransactionTimeout to the method instead of the class? I have experienced the same problems you describe but ended up changing the default timeout...
-
3. Re: Bug? Transaction timeout....
modjoe23 Jul 10, 2006 8:48 AM (in response to modjoe23)Hi Peter,
No that hasn't solved it for me. Please let me know if you find a solution to this problem. Thanks. -
4. Re: Bug? Transaction timeout....
joed Jul 19, 2006 12:09 PM (in response to modjoe23)I found this in the XDoclet reference:
http://xdoclet.sourceforge.net/xdoclet/tags/jboss-tags.html
If you look for transaction-timeout, it seems to indicate that the change only applies if the method starts the transaction. Since that's never the case with MDB using REQUIRED, perhaps if you change it to REQUIRES_NEW you might get what you want.
I've got the same issue, and I'm going to try this change soon. I'll post my results once I get a chance to try it out, but I thought I'd pass this guess along first, since you seemed desperate :-) -
5. Re: Bug? Transaction timeout....
modjoe23 Jul 19, 2006 12:15 PM (in response to modjoe23)Joed,
Thank you for that. I must have missed it. I will try that as soon as I can and post my results as well. -
6. Re: Bug? Transaction timeout....
joed Jul 19, 2006 2:45 PM (in response to modjoe23)Sigh. It didn't work. If I had thought before trying I would have realized it couldn't. I imagine that the container has its own transaction for the queue, which is timing out because the onMessage() method is taking a long time, even though *my* transaction has a longer time out.
I think I'm going to just spawn a thread in the onMessage() to handle the work, and return immediately. I lose all opportunity for resends, but c'est la vie. -
7. Re: Bug? Transaction timeout....
modjoe23 Jul 19, 2006 2:55 PM (in response to modjoe23)That's exactly why I tried to a handle to that transaction and increase it's timeout myself, but that didn't work. There has to be a way to do it!
-
8. Re: Bug? Transaction timeout....
thhal Jul 25, 2006 3:09 AM (in response to modjoe23)So, in essence there is no way to control the transaction timeout for an MDB unless you change the global transaction timeout? If that's true, I would consider it a fairly serious flaw in JBoss.
A work around involving new threads won't help me much since it's essential that the popping of the queue must is synchronized with the many inserts that causes the timeout. -
9. Re: Bug? Transaction timeout....
epbernard Jul 25, 2006 5:32 PM (in response to modjoe23)One a JIRA feature request please.
-
10. Re: Bug? Transaction timeout....
peter_kaas Jul 27, 2006 3:55 AM (in response to modjoe23)What if you mark your MDB with:
@TransactionManagement(TransactionManagementType.BEAN)
and then roll your own transaction like:@Resource private transient MessageDrivenContext context; ... UserTransaction ut = null; try { ut = context.getUserTransaction(); ut.setTransactionTimeout(TIMEOUT); ut.begin(); // Do your stuff ut.commit(); } catch (Throwable ex) { try { if (ut != null) ut.rollback(); } catch (Throwable ex2) { } ... }