File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes pattern to deal with exception in the commit or rollback phase Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "pattern to deal with exception in the commit or rollback phase" Watch "pattern to deal with exception in the commit or rollback phase" New topic
Author

pattern to deal with exception in the commit or rollback phase

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Hi,

Just wondering if there is a best practice, or pattern for dealing with fairly low-level exceptions, that happen during commit or rollback.

For example, all my code is 100% successful, and the container (Jboss 3.2.6) is now committing all the DB stuff. Then an exception happens.

The reason that I need to 'deal' with it, is that in a separate "requires new" transaction, I insert a "running process" record in the database. In normal course, this record is then updated to be 'complete'. In other handled exception cases, I updated the record to be 'error'. But this is a case where the code completed, but the commit did not.

Where do I need to put, and what do I need to put... in order to catch something like:

[ December 17, 2008: Message edited by: Mike Curwen ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pattern to deal with exception in the commit or rollback phase
 
Similar Threads
JDBC Transactions across multiple databases
When commit transaction
open session everywhere question
UserTransaction and setRollbackOnly
Query about rollback() method