Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Manager - STOP application fails to stop session!!!

Manager - STOP application fails to stop session!!!

2004-01-15       - By Bruno.Melloni@(protected)

 Back
Reply:     1     2     3     4     5     6     7  

SUMMARY OF PROBLEM - for future people scanning the archives:

Needed to disable session persistence for an application.

SOLUTION:

To turn off session persistence for an application, include a Manager clause
(similar to this one) in the application context file:

   <Manager className="org.apache.catalina.session.PersistentManager Source code of org.apache.catalina.session.PersistentManager"
       debug="0"
       saveOnRestart="false"
       maxActiveSessions="-1"
       minIdleSwap="-1"
       maxIdleSwap="-1"
       maxIdleBackup="-1">
       <Store className="org.apache.catalina.session.FileStore Source code of org.apache.catalina.session.FileStore"
           directory="logs/sessions" />
    </Manager>

It does not seem to be necessary for the logs/sessions directory to actually
exist.

To safely deploy an application you can use the manager webapp (http:/
/localhost:8080/manager/html) stop command before deploying and start command
afterwards.  Or use the manager http interface from a script or ant build, to
stop, deploy, start the application.

REASON FOR DISABLING PERSISTENCE:

For an application that is stable and unchanging, and that has ONLY
serializable objects in the session, persistence is highly desirable.  Admins
may stop and start the servers (provided they are reasonably quick) without
significant effect to the users.

For an application that is likely to be updated with new versions, where the
list of objects in the session may change from one version to the next, or
where there are non-serializable objects in the session, disabling session
persistence is a must.

SUGGESTION FOR DEVELOPERS:

It seems silly to have to fully define the PersistentManager in order to
disable it.  It would be nice if there was a simple clause to disable session
persistence for an application.

bruno

P.S.: My thanks to Yoav Shapira for helping resolve this issue, and to Steven
Job for having the opposite problem and posting his application Context, which
helped me clarify my understanding.

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)




©2008 junlu.com - Jax Systems, LLC, U.S.A.