This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is getRollBackOnly container callback?

 
Alfred Harre
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is EJBContext.getRollBackOnly() a container callback?
 
Lionel Orellana
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Alfred

You call EJBContext.getRollBackOnly() when you want to find out if the transaction has been marked for rollback ...
 
Alfred Harre
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lionel Orellana:
No Alfred

You call EJBContext.getRollBackOnly() when you want to find out if the transaction has been marked for rollback ...


Ok, I am confused here :roll:

EJBContext.getRollBackOnly() is for CMT only. It means, only container can call this method, right? If only container can call it then it is a container callback. (may be i am more confused than you initially thought )

Please correct me.
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBContext.getRollbackOnly() is for CMT and UserTx.getStatus() is for BMT. These two methods are called by the bean provider to know the status of the tx.
getRollbackOnly() is used to find out whether the tx was set to rollback at any point using EJBContext.setRollbackOnly()
regds
Giju
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic