tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 47061] JDBCStore for saving sessions doesn't support datasource
Date Tue, 09 Jun 2009 11:07:21 GMT

--- Comment #6 from Steve Pugh <>  2009-06-09 04:07:18 PST ---
Created an attachment (id=23778)
 --> (
New version of JDBCStore supporting datasource only

I have also come up with an alternative for the JDBC session store.
Attached is a new file which ONLY supports the datasource
method of getting the connection. Therefore this doesn't require any changes to
the existing "direct connection" version of the code.

The code can be used by adding the following into context.xml

<Manager className="org.apache.catalina.session.PersistentManager"
  <Store className="org.apache.catalina.session.JDBCStoreDS"
datasourceName="java:/comp/env/jdbc/DB-TOMCAT" sessionDataCol="session_data"
sessionIdCol="session_id" sessionLastAccessedCol="last_access"
sessionMaxInactiveCol="max_inactive" sessionTable="tomcat_sessions"

where DB-TOMCAT is a datasource defined elsewhere.

There is also an optional parameter "requireDistributable". Setting this to
true will mean sessions will only be persisted to the database if the webapp is
marked as "distributable" in the web.xml. The default is false which means the
the sessions will be persisted anyway.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message