Update jdbc module for new session architecture

This commit is contained in:
Jan Bartel 2016-02-16 15:12:23 +01:00
parent 9b5aa6f90d
commit c965dc905c
3 changed files with 9 additions and 11 deletions

View File

@ -13,12 +13,15 @@
<Ref refid="Server"/>
</Arg>
<Set name="workerName"><Property name="jetty.jdbcSession.workerName" default="node1"/></Set>
<Set name="scavengeInterval"><Property name="jetty.jdbcSession.scavenge" default="1800"/></Set>
<Set name="sessionScavenger">
<New class="org.eclipse.jetty.server.session.SessionScavenger">
<Set name="scavengeIntervalSec"><Property name="jetty.jdbcSession.scavenge" default="1800"/></Set>
</New>
</Set>
<!-- ===================================================================== -->
<!-- Uncomment either the datasource or driver setup and configure -->
<!-- ===================================================================== -->
<Get name="databaseAdaptor">
<!--
<Set name="DatasourceName"><Property name="jetty.jdbcSession.datasource" default="javax.sql.DataSource/default"/></Set>
-->
@ -28,6 +31,7 @@
<Arg><Property name="jetty.jdbcSession.connectionURL"/></Arg>
</Call>
-->
</Get>
</New>
</Set>

View File

@ -118,13 +118,9 @@ public class JdbcTestServer extends AbstractTestServer
JDBCSessionIdManager idManager = new JDBCSessionIdManager(_server);
idManager.setWorkerName("w"+(__workers++));
idManager.getDatabaseAdaptor().setDriverInfo(DRIVER_CLASS, (config==null?DEFAULT_CONNECTION_URL:(String)config));
JDBCSessionIdManager.SessionIdTableSchema idTableSchema = new JDBCSessionIdManager.SessionIdTableSchema();
JDBCSessionIdManager.SessionIdTableSchema idTableSchema = idManager.getSessionIdTableSchema();
idTableSchema.setTableName("mysessionids");
idTableSchema.setIdColumn("myid");
return idManager;
}
}

View File

@ -118,9 +118,7 @@
<contextPath>/test</contextPath>
<tempDirectory>${project.build.directory}/work</tempDirectory>
<sessionHandler implementation="org.eclipse.jetty.server.session.SessionHandler">
<sessionManager implementation="org.eclipse.jetty.server.session.HashSessionManager">
<storeDirectory>${basedir}/target/sessions</storeDirectory>
</sessionManager>
<sessionManager implementation="org.eclipse.jetty.server.session.HashSessionManager"/>
</sessionHandler>
</webApp>
<loginServices>