aspose file tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Exception ques. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "Exception ques." Watch "Exception ques." New topic
Author

Exception ques.

Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
What will happen if I call getRollbackOnly() or SetRollbackOnly() of EJBContext in methods not marked with Required, RequiresNew or Mandatory? will I get an exception?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6601
    
    1

Why would you get an exception ? You would have a transaction and CMT and you can setrollbackonly from the context. Its legal. If you use the userTransaction however, thats another question.


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
Malan Subramanian
Greenhorn

Joined: Jul 09, 2005
Posts: 13
Hmm... Assuming that am calling setRollbackOnly() in a CMT bean whose business method has a transaction attribute, NotSupported or Never, then an exception should definitely be thrown coz there is no active transaction available for rollback.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Exception ques.
 
Similar Threads
Server Exception
Struts application design question
WA #1.....word association
void return type in JSP expression
what is error?