-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate I/Os continue upon flush if CMT timeout
PostPosted: Fri Jan 25, 2013 1:44 pm 
Newbie

Joined: Fri May 21, 2010 10:48 am
Posts: 1
What is the purpose of continuing Hibernate I/Os when EJB CMT has already timed out? checkTransactionSyncStatus() only terminates with a SessionException if the session is closed. If the enclosing transaction has timed out, that fact is ignored until hibernate I/Os are completed. Is there any reason it should not detect that the transaction is marked fro rollback and throw an exception at that point?(JTAHelper.isMarkedForRollback()).
I would really appreciate a reply so I can understand or supply more information or make adjustments if we are doing something incorrectly..

Environment Information:
WebSphere Server 8.0, using EJB 2, Container Managed Transactions and configured with:
- a 3-minute HTTP session timeout value
- hibernate.transaction.factory_class=org.hibernate.transaction.CMTTransactionFactory
- hibernate.transaction.manager_lookup_class=org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
Hibernate 3.2

Scenario:
While persisting a large number of rows, Hibernate did not seem to realize that a WebSphere (WAS) transaction was going to roll back so Hibernate kept working for a long time (persisting many hundreds of rows) until it was complete.
Upon Hibernate’s completion, the status of the transaction was checked and all updates were rolled back properly. Intermediate flush() statements were in place.

Issue:

Since the 3-minute timeout was not honored, the actual request now spanned over 7 minutes, causing timeout issues in other applications interested in accessing the data, due to application-specific “locking” mechanisms in place.

Questions:

Should Hibernate react to checking the status of the transaction upon a flush() action for a transaction timeout?
If not, what can be done to communicate the timeout to Hibernate?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.