• 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

What Exception does the EJBCOntainer Throw

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when the remote client does not have access to a Business Method.
Is this the same as the client not having permission to call the method.
Thanks
Sumit
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You get RemoteException thrown if the client, using a stub to a valid EJB Object, invokes remove or any other business method on a bean that's already been removed.
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If a bean has been removed and the client tries to call any methods on this bean, the Container will throw NoSuchObject(Local)Exception to the client. Check spec 18.3.5 pg 379.
Joyce
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If a bean has been removed and the client tries to call any methods on this bean, the Container will throw NoSuchObject(Local)Exception to the client. Check spec 18.3.5 pg 379.


Actually, the spec says that the Container should throw NoSuchObjectException for a remote client, but must throw RemoteException. So, it's up to the Container vendor to decide whether to throw the more helpful NoSuchObjectException or the less helpful RemoteException.
 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Roger Chung-Wee:

Actually, the spec says that the Container should throw NoSuchObjectException for a remote client, but must throw RemoteException. So, it's up to the Container vendor to decide whether to throw the more helpful NoSuchObjectException or the less helpful RemoteException.


Oops! I gave a bad reference. But if you do a search for NoSuchObjectException throughout the spec (esp the session and entity bean sections), the spec mentions the Container must/will throw NoSuchObjectException.
Joyce
[ April 27, 2004: Message edited by: Joyce Lee ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic