• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confusion in HF at page 559

 
Prashu Negu
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
 
Nicholas Cheung
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic