Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

pattern to deal with exception in the commit or rollback phase  RSS feed

Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!