File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes why EB can't throw RemoteException in Home Biz Methods? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "why EB can Watch "why EB can New topic
Author

why EB can't throw RemoteException in Home Biz Methods?

Alfred Harre
Ranch Hand

Joined: Apr 29, 2004
Posts: 73
HFEB page 346, very last bullet on this page mentions that you should never throw RemoteException from a home business method. I don't understand reason behind this restriction.
Can anybody explanin?
Lionel Orellana
Ranch Hand

Joined: Mar 19, 2004
Posts: 87
Alfred, you don't throw RemoteException from ANY method in your bean class, no matter where it comes from (your home or your component interface). In the remote interfaces you do declare RemoteException, but never in the bean class. Why? Your bean is not a remote object. A client never talks to your bean directly but to the EJBObject (the bodyguard). It is the EJBObject who is a remote object, not your bean.

cheers
Alfred Harre
Ranch Hand

Joined: Apr 29, 2004
Posts: 73
Oh my lucky electron, I forgot that
Lionel Orellana thanks a lot for your help.
Lionel Orellana
Ranch Hand

Joined: Mar 19, 2004
Posts: 87
u r welcome Alfred Harre
 
 
subject: why EB can't throw RemoteException in Home Biz Methods?
 
Similar Threads
Doubt in remote exceptions
HFE error?
Transactions :confused:
simple basic ejb question
must not declare remote exception.