wood burning stoves 2.0*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Consider Paul's rocket mass heater.
subject: Hibernate exception causes Jboss to rollback
Similar Threads
JTA Transaction rollback exception
Handle transaction using MDB
Email Address Validation
I have name of a savepoint, can i rollback to that savepoint?