• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Qns regarding Exception in EJB3.0

 
Shaival Satyarthi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Currently,I m reading EJB3.0 specs for SCBCD5.0 prep.

On page 81 of EJB3.0 specs,regarding section dealing with Exceptions.

Question : As in EJB2.1,if session object does not exist and client attempts to invoke a method on the Bean's business interface,if client is remote it throws java.rmi.NoSuchObjectException and if it's local client,it throws NoSuchObjectLocalException.
But for EJB3.0, it throws NoSuchEJBException,if session object does not exist and client attempts to invoke a method.

How will it differ for Remote and Local clients if it's just EJB3.0 ?


regards
Shaival
 
Shaival Satyarthi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess many of people are preparing for EJB3.0.So,Please reply.
 
Lawrence Johnbosco
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is one of the key thing to note in EJB 3.0.

For both Local and Remote beans, when the bean object does not exist (for instance, this will happen if you try to invoke any business method on the stateful session bean after calling one of the @Remove method), the container will throw the javax.ejb.NoSuchEJBException. The only exception to this rule is when a @Remote Business interface also extends java.rmi.Remote, at this time, the container will throw java.rmi.NoSuchObjectException

Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic