aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes doubt on EJB Home Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "doubt on EJB Home" Watch "doubt on EJB Home" New topic
Author

doubt on EJB Home

Ravi Bansal
Ranch Hand

Joined: Aug 18, 2008
Posts: 86
Hi Guys,
i have just stared to understand the EJB architecture. and what i gained is that whole idea of Home interface is to create/instantiate the bean(stateful) , EJBObject and give back the stub(in serialized form) of EJBObject to the client , so that client can make a call on business methods using that stub.

My question is why we need home interface at all? why cant it be designed with just one interface(EJBObject) , we can register that object of interface with JNDI and client can look up ,get the stub of EJBObject from JNDI and then that stub can be used to create/instantiate the beans with the help of services from container???


SCJP 5.0 94%
OCE-EJBD 90%
prashant k. gupta
Ranch Hand

Joined: May 15, 2008
Posts: 62
Originally posted by Ravi Bansal:
Hi Guys,

My question is why we need home interface at all? why cant it be designed with just one interface(EJBObject) , we can register that object of interface with JNDI and client can look up ,get the stub of EJBObject from JNDI and then that stub can be used to create/instantiate the beans with the help of services from container???



You are absolutely right. As in EJB 3 we don���t have home interface, only we have business interface (almost similar to EJBObject ) and we can do the look up by same only and even we can inject directly by dependency injection (extra rich feature of EJB 3 )

so start exploring EJB 3 instead of EJB2/2.1 .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt on EJB Home