| Author |
EJB local objects
|
Ashok Paulraj
Ranch Hand
Joined: Jul 07, 2003
Posts: 78
|
|
Hello Ranchers, I am just learning a bit on EJBs. CLARIFY THIS: In order to access the business methods, there are two options:: OPTION I: client calls stub - stub does marshalling & contacts skeleton - skeleton does unmarshalling & contacts EJBObject to get an instance of the bean - EJBObject contacts business methods & response comes back thru' the same process. OPTION II: client calls an interface that implements EJBlocalHome --which further contacts an interface that implements EJBlocalObject - which creates an instance of the bean and contacts the bean to run the logic. Ofcourse I knew that OPTION II is valid only when the bean is deployed in the same machine as the client. Am I right?... Through out your version of understanding to get this right!! Thanks, Shalini
|
 |
Manish Malhotra
Greenhorn
Joined: Apr 05, 2003
Posts: 29
|
|
OPTION I: client calls stub - stub does marshalling & contacts skeleton - skeleton does unmarshalling & contacts EJBObject to get an instance of the bean - EJBObject contacts business methods & response comes back thru' the same process. ====================== General -->> When you call create method on Home then your home create or get the instance of your bean from the pool, and then it associates the EJBObject's object with your bean instance & EJBObject impelements the remote interface. The concept of stub is correct as per my knowledge what you are thinking. But I think now there is no skeleton on the server side. OPTION II: client calls an interface that implements EJBlocalHome --which further contacts an interface that implements EJBlocalObject - which creates an instance of the bean and contacts the bean to run the logic. ===== I dont know much about the local interface concept in EJB2.0 regards, Manish Malhotra SE, PCS. IND
|
 |
anjan
Greenhorn
Joined: Feb 14, 2004
Posts: 5
|
|
Originally posted by Taurean Lord: Hello Ranchers, I am just learning a bit on EJBs. CLARIFY THIS: In order to access the business methods, there are two options:: OPTION I: client calls stub - stub does marshalling & contacts skeleton - skeleton does unmarshalling & contacts EJBObject to get an instance of the bean - EJBObject contacts business methods & response comes back thru' the same process. OPTION II: client calls an interface that implements EJBlocalHome --which further contacts an interface that implements EJBlocalObject - which creates an instance of the bean and contacts the bean to run the logic. Ofcourse I knew that OPTION II is valid only when the bean is deployed in the same machine as the client. Am I right?... Through out your version of understanding to get this right!! Thanks, Shalini
<< OPTION II ; <<client looks up for LocalHome interface reference ( i.e the <<implementation class for the interface that extends EJBLocalHome) and <<get's tha handle of the LocalEJBObject (i.e the implementation class of <<interface that extends EJBLocalObject ) <<yes it's right only thing is this time there is no stub & <<Skeleton overhead ...... and it's just plain method calls. Regards Anjan
|
It is easier to write an incorrect program than understand a correct one....
|
 |
Srikanth Shenoy
author
Ranch Hand
Joined: Jan 24, 2004
Posts: 184
|
|
Originally posted by Taurean Lord: Hello Ranchers, I am just learning a bit on EJBs. CLARIFY THIS: .... ..... OPTION II: client calls an interface that implements EJBlocalHome --which further contacts an interface that implements EJBlocalObject - which creates an instance of the bean and contacts the bean to run the logic. Ofcourse I knew that OPTION II is valid only when the bean is deployed in the same machine as the client. Thanks, Shalini
Slight correction on this one. A client can access a EJBLocalObject only when the client is part of the same EAR as the EJB Local Object, not the same machine. Hope that helps, Srikanth Shenoy Author Struts Survival Guide : Basics to Best Practices J2EE Project Survival Guide
|
Srikanth Shenoy
Author of Struts Survival Guide : Basics to Best Practices
|
 |
Ashok Paulraj
Ranch Hand
Joined: Jul 07, 2003
Posts: 78
|
|
Hello Mr. Shenoy, Could you add 2 more cents on EAR ? ~ Shalini
|
 |
 |
|
|
subject: EJB local objects
|
|
|