Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remote business methods RemoteException amd Remote interface

 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take time to respond to this question.
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepak,

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

Best regards,
Reza
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic