Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

confusion in HF at page 559

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At page 559 HF, it is mentioned that the exceptions thrown for following cases.
1)Client calls getPrimaryKey() on the local component interface of a session bean

Ans: EJBException

2) Client calls the home remove method on the LOCAL home interface of session bean.

Ans: RemoveException

I dont understand (2) case. I guess that should be EJBException. My thinking is (2) is against the EJB rule so it shud throw EJBException.
Can somebody explain me, please.

Thanks,
Prashant
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I dont understand (2) case. I guess that should be EJBException. My thinking is (2) is against the EJB rule so it shud throw EJBException.



Please read the unconfirmed error reports are from readers


[559] 2nd paragraph;
In the book:

The client gets a RemoveException. Why? Because the only remove() method in a session
bean's local home is the one that takes a primary key, and that can never work.
Remote client would also get a RemoveException.

Should read:

The client gets an EJBException. ... Remote client would get a RemoteException.



Noticed that it is NOT confirmed by the authors.

Nick
[ July 27, 2005: Message edited by: Nicholas Cheung ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic