wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Rollback Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Rollback Question" Watch "Rollback Question" New topic
Author

Rollback Question

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
Does rollback neccesarily means session bean instance will be discarded ?


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Ralph Jaus
Ranch Hand

Joined: Apr 27, 2008
Posts: 342
No. Some examples are

- CMT bean and you call EJBContext.setRollbackOnly()
- an Application Exception is thrown with rollback=true is thrown

Both will lead to a rollback but the bean instance won't be discarded.


SCJP 5 (98%) - SCBCD 5 (98%)
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
thanks..just a confusing doubt.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Rollback Question