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

Why just marking and not rolling back?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
setRollbackOnly() method in CMT beans informs the transaction manager that this transaction is marked to be rolled-back.
Why this marking thing? why not rollback immediately?
Thanks.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A CMT bean marks a transaction for rollback to protect data integrity before throwing an application exception, because application exceptions do not automatically cause the EJB container to rollback the transaction.
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,

CMT means container - managed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic