• 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

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 ]
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic