<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_10_0.dtd">

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


  <!-- ===================================================================== -->
  <!-- Configure a factory for MongoSessionDataStores                        -->
  <!-- ===================================================================== -->
  <Call name="addBean">
   <Arg>
    <New id="sessionDataStoreFactory" class="org.eclipse.jetty.nosql.mongodb.MongoSessionDataStoreFactory">      
       <Set name="dbName"><Property name="jetty.session.mongo.dbName" default="HttpSessions" /></Set>
       <Set name="collectionName"><Property name="jetty.session.mongo.collectionName" default="jettySessions" /></Set>
       <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="connectionString"><Property name="jetty.session.mongo.connectionString" default="mongodb://localhost"/></Set>
    </New>
   </Arg>
  </Call>
  
</Configure>
