PDA

View Full Version : servlet persistence question



Guest.Visitor
01-01-1995, 02:00 AM
I've written a servlet that writes a form to a browser, and edits whatever response is returned by the browser user. If I access this servlet for a second time, objects that were created when I accessed the first time are still there - but only if I'm accessing from the same browser 'session'. It looks as if the servlet is maintaining some kind of session integrity - don't ask me how, but I like it. My question is this: when will all the objects created during a session be reclaimed? How can the servlet know that a session is terminated?

Guest.Visitor
09-04-2000, 02:53 AM
<font color blue>My question is this: when will all the objects created during a session be reclaimed? How can the servlet know that a session is terminated? </font> JV, Try the method HttpSession.setMaxInactiveInterval(int interval)WebSphere Version 3 supports Servlet API 2.1, so you can over-write the timeout value specified in admin settings of WebSphere. Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. A negative time indicates the session should never timeout. Parameters: interval - An integer specifying the number of seconds MTH (as in maybe this helps) David

Guest.Visitor
09-04-2000, 03:07 PM
Try the method HttpSession.setMaxInactiveInterval(int interval)WebSphere Version 3 supports Servlet API 2.1, so you can over-write the timeout value specified in admin settings of WebSphere. Good answer David, only I'm using a Domino server and the servlet classes that come with JSDK2.0 - no sign of setMaxInactiveInterval amongst the HttpSession methods. Anyone know if Domino (R5) supports the Servlet API 2.1?

Guest.Visitor
09-04-2000, 11:55 PM
JV I know almost nothing about Domino. Howerver the following is from the Lotus Support Site. However in pre 2.1 you could set a server wide "idle time" within the admin of the servers. I have no idea where this is inside Domino. David <hr> "Which versions of Sun Microsystems' JSDK (Java Servlet Development Kit) are supported by Domino? Solution: Domino 4.6.x supports JSDK 1.x. Domino 5.0 through 5.0.2b (the latest release at this time) support JSDK 2.0. Current releases do not support JSDK above release 2.0. For the most up-to-date information concerning supported items for any release of Domino, refer to the Release Notes for that version. Supporting Information: An enhancement request for this new functionality, to add support for JSDK 2.1, has been submitted to Lotus Quality Engineering."

Guest.Visitor
09-05-2000, 02:10 AM
David, Thanks for the tip, and going to the trouble of looking up Lotus Support - much appreciated.