Skip to content

Instantly share code, notes, and snippets.

@juliandunn
Created August 17, 2012 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliandunn/3375908 to your computer and use it in GitHub Desktop.
Save juliandunn/3375908 to your computer and use it in GitHub Desktop.
example jetty-mongo-sessions.xml
<New id="mongodb" class="com.mongodb.Mongo">
<Arg>
<New class="java.util.ArrayList">
<Call name="add">
<Arg>
<New class="com.mongodb.ServerAddress">
<Arg type="java.lang.String">foo.example.com</Arg>
<Arg type="int">27017</Arg>
</New>
</Arg>
</Call>
<!-- Add more Call statements here as desired -->
</New>
</Arg>
<Call name="getDB">
<Arg>HttpSessions</Arg>
<Call id="sessionDocument" name="getCollection">
<Arg>sessions</Arg>
</Call>
</Call>
<!-- If you want to configure Jetty to be able to read through the slaves, call the following: -->
<Call name="slaveOk"/>
</New>
<Set name="sessionIdManager">
<New id="mongoIdMgr" class="org.eclipse.jetty.nosql.mongodb.MongoSessionIdManager">
<Arg><Ref id="Server"/></Arg>
<Arg><Ref id="sessionDocument"/></Arg>
<Set name="workerName">fred</Set>
<Set name="scavengePeriod">60</Set>
</New>
</Set>
@tholu
Copy link

tholu commented Mar 30, 2016

Is there a full example somewhere for Jetty 9.3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment