Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

confusion in HF at page 559

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic