Hey Guys.. Thanks for you replies.! Lasse Koskela : Could you describe how and why would you want to "pass a reference to the EJBObject to the bean directly"? Well.. my question is more of conceptual. What I wanted to know is why do we have EntityContext? I mean what purpose does it serve? My understanding of EntityContext previously was : It is an object which is passed to EntityBean so that EntityBean can retrieve MetaData about EntityData as well as EntityObject and EntityHome. The same thing can be acheived by the container by passing the reference of EntityObject instead of EntityContext... I hope my question is not too vague. Thanks again. Regards, Mehul.
what I wanted to know is why do we have EntityContext?
Entity context provides the bean class access to the context information, like the home, remote interfaces, transaction information, security settings etc, maintained by the Application server for that particular bean. EJBObject (think that's what you mean by Entity Object) is nothing but a server side (extension) proxy to the bean. Each client will have its own proxy (EJBObject),this object has logic to marshal and unmarshal client request and delegate the client request to the bean.
The same thing can be acheived by the container by passing the reference of EntityObject instead of EntityContext...
Both these classes (EJBObject and EntityContext) are for two different purposes, one totally decouples the the client from the a bean and other is for decoupling the bean class for its metadata information ... so I don't think that do the same thing. [ October 30, 2003: Message edited by: Vinod John ]
HI, Context is a n object that can be used to environment information about the ben. ie the current status of the bean(transaction,security roles).container can sets the context object.so we can pass a refernce to the bean that the way container knows the status of the bean instances.
Not looking good. I think this might be the end. Wait! Is that a tiny ad?