• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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.
 
You showed up just in time for the waffles! And this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic