Skip to content

Instantly share code, notes, and snippets.

@derekwyatt
Created May 11, 2011 12:07
Show Gist options
  • Save derekwyatt/966346 to your computer and use it in GitHub Desktop.
Save derekwyatt/966346 to your computer and use it in GitHub Desktop.
My microkernel / jetty config
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!-- =============================================================== -->
<!-- Configure the Jetty Server -->
<!-- -->
<!-- Documentation of this file format can be found at: -->
<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax -->
<!-- -->
<!-- Additional configuration files are available in $JETTY_HOME/etc -->
<!-- and can be mixed in. For example: -->
<!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml -->
<!-- -->
<!-- See start.ini file for the default configuraton files -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<!-- =========================================================== -->
<!-- Server Thread Pool -->
<!-- =========================================================== -->
<Set name="ThreadPool">
<New class="org.eclipse.jetty.util.thread.ExecutorThreadPool"></New>
</Set>
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Set name="Port"><SystemProperty name="jetty.port" default="8443"/></Set> -->
<Set name="host">0.0.0.0</Set>
<Set name="Port">9998</Set>
<Set name="maxIdleTime">1200000</Set>
<Set name="Acceptors">8</Set>
<Set name="AcceptQueueSize">1000</Set>
<Set name="Keystore"><SystemProperty name="jetty.home" default="." />/etc/keystore</Set>
<Set name="Password">... my password here ...</Set>
<Set name="KeyPassword">... my password here ...</Set>
<Set name="truststore"><SystemProperty name="jetty.home" default="." />/etc/keystore</Set>
<Set name="trustPassword">... my password here ...</Set>
<Set name="statsOn">false</Set>
<Set name="resolveNames">false</Set>
<Set name="lowResourcesConnections">200000</Set>
<Set name="lowResourcesMaxIdleTime">1000000000</Set>
</New>
</Arg>
</Call>
<!-- =========================================================== -->
<!-- Set handler Collection Structure -->
<!-- =========================================================== -->
<Set name="handler">
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="MobileConnectionHandler" class="org.eclipse.jetty.servlet.ServletContextHandler">
<Set name="contextPath">/</Set>
<Call name="addServlet">
<Arg>akka.http.AkkaMistWebsocketServlet</Arg>
<Arg>/*</Arg>
</Call>
</New>
</Item>
<Item>
<New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
</Item>
</Array>
</Set>
</New>
</Set>
<!-- =========================================================== -->
<!-- extra options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>
</Configure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment