• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question on exceptions

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JPilot question ID 1840:

A client has just called a business method on an entity bean on which another client has already called theBean.remove(). What will happen?

Options

Select 1 correct option.

1. A new entity bean is created and the method is executed on that bean.
2. The method call will return immediately without returning any output.
3. The client will get javax.ejb.EJBException
4. The container will route the call to another container within the cluster (if it exists).
5. The client will get javax.ejb.NoSuchObjectLocalException if it is a local client.

Correct answer is 5.

I know the reason it should be 5, but 3 sounds correct as well -- after all, (if I understand correctly) the container does not have to throw the most specific exception to the user. If I see this question on the exam, I will pick 5 (since it's the best answer) but if the question has 2 answers, would it be wrong to pick 3 as well?

Thanks,
Adrian
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ya..i too confused here. Experts, comments please.
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
https://coderanch.com/t/160983/java-EJB-SCBCD/certification/exceptions
 
reply
    Bookmark Topic Watch Topic
  • New Topic