aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Remote business methods RemoteException amd Remote interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Remote business methods RemoteException amd Remote interface" Watch "Remote business methods RemoteException amd Remote interface" New topic
Author

Remote business methods RemoteException amd Remote interface

Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
EJB In Action Page 88: Remote business methods are not required to throw RemoteException unless the business interface extends java.rmi.Remote interface.

a) What is the reason behind this compulsion?

Consider the following code


Here BidManagerBeanRemote extends Remote interface. Since it also extends BidManagerBeanInterface, It inherits its methods which are not marked to throw RemoteException. Is this situation violating the above
stated law? The code ran perfectly fine , while invoking addBid() and getBids(). Further the bean implementation class did not throw RemoteException.


SCJP, SCWCD, SCBCD
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Please take time to respond to this question.
Reza Rahman
author
Ranch Hand

Joined: Feb 01, 2005
Posts: 580
    
    5
Deepak,

Soory for the delay in replying, just got back from vacation...

The reason for the restriction is backwards compatibilty with EJB 2.x. The implementation you are running appears to be non-compliant.

Best regards,
Reza


Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
One more....
The code was deployed with jboss-4.2.3.GA application server.

Looks like one must not use jboss-4.2.3.GA.
Please suggest a better application server which is completely compliant with ejb 3.0 specification

I think we need to put these similar cases in SCBCD FAQ, if its not there already.
Reza Rahman
author
Ranch Hand

Joined: Feb 01, 2005
Posts: 580
    
    5
Deepak,

Please see my earlier post on a similar thread you started.

Best regards,
Reza
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Remote business methods RemoteException amd Remote interface