If a store a reference to a stateful session bean as an attribute of the HttpSession Object, will the reference still be valid after I getAttribute()? If not, how no make sure that I get the same session object? The specfic problem is I have a servlet that needs to create a statful
- Posted by: Keith Young
- Posted on: March 10 2001 13:46 EST
session bean when the session is created. I need to access that same bean for all post to the servlet thereafter.
- Reference to Stateful Session Bean in HtttpSession Objec by Kapil Israni on March 10 2001 14:37 EST
- Reference to Stateful Session Bean in HtttpSession Object by Keith Young on March 10 2001 15:08 EST
- Reference to Stateful Session Bean in HtttpSession Objec by Keith Young on March 10 2001 15:09 EST
- Reference to Stateful Session Bean in HtttpSession Objec by Dmitri Colebatch on March 11 2001 08:33 EST
you can very well go ahead and store the reference of ur stateful session bean in HttpSession and use like any other HttpSession object. the session will be available to u as long as the Http session lasts.
Are there an issues with clusters at the EJB layer? If the servlet server resides in a cluster, is there any machine specific data stored with the EJBobject reference stored in the HttpSession object?
The session bean or the httpsession can time out?
You need to be careful that the Stateful session bean doesn't time out before the HttpSession does. You should be able to configure the timeout time in the EJB, not sure about HttpSession though - I think you'll find it'll be application specific on both fronts.