Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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.
 
You can't have everything. Where would you put it?
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic