• 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

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.
 
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic