Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile 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