Is it possible to remove a session Object from the Remote/Local Home Interface.The specs says that we can do so but going through some mock exam,where it is mentioned that we cannot remove a session object using local home interface.
Local Home interface has remove(Objeck PK) method. because this method takes a primary key it can not remove the session object. Further if we talk about the stateless session object it doesn't matter that client call remove or not as the life of stateless session is managed by the container.
Sawan<br />SCJP,SCWCD,SCBCD<br /> <br />Every exit is an entry somewhere.
posted 15 years ago
But in the specs refer 6.4 page no.60,it says that local client can use method of local home interface can be used to remove a session object.
We can't remove the session object using LocalHome.
We can do with only RemoteHome, as well as EJBObject and EJBLocalObject.
In RemoteHome also possible by passing argument as RemoteHandle(Handle of EJBObject) for the remove. For EJBLocalObject we don't have the handle, so that we can't remove the SessionObject using EJBLocalHome.
In more details =============== Why remove(EJBObjectHandle) in EJBHome is,
Sometimes we want store the sessionObject in secondary storage (ClientSide) and later we want continue means, we have to take the EJBObject Handle and store it on secondary storage. After sometime we not interested using the same sessionobject again means, we can directly remove the SessionObject without Making it into EJBObject(for calling remove method).
But for LocalObject, we don't have handle. Because its tightly coupled with client(Means client on the same server, we can't control its handle).