Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Exception question

 
Ranch Hand
Posts: 271
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!