• 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

question on exception(HF P559)

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HF 559
client scenarious:
"When client calls remove() on a bean that's already been removed
The client will receive RemoteException/EJBException"
Even though such statement is right
(NoSuchObjectException is subclass of RemoteException)
I want to know why container not send more specific exception (NoSuchObjectException/NoSuchObjectLocalException) to client,
Does such case depend on container vendor?
[ February 12, 2004: Message edited by: si yi ]
 
author
Posts: 469
20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes that is correct. It depends upon the container implementation. It is recommended that more specific exceptions should be thrown to the client but it depends only on the container implementation.
regards
ashish sarin
 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would prefer to refer to the EJB spec.
Section 6.7.1


It is invalid to reference a session object that does not exist. Attempted remote invocations on a session object that does not exist result in 'java.rmi.NoSuchObjectException'


So the spec DOES require 'java.rmi.NoSuchObjectException' be thrown rather than up to the vendor. See section 6.7.2 for similar requirement on local session object.
reply
    Bookmark Topic Watch Topic
  • New Topic