Created
August 17, 2012 04:24
-
-
Save juliandunn/3375908 to your computer and use it in GitHub Desktop.
example jetty-mongo-sessions.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a full example somewhere for Jetty 9.3?