wood burning stoves
The moose likes Object Relational Mapping and the fly likes Hibernate exception causes Jboss to rollback Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate exception causes Jboss to rollback" Watch "Hibernate exception causes Jboss to rollback" New topic

Hibernate exception causes Jboss to rollback

Meghna Bhardwaj
Ranch Hand

Joined: Jun 08, 2007
Posts: 109
HI All,

I am trying to save name, address, email information using Hibernate in 1 transactrion...sometimes there is an exception thrown by Hibernate, this causes JBoss to rollback the full transaction, even though I have a catch for the hibernate exception.

I would like for just the bad data for example email to not be saved to the database and the other fields to be saved. If there is a Hibernate exception saving email... then I just want the email bit to rollback not the entire, name, address, email to rollback -which is what JBoss does. Does anybody have any suggestions as to how I can implement this? Please provide code sample if possible

Many thanks.
Rahul Babbar
Ranch Hand

Joined: Jun 28, 2008
Posts: 210
Can you please post your code?

Rahul Babbar
Don't get me started about those stupid light bulbs.
subject: Hibernate exception causes Jboss to rollback