File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes JPA exceptions and JTA rollback Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » EJB Certification (SCBCD/OCPJBCD)
Reply 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
 
 
subject: JPA exceptions and JTA rollback
 
Threads others viewed
Container and Rollback
Rollback
More on Exceptions !
Problem with MDB BMP
transaction question in SessionBean
IntelliJ Java IDE