File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Rollback Question" Watch "Rollback Question" New topic

Rollback Question

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
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-
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: 850
thanks..just a confusing doubt.
Don't get me started about those stupid light bulbs.
subject: Rollback Question
It's not a secret anymore!