<web-app xmlns="http://caucho.com/ns/resin">
  <class-loader>
    <make-loader path="WEB-INF/classes">
      <ejb-doclet srcdir="WEB-INF/classes"/>
    </make-loader>

    <compiling-loader path="WEB-INF/classes"/>
  </class-loader>

  <!--
     - Configures the EJB server resource, using the
     - java:comp/env/jdbc/resin data source.
     -
     - The ejb-server defaults to java:comp/env/cmp, although
     - that can be changed with the 'name' attribute.
     -
     - ejb-server will pick up the WEB-INF/cmp-xbasic.ejb file
     - automatically.
    -->
  <ejb-server jndi-name="cmp">
    <config-directory>WEB-INF</config-directory>
    <data-source>jdbc/resin</data-source>
    <create-database-schema/>
  </ejb-server>

  <!--
     - Initializes the database.
    -->
  <servlet servlet-name="init"
	   servlet-class="example.InitServlet">
    <init data-source="jdbc/resin"/>
    <load-on-startup/>
  </servlet>

  <!--
     - Configures the basic servlet.
     -
     - This example uses a Resin extension for bean-style servlet
     - initialization.  Resin will call the setCourseHome method with
     - the course's home interface found using the JNDI lookup.
    -->
  <servlet servlet-name="basic"
	   servlet-class="example.CourseServlet">
    <init>
      <course-home>${jndi:lookup("cmp/xbasic_course")}</course-home>
    </init>
  </servlet>

  <servlet-mapping url-pattern="/xbasic" servlet-name="basic"/>
</web-app>
