Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Doubts On Removing Session Object

 
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
 
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
 
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
reply
    Bookmark Topic Watch Topic
  • New Topic