Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding exceptions

 
trivikram Kumar
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which exception do we get if the client calls remove() on a bean thats already been removed?

A) No Such Object exception(for remote),
B) No Such Object Local exception(for local) or
C) EJB/Remote exception for local and remote clients respectively.

My answer is A/B depending on the client.
Could you explain me your answers?
 
Wei-ju Wu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Javainn,

your answer is correct for session beans, the reason is simply because it is specified Have a look at section 18.3.5 of the EJB specification.

Wei-ju
 
trivikram Kumar
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Wei-ju Wu,

Thankyou for your answer.
Actually I was sure about the answer but had a doubt because HFEJB has given a different answer.
Anyway thankyou for clearing my doubt even after you clearing the exam.
[ July 20, 2005: Message edited by: S javainn ]
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which exception do we get if the client calls remove() on a bean thats already been removed?

A) No Such Object exception(for remote),
B) No Such Object Local exception(for local) or
C) EJB/Remote exception for local and remote clients respectively.


It is not guaranteed that the container will throw the specific exception. In the above question third option is correct because container may not thorw NoSuchObjectException or NoSuchObjectLocalException.

Do a search in the forum and you will find answer of this question .
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may help.
http://www.coderanch.com/t/160892/java-EJB-SCBCD/certification/mock-exam-HF-pg
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic