• 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

NoSuchEntityException

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NOTE: Pls ignore spaces, as those are required to post a message (1 word can not be more than 30 characters long)

Specs says:
18.3.4 javax.ejb. NoSuchEntityException
The NoSuchEntityException is a subclass of EJBException. If it is thrown by a method of an entity bean class, the Container must handle the exception using the rules for EJBException described in Sections 18.3.1, 18.3.2, and 18.3.3.

To give the client a better indication of the cause of the error, the Container should throw the java.rmi. NoSuchObjectException (which is a subclass of java.rmi. RemoteException) to a remote client, or the javax.ejb. NoSuchObjectLocalException to a local client.

My questions are as below:
1] When Entity bean instance throws NoSuchEntityException, does Container
throw java.rmi. NoSuchObjectException to remote client and javax.ejb. NoSuchObjectLocalException to a local client?

If not, does Container throw java.rmi. RemoteException to remote client and javax.ejb. EJBException to a local client and NoSuchEntityException is not related to java.rmi. NoSuchObjectException and javax.ejb. NoSuchObjectLocalException?

2] Can I infer that client would never get NoSuchEntityException directly unless Container implementation is designed to throw specific exceptions (Even in that case, only Local client would get NoSuchEntityException being sub-class of EJBException, right?)?

Pls clarify.

Regards,
Sandesh
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sandash,


1] When Entity bean instance throws NoSuchEntityException, does Container
throw java.rmi. NoSuchObjectException to remote client and javax.ejb. NoSuchObjectLocalException to a local client?



Yes it is absolutely correct.


2] Can I infer that client would never get NoSuchEntityException directly unless Container implementation is designed to throw specific exceptions (Even in that case, only Local client would get NoSuchEntityException being sub-class of EJBException, right?)?



The remote client will receive java.rmi.NoSuchObjectException where as
the local client will receive javax.ejb.NoSuchObjectLocalException

Hope it helps.
 
Sandesh Tathare
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Thanks a lot.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic