<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">


  <!-- ===================================================================== -->
  <!-- Configure a factory for JDBCSessionStores                             -->
  <!-- ===================================================================== -->
  <Call name="addBean">
   <Arg>
    <New id="sessionDataStoreFactory" class="org.eclipse.jetty.server.session.JDBCSessionDataStoreFactory">   
      <Set name="gracePeriodSec"><Property name="jetty.session.gracePeriod.seconds" default="3600" /></Set>
      <Set name="savePeriodSec"><Property name="jetty.session.savePeriod.seconds" default="0" /></Set>
      <Set name="databaseAdaptor">
        <Ref id="databaseAdaptor"/>
      </Set>
	<Set name="sessionTableSchema">
		<New
			class="org.eclipse.jetty.server.session.JDBCSessionDataStore$SessionTableSchema">
			<Set name="accessTimeColumn">
				<Property name="jetty.session.jdbc.schema.accessTimeColumn" default="accessTime" />
			</Set>
			<Set name="contextPathColumn">
				<Property name="jetty.session.jdbc.schema.contextPathColumn" default="contextPath" />
			</Set>
			<Set name="cookieTimeColumn">
				<Property name="jetty.session.jdbc.schema.cookieTimeColumn" default="cookieTime" />
			</Set>
			<Set name="createTimeColumn">
				<Property name="jetty.session.jdbc.schema.createTimeColumn" default="createTime" />
			</Set>
			<Set name="expiryTimeColumn">
				<Property name="jetty.session.jdbc.schema.expiryTimeColumn" default="expiryTime" />
			</Set>
			<Set name="lastAccessTimeColumn">
				<Property name="jetty.session.jdbc.schema.lastAccessTimeColumn" default="lastAccessTime" />
			</Set>
			<Set name="lastSavedTimeColumn">
				<Property name="jetty.session.jdbc.schema.lastSavedTimeColumn" default="lastSavedTime" />
			</Set>
			<Set name="idColumn">
				<Property name="jetty.session.jdbc.schema.idColumn" default="sessionId" />
			</Set>
			<Set name="lastNodeColumn">
				<Property name="jetty.session.jdbc.schema.lastNodeColumn" default="lastNode" />
			</Set>
			<Set name="virtualHostColumn">
				<Property name="jetty.session.jdbc.schema.virtualHostColumn" default="virtualHost" />
			</Set>
			<Set name="maxIntervalColumn">
				<Property name="jetty.session.jdbc.schema.maxIntervalColumn" default="maxInterval" />
			</Set>
			<Set name="mapColumn">
				<Property name="jetty.session.jdbc.schema.mapColumn" default="map" />
			</Set>
			<Set name="tableName">
				<Property name="jetty.session.jdbc.schema.table" default="JettySessions" />
			</Set>
		</New>
	</Set>
    </New>
   </Arg>
  </Call>

</Configure>
