1 <?xml version="1.0"?> 2 <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> 3 4 <!-- =============================================================== --> 5 <!-- Configuration for starting up Jetty using inetd/xinetd --> 6 <!-- This feature requires at least Java 5 --> 7 <!-- --> 8 <!-- Making it a mixin for convenience, but note that if used --> 9 <!-- with jetty.xml, Jetty will use multiple connectors --> 10 <!-- =============================================================== --> 11 12 <!-- Sample xinetd configuration (restart xinetd after adding the configuration file) 13 14 service jetty 15 { 16 disable = no 17 18 id = jetty 19 type = UNLISTED 20 wait = yes 21 socket_type = stream 22 23 # change this 24 user = username 25 group = groupname 26 port = 2001 27 28 # sample script for running jetty as a service 29 # replace $JETTY_HOME with /path/to/jetty_home/ 30 server = $JETTY_HOME/bin/jetty-xinetd.sh 31 } 32 33 --> 34 35 <Configure id="Server" class="org.eclipse.jetty.server.Server"> 36 <Call name="addConnector"> 37 <Arg> 38 <!-- Inherited channel (from inetd/xinetd) --> 39 <New class="org.eclipse.jetty.server.nio.InheritedChannelConnector"> 40 41 42 <!-- Optional. Fallback in case System.inheritedChannel() does not give a ServerSocketChannel 43 <Set name="port"><Property name="jetty.service.port" default="8082"/></Set> 44 --> 45 46 <!-- sane defaults --> 47 <Set name="maxIdleTime">300000</Set> 48 <Set name="Acceptors">2</Set> 49 <Set name="statsOn">false</Set> 50 <Set name="lowResourcesConnections">20000</Set> 51 <Set name="lowResourcesMaxIdleTime">5000</Set> 52 </New> 53 </Arg> 54 </Call> 55 </Configure> 56 57