aspose file tools*
The moose likes JPA Certification (OCEJPA) and the fly likes JPA exceptions and JTA rollback Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » JPA Certification (OCEJPA)
Bookmark "JPA exceptions and JTA rollback" Watch "JPA exceptions and JTA rollback" New topic
Author

JPA exceptions and JTA rollback

Tamas Polgar
Greenhorn

Joined: Apr 27, 2011
Posts: 13
Hi,
This topic is not exactly clear for me

I have few examples

I have a stateless bean:


(1,3,5)
NonUniqueResultException should NOT mark the transaction rollback. But the call throws an Exception.
Should the new user be saved?

(2,4)
EntityNotFoundException should mark the transaction rollback. But I catch the exception.
Should the new user be saved?

I tried them with jboss,
1: rolled back
2: didnt roll back
3: rolled back
4: rolled back
5: rolled back

But I think the output should be different

?

Thank you
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JPA exceptions and JTA rollback