*
The moose likes EJB and other Java EE Technologies and the fly likes EJB Transactions Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB Transactions Question" Watch "EJB Transactions Question" New topic
Author

EJB Transactions Question

john appadam
Greenhorn

Joined: Jun 13, 2011
Posts: 5
What exception should be thrown to break a transaction in EJB?
Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

What Transaction Management do you use?

Basically, the SystemException is used to roll back the transaction.
You could also use an ApplicationException with explicitely marked 'rollback' attribute to rollback the transaction.

Hope that helps.

Cheers!


OCP Java SE 6 Programmer, OCM Java SE 6 Developer, OCE Java EE 6 JSPSD, OCE Java EE 6 EJBD, OCE Java EE 6 JPAD, Spring 3.0 Core Professional.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB Transactions Question
 
Similar Threads
EJB 2.0 or 2.1
Many to Many Table Relational Mapping with 3 Tables
Use of Helper classes
What J2EE and EJB version will be taken in Part I?
What IDE Should I use?