ianheggie/cruisecontrol.rb

View on GitHub
server_jar/jetty-config/etc/jetty.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<!-- =============================================================== -->
<!-- Configure the Jetty Server                                      -->
<!--                                                                 -->
<!-- Documentation of this file format can be found at:              -->
<!-- http://docs.codehaus.org/display/JETTY/jetty.xml                -->
<!--                                                                 -->
<!-- =============================================================== -->
<Configure id="Server" class="org.mortbay.jetty.Server">

  <!-- =========================================================== -->
  <!-- Server Thread Pool                                          -->
  <!-- =========================================================== -->
  <Set name="ThreadPool">

    <New class="org.mortbay.thread.QueuedThreadPool">
      <Set name="minThreads">10</Set>
      <Set name="maxThreads">200</Set>
      <Set name="lowThreads">20</Set>
    </New>

    <!-- Optional Java 5 bounded threadpool with job queue 
      <New class="org.mortbay.thread.concurrent.ThreadPool">
        <Set name="corePoolSize">50</Set>
        <Set name="maximumPoolSize">50</Set>
      </New>
      -->
    </Set>



    <!-- =========================================================== -->
    <!-- Set connectors                                              -->
    <!-- =========================================================== -->
    <!-- One of each type!                                           -->
    <!-- =========================================================== -->

    <!-- Use this connector for many frequently idle connections
         and for threadless continuations.
    -->    
    <Call name="addConnector">
      <Arg>
        <New class="org.mortbay.jetty.nio.SelectChannelConnector">
          <Set name="host"><SystemProperty name="ccrb.host" /></Set>
          <Set name="port"><SystemProperty name="ccrb.port" default="3333"/></Set>
          <Set name="maxIdleTime">30000</Set>
          <Set name="Acceptors">2</Set>
          <Set name="statsOn">false</Set>
          <Set name="confidentialPort">8443</Set>
          <Set name="lowResourcesConnections">5000</Set>
          <Set name="lowResourcesMaxIdleTime">5000</Set>
        </New>
      </Arg>
    </Call>

    <!-- =========================================================== -->
    <!-- Set handler Collection Structure                            --> 
    <!-- =========================================================== -->
    <Set name="handler">
      <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
        <Set name="handlers">
          <Array type="org.mortbay.jetty.Handler">
            <Item>
              <New id="WebAppContext" class="org.mortbay.jetty.webapp.WebAppContext">
                <Set name="contextPath"><SystemProperty name="ccrb.context.path" default="/"/></Set>
                <Set name="descriptor"><SystemProperty name="ccrb.jetty.web.xml" default="WEB-INF/web.xml"/></Set>
                <Set name="war"><SystemProperty name="ccrb.jetty.war.location" default="."/></Set>
                <Set name="tempDirectory"><SystemProperty name="ccrb.jetty.workdir" default="."/></Set>
                <Get name="sessionHandler">
                  <Get name="sessionManager">
                    <Set name="usingCookies" type="boolean">false</Set>
                  </Get>
                </Get>
              </New>
            </Item>
            <Item>
              <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
            </Item>
            


            <!-- =========================================================== -->
            <!-- Configure Request Log                                       -->
            <!-- Request logs  may be configured for the entire server here, -->
            <!-- or they can be configured for a specific web app in a       -->
            <!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
            <!-- for an example).                                            -->
            <!-- =========================================================== -->
            <!-- <Item>
              <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler">
                <Set name="requestLog">
                  <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
                    <Set name="filename"><SystemProperty name="ccrb.log.dir" default="log"/>/request-yyyy_mm_dd.log</Set>
                    <Set name="filenameDateFormat">yyyy_MM_dd</Set>
                    <Set name="retainDays">90</Set>
                    <Set name="append">true</Set>
                    <Set name="extended">false</Set>
                    <Set name="logCookies">false</Set>
                    <Set name="LogTimeZone">GMT</Set>
                  </New>
                </Set>
              </New>
            </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>