Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Transactions Question

 
john appadam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exception should be thrown to break a transaction in EJB?
 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic