So I nest the manager in a context as below, and I can see my sessions in the database.
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
...
<Context path="/jsp-examples" docBase="${catalina.home}/webapps/jsp-examples" debug="10" privileged="false">
<Manager className="org.apache.catalina.session.PersistentManager" debug="10" saveOnRestart="true" checkInterval="1" maxActiveSessions="-1" minIdleSwap="-1" maxIdleSwap="0" maxIdleBackup="0">
<Store className="org.apache.catalina.session.JDBCStore" debug="9" connectionURL="jdbc:sapdb://192.168.1.3/COCHISE?user=DBA&password=DBA" driverName="com.sap.dbtech.jdbc.DriverSapDB"
sessionAppCol="app_name"
sessionDataCol="session_data"
sessionIdCol="session_id"
sessionLastAccessedCol="last_access"
sessionMaxInactiveCol="max_inactive"
sessionTable="DBA.tomcat_sessions"
sessionValidCol="valid_session"/>
</Manager>
</Context>
</Host>
That solution doesn't pleased me a lot because I want to store the session for all deployed context. How can I do that ?
I have an other question : should I write something in my servlet to recover a session for example after a crash or does tomcat do it automatically ?
Thanks a lot
Xavier
Shapira, Yoav a écrit :
Hi,
I've read all the server.xml file and there is no marks of the Manager
configuration.
The example was removed a while ago, but you can still see it in older versions of server.xml by going to the CVS or downloading an old release: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/c onf/server.xml?annotate=1.2 for example has a complete example of a persistent manager commented out.
I saw in the documentation that "A Manager element MAY be nested inside
a Context component". And In the server.xml there aren't any contexts.
It MAY be nested inside a Context, but doesn't have to be. It can be inside a Host or an Engine, both of which are more common than having a Manager inside a Context.
So don't you think that the file to be configured must be
${CATALINA_HOME}\conf\Catalina\localhost\manager.xml ?
No, that's for tomcat's Manager webapp, which is not the same thing as the session Manager. I realize the names might be confusing.
By the way, don't you have an example ?
We used to ship one with tomcat in server.xml, so see above for accessing older versions of that file.
Yoav Shapira
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]