• Post Reply Bookmark Topic Watch Topic
  • New Topic

"diamond" Scenario

Steve Hamilton
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know if any questions will be asked regarding the distributed "diamond" scenario with transactions?
Kathy Sierra
Cowgirl and Author
Posts: 1589
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I were you, I would spend my time on other parts of the spec
For transactions, here's my recommendation;
1) Become VERY comfortable with all possible combinations of scenarios for CMT attributes.
2) Know which attributes can be used with which methods, and when.
3) Be SURE you understand the difference between EJBContext.setRollbackOnly() and UserTransaction.setRollbackOnly(), and who can call what and when.
4) Understand SessionSynchronization, know that only stateful session beans can use it, and know the circumstances under which each of its three methods will be called.
5) Understand the effect of exceptions on transactions -- especially that system exceptions cause a rollback while application exceptions don't... unless you say so with setRollbackOnly()
6) Understand the difference between getRollbackOnly() and getStatus()
7) You can relax about the possible return values of getStatus().
8) Be sure that you can look at code, and identify whether it is using BMT or CMT, from subtle things like:
If you see a getRollbackOnly() call, it MUST be a CMT bean. BMT beans can't use it.
If you see a setRollbackOnly(), you won't know unless you see which interface the method is being invoked on: EJBContext means CMT, UserTransaction means BMT.
Hmmmmm.... know the implication of the onMessage() method with respect to transactions. Like, what is the affect on acknowledgement based on the transaction and how this changes with BMT vs. CMT...
OK, that should keep you busy while you are skipping the portion on "diamond scenarios".
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!