Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

What Exception does the EJBCOntainer Throw  RSS feed

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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 ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!