aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Exception 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 "Exception question" Watch "Exception question" New topic
Author

Exception question

jeff mutonho
Ranch Hand

Joined: Apr 30, 2003
Posts: 271
This question is from the online mock questions:

How will the EJB container handle exceptions thrown by a business method of a bean with container managed transaction demarcation? [Select all correct answers]

1If the instance called setRollbackOnly(), the EJB container will rollback the transaction.
2If the instance did not call setRollbackOnly(), the EJB container will commit the transaction.
3The EJB container will throw a RemoteException.
4If the bean represents an entity bean, it will remove the entity from the datasource.
5If the bean represents a session bean, the bean will be removed from the pool.



And the correct answers are marked as 1 and 2.I have problem with answer number 2 , because the method could throw an EJBException , which is a system exception , and thus making solution 2 incorrect.In the explantion for the solution , they use "application exception" even though the question only uses "exception".Am I gonna get such unclear questions on the exam?
B.Sathish
Ranch Hand

Joined: Aug 18, 2005
Posts: 372
I have not taken the exam, but you definitely won't get such ambiguous questions as they are reviewed by many people.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception question