aspose file tools*
The moose likes JBoss/WildFly and the fly likes Transaction Rolledback exception is not throwing correctly in JBOSS EAP 5.1.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Transaction Rolledback exception is not throwing correctly in JBOSS EAP 5.1.2" Watch "Transaction Rolledback exception is not throwing correctly in JBOSS EAP 5.1.2" New topic
Author

Transaction Rolledback exception is not throwing correctly in JBOSS EAP 5.1.2

sathyesh selvarajah
Greenhorn

Joined: Jul 24, 2012
Posts: 5

I have configured ejb 2 stateless bean transaction time out for 300 seconds in jboss.xml .

<session>
<ejb-name>
com.common.ejb.SOME_EJB
</ejb-name>

<jndi-name>
com.common.ejb.SOME_EJB
</jndi-name>
<call-by-value>false</call-by-value>
<exception-on-rollback>true</exception-on-rollback>
<method-attributes>
<method><method-name>getOrderOverviewInfo</method-name>
<transaction-timeout>300</transaction-timeout>
</method>
</method-attributes>
</session>

After 300 seconds it is showing some warning
[Jul 24 15:28:58] WARN - [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX -53ef92e9:d0eb:500e6f36:89 in state RUN
[Jul 24 15:28:58] WARN - [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -53ef92e9:d0eb:500e6f36:89 invoked while multiple threads active within it.
[Jul 24 15:28:58] WARN - [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -53ef92e9:d0eb:500e6f36:89 aborting with 1 threads active!
[Jul 24 15:28:58] WARN - [com.arjuna.ats.arjuna.coordinator.TransactionReaper_7] - TransactionReaper::doCancellations worker Thread[Thread-9,5,jboss] successfully canceled TX -53ef92e9:d0eb:500e6f36:89


But it is throwing exception after one hour. It must throw after 300 seconds

can anyone guide me where to configure transaction time out properly?

Thanks in Advance
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Read this http://management-platform.blogspot.in/2008/11/transaction-timeouts-and-ejb3jpa.html.

By the way, please do not post in bold or colourful fonts. It's just distracting.

[My Blog] [JavaRanch Journal]
sathyesh selvarajah
Greenhorn

Joined: Jul 24, 2012
Posts: 5

Thanks for the reply and Sorry for the Font.I will try the solution provided in the link and let you know the result.
sathyesh selvarajah
Greenhorn

Joined: Jul 24, 2012
Posts: 5

Hi Jaikiran,

I have tried increasing the global transaction timeout (in transaction-jboss-beans.xml) than ejb transaction time out (in jboss.xml).

But still rolled back exception throwing after one hour.

And Interceptor concept i can use in ejb 3 only but in my application i am using ejb 2 container managed stateless session bean.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

The gist of the article I pointed you to was that there won't be a exception thrown when the transaction timeout occurs. The exception will only be thrown if there's a transaction activity after that timeout.
sathyesh selvarajah
Greenhorn

Joined: Jul 24, 2012
Posts: 5

Is there any way to throw exception when ejb transaction is timed out in jboss ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transaction Rolledback exception is not throwing correctly in JBOSS EAP 5.1.2