• 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:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

question on exception(HF P559)

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Evacuate the building! Here, take this tiny ad with you:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic