• 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

Qns regarding Exception in EJB3.0

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess many of people are preparing for EJB3.0.So,Please reply.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic