• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubts On Removing Session Object

 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

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.

Please Clarify.

Thanks
Shiv
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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.

Experts please clarify.

Thanks And Regards
Shiv
 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi KasiMurugan,

I agree with you,but what abt the specs that says that we can remove session object using local home interface refer 6.4 page no.60

Regards
Shiv
 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sivaprakash,

I agree with u, i think they are missplaced the content.But Please read under the heading of removing a session object(6.4.1 on the same page).

Regards
Kasimurugan R.
 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks KasiMurugan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic