This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android 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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: pattern to deal with exception in the commit or rollback phase
 
It's not a secret anymore!