• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Exception question

 
Ranch Hand
Posts: 271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not taken the exam, but you definitely won't get such ambiguous questions as they are reviewed by many people.
 
Die Fledermaus does not fear such a tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic