<!-- Configuration file for Resin on developers machine -->
<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="http://caucho.com/ns/resin/core">
  <!-- Logging configuration for the JDK logging API. -->
  <log name="" level="info" path="stdout:" timestamp="[%H:%M:%S.%s] "/>
  <log name="com.caucho.java" level="config" path="stdout:" timestamp="[%H:%M:%S.%s] "/>
  <log name="com.caucho.loader" level="config" path="stdout:" timestamp="[%H:%M:%S.%s] "/>

  <!-- On dev machines, reload classes/WARs ever 2 seconds -->
  <dependency-check-interval>2s</dependency-check-interval>

  <!-- Use JDK 1.5 compiler -->
  <javac compiler="javac" args="" />

  <!-- Security providers.
     - <security-provider>
     -    com.sun.net.ssl.internal.ssl.Provider
     - </security-provider>
    -->

  <!-- Configures threads shared among all HTTP and SRUN ports. -->
  <thread-pool>
    <!-- Maximum number of threads. -->
    <thread-max>128</thread-max>
      
    <!-- Minimum number of spare connection threads. -->
    <spare-thread-min>25</spare-thread-min>
  </thread-pool>

  <server>
    <!-- adds all .jar files under the resin/lib directory -->
    <class-loader>
      <tree-loader path="${resin.home}/lib"/>
      <tree-loader path="${resin.rootDirectory}/lib"/>
    </class-loader>

    <!-- Configures the keepalive -->
    <keepalive-max>500</keepalive-max>
    <keepalive-timeout>120s</keepalive-timeout>

    <!-- The http port -->
    <http server-id="" host="*" port="80"/>

    <http port="443">
      <jsse-ssl>
         <key-store-type>jks</key-store-type>
         <key-store-file>keys/foo.keystore</key-store-file>
         <password>xxx</password>
       </jsse-ssl>
    </http>
     
    <!-- The local cluster, used for load balancing and distributed backup. -->
    <cluster>
      <srun server-id="" host="127.0.0.1" port="6802"/>
    </cluster>

    <!-- Enables/disables exceptions when the browser closes a connection. -->
    <ignore-client-disconnect>true</ignore-client-disconnect>

    <!-- Enables the cache (available in Resin Professional) -->
    <resin:if test="${isResinProfessional}">
      <cache path="cache" memory-size="8M"/>
    </resin:if>

    <!--
       - Enables periodic checking of the server status.
       -
       - With JDK 1.5, this will ask the JDK to check for deadlocks.
       - All servers can add <url>s to be checked.
      -->
    <resin:if test="${isResinProfessional}">
      <ping>
        <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
      </ping>
    </resin:if>

    <persistent-store type="file">
      <init>
        <path>c:/temp/resin-sessions</path>
        <always-save>true</always-save>
      </init>
    </persistent-store>
    
    <!--
       - Defaults applied to each web-app.
      -->
    <web-app-default>
      <!-- Sets timeout values for cacheable pages, e.g. static pages. -->
      <!-- <cache-mapping url-pattern="/" expires="5s"/> -->
      <cache-mapping url-pattern="*.gif" expires="60s"/>
      <cache-mapping url-pattern="*.jpg" expires="60s"/>

      <!-- Servlet to use for directory display. -->
      <servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet"/>

      <!-- Enable EL expressions in Servlet and Filter init-param -->
      <allow-servlet-el/>
      
      <!-- Make sure JSTL-EL is enabled by default -->
      <jsp el-ignored="false" />
    </web-app-default>

    <!--
       - Default host configuration applied to all virtual hosts.
      -->
    <host-default>
      <class-loader>
        <compiling-loader path="webapps/WEB-INF/classes"/>
        <library-loader path="webapps/WEB-INF/lib"/>
      </class-loader>

      <access-log path="logs/access.log" format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period="1W"/>

      <!-- creates the webapps directory for .war expansion -->
      <web-app-deploy path="webapps"/>
    </host-default>

    <!-- includes the web-app-default for default web-app behavior -->
    <resin:import path="${resinHome}/conf/app-default.xml"/>

    <!-- configures the default host, matching any host name -->
    <host id="" root-directory=".">
      <!-- configures an explicit root web-app matching the webapp's ROOT -->
      <web-app id="/" document-directory="L:\sandbox\exder\web">
        <database>
          <jndi-name>jdbc/exder</jndi-name>
          <driver>
            <type>com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource</type>
            <url>jdbc:mysql://localhost:3306/SYSTEM?jdbcCompliantTruncation=false</url>
            <user>foo</user>
            <password>xxx</password>
          </driver>
          <spy>false</spy>
        </database>

        <session-config>
          <use-persistent-store />
          <session-max>4096</session-max>
          <session-timeout>30</session-timeout>
        </session-config>    
      </web-app>
    </host>
  </server>
</resin>