aspose file tools*
The moose likes JBoss/WildFly and the fly likes difference between userTransaction.rollback() & userTransaction timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "difference between userTransaction.rollback() & userTransaction timeout " Watch "difference between userTransaction.rollback() & userTransaction timeout " New topic
Author

difference between userTransaction.rollback() & userTransaction timeout

Sajid Moinuddin
Ranch Hand

Joined: Mar 19, 2005
Posts: 85
Hi all,
I am using stateful session bean and BMT to manage my transaction. I am keeping an open transaction in one of my method. I am expecting the user to call a second method to commit/rollback the transaction. Now, If the user doesn't call the second method, I am setting the transaction timeout. I want the transaction to be discarded if the user doesn't call the second method by 5 seconds. I am expecting the same behavior as the rollback(). Now, though my transaction times out, it doesn't release the locks on db / other resources like it does in case of roll back. Now, What is the difference between timeout and rollback? How can I discard my transaction if user doesn't call the second method??(should i use timer service!!)

regards,
Sajid
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Please don't post the same question in multiple forums. Since there is nothing JBoss specific in your question I'm closing this one.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference between userTransaction.rollback() & userTransaction timeout