File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: Hibernate exception causes Jboss to rollback
It's not a secret anymore!