• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

question on statefull session bean

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
my question is about statefull session bean,how does the container remember the state of the conversation, I mean to rememeber the client is there anything in the stubs and skeletons that helps remember the bean instance on the server side? or is there something else?, what happens if I close the Browser or system shut down on the client side and restart again, can I still remember the conversation ? please explain.

thanks
Pradeep
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

to rememeber the client is there anything in the stubs and skeletons that helps remember the bean instance on the server side? or is there something else?


There is nothing in the spec that mentions how this should work. But yes, the container may use some kind of mechanism in the stub of remote object impl to uniquely identify the client so that it knows that a sequence of method invocation came from the same client.

what happens if I close the Browser or system shut down on the client side and restart again, can I still remember the conversation ? please explain.


Nope, unless your code uses Handles and shuts down gracefully.

The container may identify orphaned objects and destroy them if they time-out. The time-out interval is generally specified by the deployer in a vendor specific way. Again the spec does not mandate this. Container may or may not use time-out. If it finds a session object lurking around beyond time-out interval, the container may simply remove them.

Note that even if you use Handles, you may end up getting java.rmi.NoSuchObjectException if the container has already removed the session object (due to time-out) by the time you try to get the EJBObject associated with the handle.
[ February 28, 2005: Message edited by: Keerthi P ]
 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic