File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Transaction is alternating Timeouts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction is alternating Timeouts" Watch "Transaction is alternating Timeouts" New topic

Transaction is alternating Timeouts

ray frid
Ranch Hand

Joined: Dec 23, 2010
Posts: 79
Hi all,

I am using jboss 5.1.x, EJB3.0

I have MDB which listens to JMS queue. when the MDB taking a message, it dispatch a msg via TCP to some modem. sometimes that Modem doesnt response when the server is waiting for an answer:

byte[] byteData = receive(is);
coz I cant set timeout on InputStream.

so thanks to the EJB container the transaction timeout(which is there by default) rolling back the operation and then a retry executed again.

this mechanism by default works fine for me, the problem is:

Sometimes the transaction never timed out, and after long time I get the following msg in the console:

15:18:22,578 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX a6b2232:5f8:4d3591c6:76 in state RUN
15:18:22,578 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id a6b2232:5f8:4d3591c6:76 invoked while multiple threads active within it.
15:18:22,578 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action a6b2232:5f8:4d3591c6:76 aborting with 1 threads active!
15:18:22,578 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TransactionReaper_7] - TransactionReaper::doCancellations worker Thread[Thread-10,5,jboss] successfully canceled TX a6b2232:5f8:4d3591c6:76
Any idea what's wrong? and why sometimes it work and sometimes it doesnt?


Felipe Munoz

Joined: Dec 14, 2011
Posts: 1
Hy Ray, I'm getting the same error. Have you solved it?


ray frid
Ranch Hand

Joined: Dec 23, 2010
Posts: 79
Yes.. try this:

• For MDB's you can annote it with@ActivationConfigProperty(propertyName="transactionTimeout" value="1500")
• For other beans you can have @TransactionTimeout(1500) at class level or method level
I agree. Here's the link:
subject: Transaction is alternating Timeouts
jQuery in Action, 3rd edition