https://issues.apache.org/bugzilla/show_bug.cgi?id=47061





--- Comment #6 from Steve Pugh <bri...@bristol.gov.uk>  2009-06-09 04:07:18 PST 
---
Created an attachment (id=23778)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23778)
New version of JDBCStore supporting datasource only

I have also come up with an alternative for the JDBC session store.
Attached JDBCStoreDS.java 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"
maxIdleBackup="0">
  <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"
sessionValidCol="valid_session">
  </Store>
</Manager>

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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to