aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Remote Interface and Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Remote Interface and Bean " Watch "Remote Interface and Bean " New topic
Author

Remote Interface and Bean

Maneesh Chauahn
Ranch Hand

Joined: Mar 06, 2006
Posts: 48
Hi All,

As i am new in the EJB , i am looking the architecture of the EJB . One thing which i am unable to understand is that
Why the bean class not implement the remote interface and why is mandatory to define all the methods in the bean which are defined in the remote interface.

Waiting for the reply ..................
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10215
    
166

Why the bean class not implement the remote interface


The bean class can implement the interface. There's no rule which stops the application from doing this.

why is mandatory to define all the methods in the bean which are defined in the remote interface


The remote interface is meant to used by the clients of the application. So any API that you provide on the interface needs to be implemented by the implementing class(in this case your bean class). This holds good not just for EJBs but also for normal interface/implementation class in Java.


[My Blog] [JavaRanch Journal]
Bhaskar Rao
Greenhorn

Joined: Apr 25, 2005
Posts: 23
The bean class can implement the remote interface, but its not advisable.
Implementing the remote interface will make the bean class remotely accessible .

Also, you will be required to implement all the inherited methods from the EJBObject like getEJBHome(), getHandle() etc. which is really upto the container to implement.
 
 
subject: Remote Interface and Bean