You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2003/09/13 14:11:44 UTC

cvs commit: jakarta-cactus/samples/ejb/src/scripts/j2ee12 build.properties

vmassol     2003/09/13 05:11:43

  Added:       samples/ejb/src/webapp/j2ee13/WEB-INF web.xml cactus-web.xml
               samples/ejb build.xml build.properties.sample README
                        .cvsignore
               samples/ejb/src/webapp/j2ee12/WEB-INF cactus-web.xml web.xml
               samples/ejb/src/scripts/share build.xml
               samples/ejb/src/application/j2ee13 application.xml
               samples/ejb/src/java/share/org/apache/cactus/sample/ejb
                        Converter.java ConverterHome.java ConverterEJB.java
               samples/ejb/src/test-cactus/share/org/apache/cactus/sample/ejb
                        TestConverterEJB.java
               samples/ejb/src/scripts/j2ee13 build.properties
               samples/ejb/src/ejb ejb-jar.xml
               samples/ejb/src/application/j2ee12 application.xml
               samples/ejb/src/application/j2ee13/cactus application.xml
               samples/ejb/src/application/j2ee12/cactus application.xml
               samples/ejb/src/scripts/j2ee12 build.properties
  Log:
  First cut at the EJB sample. It is not yet working as I still need to add JNDI mappings for the different containers. Also ATM, only containers not requiring pre-EJB compilation will work (i.e. JBoss and Orion, WebLogic will fail).
  
  Revision  Changes    Path
  1.1                  jakarta-cactus/samples/ejb/src/webapp/j2ee13/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
  
  <web-app>
  </web-app>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/webapp/j2ee13/WEB-INF/cactus-web.xml
  
  Index: cactus-web.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
  
  <web-app>
  
      <!-- Put Cactus specific definitions here. Note that by default
           the <cactifywar> Ant task automatically adds Servlet, Filter
           and JSP redirector definitions and mappings. You only need
           to edit this file if you want to change these defaults or 
           add other definitions required for Cactus testing. -->
  
      <ejb-ref>
          <ejb-ref-name>ejb/Converter</ejb-ref-name>
          <ejb-ref-type>Session</ejb-ref-type>
          <home>org.apache.cactus.sample.ejb.ConverterHome</home>
          <remote>org.apache.cactus.sample.ejb.Converter</remote>
      </ejb-ref>
  
  </web-app>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE project [
    <!ENTITY common SYSTEM "file:../../build-common.xml">
  ]>
  
  <!--
    =============================================================================
      Build file for the Cactus EJB Sample subproject.
  
      $Id: build.xml,v 1.1 2003/09/13 12:11:43 vmassol Exp $
    =============================================================================
  -->
  <project name="Cactus EJB Sample" default="dist" basedir="../..">
  
    <description>
   Cactus EJB Sample
   ---------------------------------------------------------
   Sample EAR application that demonstrates how Cactus can
   be used using the Ant integration for unit testing EJB
   classes.
    </description>
  
    <!-- Base directory for all file related operations -->
    <property name="base.dir" location="${basedir}/samples/ejb"/>
  
    <!-- Indicate that this subproject is dependant on the version of the J2EE
         API available -->
    <property name="j2ee.dependant" value="true"/>
  
    <!-- Include properties and targets common to the different subprojects -->
    &common;
  
    <!-- Global project properties -->
    <property name="project.name.text" value="Cactus EJB Sample"/>
    <property name="project.name.file" value="cactus-sample-ejb"/>
  
    <!--
       ========================================================================
         Initialize source, target and dist properties
       ========================================================================
    -->
    <target name="properties">
  
      <!-- Set the properties related to the source tree -->
      <property name="src.dir" location="${base.dir}/src"/>
      <property name="src.java.dir" location="${src.dir}/java"/>
      <property name="src.cactus.dir" location="${src.dir}/test-cactus"/>
      <property name="src.script.dir" location="${src.dir}/scripts"/>
      <property name="src.webapp.dir" location="${src.dir}/webapp"/>
      <property name="src.ejb.dir" location="${src.dir}/ejb"/>
      <property name="src.application.dir" location="${src.dir}/application"/>
  
      <!-- Set the properties related to the target area -->
      <property name="target.sample.dir" location="${target.dir}/sample"/>
      <property name="target.sample.src.dir"
          location="${target.sample.dir}/src"/>
      <property name="target.sample.src.java.dir"
          location="${target.sample.src.dir}/java"/>
      <property name="target.sample.src.cactus.dir"
          location="${target.sample.src.dir}/test-cactus"/>
      <property name="target.sample.src.webapp.dir" 
          location="${target.sample.src.dir}/webapp"/>
      <property name="target.sample.src.ejb.dir" 
          location="${target.sample.src.dir}/ejb"/>
      <property name="target.sample.src.application.dir" 
          location="${target.sample.src.dir}/application"/>
      <property name="target.sample.lib.dir" 
          location="${target.sample.dir}/lib"/>
      <property name="target.test.dir" 
          location="${target.dir}/test"/>
  
    </target>
  
    <!--
       ========================================================================
         Initialize filters used in copy operations
       ========================================================================
    -->
    <target name="init.filters.clover"
        depends="init.common"
        if="clover.enable">
  
      <filterset id="clover.enablement">
        <filter token="clover.begin" value=""/>
        <filter token="clover.end" value=""/>
      </filterset>
  
    </target>
  
    <target name="init.filters.noclover"
        depends="init.common"
        unless="clover.enable">
  
      <filterset id="clover.enablement">
        <filter token="clover.begin" value="!-- "/>
        <filter token="clover.end" value=" --"/>
      </filterset>
  
    </target>
  
    <target name="init.filters.12" depends="init.common"
        unless="j2ee13.available">
  
      <filterset id="container.enablement">
        <filter token="j2ee12.begin" value=""/>
        <filter token="j2ee12.end" value=""/>
        <filter token="j2ee13.begin" value="!-- "/>
        <filter token="j2ee13.end" value=" --"/>
      </filterset>
  
    </target>
  
    <target name="init.filters.13" depends="init.common"
        if="j2ee13.available">
  
      <filterset id="container.enablement">
        <filter token="j2ee12.begin" value="!-- "/>
        <filter token="j2ee12.end" value=" --"/>
        <filter token="j2ee13.begin" value=""/>
        <filter token="j2ee13.end" value=""/>
      </filterset>
  
    </target>
  
    <target name="init.filters"
        depends="init.filters.clover, init.filters.noclover,
                 init.filters.12, init.filters.13">
  
      <!-- Copy scripts -->
      <basename property="j2ee.jar.name" file="${j2ee.jar}"/>
      <basename property="aspectjrt.jar.name" file="${aspectjrt.jar}"/>
      <basename property="commons.httpclient.jar.name"
          file="${commons.httpclient.jar}"/>
      <basename property="commons.logging.jar.name"
          file="${commons.logging.jar}"/>
      <basename property="junit.jar.name" file="${junit.jar}"/>
  
      <filterset id="jar.names">
        <filter token="j2ee.jar.name" value="${j2ee.jar.name}"/>
        <filter token="aspectjrt.jar.name" value="${aspectjrt.jar.name}"/>
        <filter token="cactus.ant.jar.name" value="${cactus.ant.jar.name}.jar"/>
        <filter token="cactus.jar.name" value="${cactus.jar.name}.jar"/>
        <filter token="commons.httpclient.jar.name"
            value="${commons.httpclient.jar.name}"/>
        <filter token="commons.logging.jar.name"
            value="${commons.logging.jar.name}"/>
        <filter token="junit.jar.name" value="${junit.jar.name}"/>
      </filterset>
  
      <filter token="project.name.file" value="${project.name.file}"/>
  
    </target>
  
    <!--
       ========================================================================
         Initialize the build. Must be called by all targets
       ========================================================================
    -->
    <target name="init" 
        depends="init.common, init.filters, properties">
  
      <echo>Dependencies:</echo>
      <echo>  aspectjrt.jar = [${aspectjrt.jar}]</echo>
      <echo>  cactus.jar = [${cactus.jar}]</echo>
      <echo>  cactus.ant.jar = [${cactus.ant.jar}]</echo>
      <echo>  commons.httpclient.jar = [${commons.httpclient.jar}]</echo>
      <echo>  commons.logging.jar = [${commons.logging.jar}]</echo>
      <echo>  j2ee.jar = [${j2ee.jar}]</echo>
      <echo>  junit.jar = [${junit.jar}]</echo>
      <echo>  log4j.jar = [${log4j.jar}]</echo>
      <echo/>
      <echo>Options:</echo>
      <echo>  clover.enable = ${clover.enable}</echo>
      <echo>  cactus.port = ${cactus.port}</echo>
  
      <condition property="properties.ok">
        <and>
          <available file="${aspectjrt.jar}"/>
          <available file="${cactus.jar}"/>
          <available file="${cactus.ant.jar}"/>
          <available file="${commons.httpclient.jar}"/>
          <available file="${commons.logging.jar}"/>
          <available file="${j2ee.jar}"/>
          <available file="${junit.jar}"/>
          <available file="${log4j.jar}"/>
  
          <!-- Verify that j2ee.jar contains ejb related classes -->
          <available classname="javax.ejb.EJBObject"
              classpath="${j2ee.jar}"/>
        </and>
      </condition>
  
      <fail unless="properties.ok">One or more required dependencies could not
  be resolved or is invalid. Please check you build.properties file, and run 
  Ant with the -verbose option for more details</fail>
  
    </target>
  
    <!--
        ========================================================================
          Generate the sample application
        ========================================================================
     -->
    <target name="sample.main" depends="init">
  
      <!-- Create output directory structure and copy sample files in it -->
      <mkdir dir="${target.sample.dir}"/>
      <mkdir dir="${target.sample.src.java.dir}"/>
      <mkdir dir="${target.sample.src.cactus.dir}"/>
      <mkdir dir="${target.sample.src.webapp.dir}"/>
      <mkdir dir="${target.sample.src.application.dir}"/>
  
      <!-- Copy src files -->
      <copy todir="${target.sample.src.java.dir}">
        <fileset dir="${src.java.dir}/share"/>
      </copy>
      <copy todir="${target.sample.src.cactus.dir}">
        <fileset dir="${src.cactus.dir}/share"/>
      </copy>
  
      <!-- Copy scripts -->
      <copy todir="${target.sample.dir}" filtering="on">
        <fileset dir="${src.script.dir}/share"/>
        <fileset dir="${src.script.dir}/j2ee${j2ee.api}"/>
        <filterset refid="clover.enablement"/>
        <filterset refid="container.enablement"/>
        <filterset refid="jar.names"/>
      </copy>
  
      <!-- Copy webapp files -->
      <copy todir="${target.sample.src.webapp.dir}">
        <fileset dir="${src.webapp.dir}/j2ee${j2ee.api}"/>
      </copy>
  
      <!-- Copy ejb files -->
      <copy todir="${target.sample.src.ejb.dir}">
        <fileset dir="${src.ejb.dir}"/>
      </copy>
  
      <!-- Copy EAR files -->
      <copy todir="${target.sample.src.application.dir}" filtering="on">
        <fileset dir="${src.application.dir}/j2ee${j2ee.api}"/>
      </copy>
  
      <!-- Copy README file -->
      <copy todir="${target.sample.dir}" file="${base.dir}/README"/>
  
    </target>
  
    <target name="sample.clover" depends="sample.main" if="clover.enable">
  
      <copy todir="${target.sample.lib.dir}" file="${clover.jar}"/>
  
    </target>
  
    <target name="sample" depends="sample.clover"
        description="Generate the sample application"/>
  
    <!--
       ========================================================================
         Run the full suite of tests on all defined containers.
       ========================================================================
    -->
    <target name="test.prepare"
        depends="sample">
  
      <condition property="test.cactus.jar" value="${cactus.clover.jar}">
        <isset property="clover.enable"/>
      </condition>
      <property name="test.cactus.jar" value="${cactus.jar}"/>
      <condition property="test.cactus.ant.jar"
          value="${cactus.ant.clover.jar}">
        <isset property="clover.enable"/>
      </condition>
      <property name="test.cactus.ant.jar" value="${cactus.ant.jar}"/>
  
      <mkdir dir="${target.test.dir}"/>
  
    </target>
    
    <target name="test" 
        depends="test.prepare"
        description="Run the tests on all defined servers">
  
      <ant dir="${target.sample.dir}" target="test">
        <property name="src.dir" location="${target.sample.src.dir}"/>
        <property name="src.java.dir"
            location="${target.sample.src.java.dir}"/>
        <property name="src.cactus.dir"
            location="${target.sample.src.cactus.dir}"/>
        <property name="src.webapp.dir"
            location="${target.sample.src.webapp.dir}"/>
        <property name="src.ejb.dir"
            location="${target.sample.src.ejb.dir}"/>
        <property name="src.application.dir"
            location="${target.sample.src.application.dir}"/>
        <property name="target.dir" location="${target.test.dir}"/>
        <property name="target.classes.dir"
            location="${target.test.dir}/classes"/>
        <property name="target.classes.java.dir"
            location="${target.test.dir}/classes/java"/>
        <property name="target.classes.cactus.dir"
            location="${target.test.dir}/classes/cactus"/>
        <property name="target.testreports.dir"
            location="${target.test.dir}/test-reports"/>
        <property name="cactus.jar" location="${test.cactus.jar}"/>
        <property name="cactus.ant.jar" location="${test.cactus.ant.jar}"/>
        <property name="j2ee.jar" value="${j2ee.jar}"/>
        <property name="clover.jar" value="${clover.jar}"/>
      </ant>
  
    </target>
  
    <!--
       ========================================================================
         Generate the distributable files
       ========================================================================
    -->
    <target name="dist" depends="checkstyle, test"
        description="Generate the distributable files">
  
      <mkdir dir="${dist.bin.dir}"/>
      <copy todir="${dist.bin.dir}">
        <fileset dir="${target.sample.dir}"/>
      </copy>
  
    </target>
  
    <!--
       ========================================================================
         Perform a code audit using CheckStyle. Only performs the audit if
         the checkstyle jar is in the Ant classpasth.
       ========================================================================
    -->
    <target name="checkstyle" depends="init,init.checkstyle" 
        if="checkstyle.available"
        description="Perform a code audit using Checkstyle">
  
      <mkdir dir="${target.dir}"/>
      <checkstyle config="./checkstyle.xml" failOnViolation="true">
        <fileset dir="${src.java.dir}">
          <include name="**/*.java"/>
        </fileset>
        <fileset dir="${src.cactus.dir}">
          <include name="**/*.java"/>
        </fileset>
        <formatter type="plain"/>
        <formatter type="xml" tofile="${target.dir}/checkstyle_results.xml"/>
        <property key="checkstyle.header.file" file="./LICENSE.cactus"/>
      </checkstyle>
  
    </target>
  
    <!--
       ========================================================================
         Clean generated files (including distributables)
       ========================================================================
    -->
    <target name="clean" depends="init.display,init.properties"
      description="Clean all generated files">
  
      <delete dir="${target.dir}"/>
      <delete dir="${dist.dir}"/>
  
    </target>
  
  </project>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  # -----------------------------------------------------------------------------
  # build.properties.sample
  #
  # This is an example "build.properties" file, used to customize building the
  # Cactus EJB Sample for your local environment.  Make any changes you need,
  # and rename this file to "build.properties" in the same directory that
  # contains the "build.xml" file.
  #
  # $Id: build.properties.sample,v 1.12 2003/09/12 11:54:43 vmassol Exp $
  # -----------------------------------------------------------------------------
  
  # WARNING:  The relative paths below are relative to the directory where the
  # build.xml file is located.
  
  # -----------------------------------------------------------------------------
  # Mandatory properties
  # -----------------------------------------------------------------------------
  
  # Location of all jars. Note: This is not a mandatory property. It is only
  # used here so that it can be reused when defining the location of all the jars
  # below. You do not have to put all the external jars in a single location.
  lib.repo = c:/apps/maven/repository
  
  # The location of the J2EE API jar. Depending on the version (1.2 or 1.3) of
  # it, the corresponding Cactus Sample will be built.
  j2ee.jar = ${lib.repo}/j2ee/jars/j2ee-1.3.jar
  
  # -----------------------------------------------------------------------------
  # Optional properties
  # -----------------------------------------------------------------------------
  
  # The port to use for starting the servers during unit testing. If not
  # specified, it defaults to port 8080.
  #cactus.port = 8081
  
  # EJB container locations for the tests
  
  # Note: If you don't want to run the test on a given servlet engine, just
  #       comment it's home property. For example, if you don't want to run the
  #       tests on JBoss 3.x, comment the "cactus.home.jboss3x" property.
  
  #cactus.home.orion1x = c:/Apps/orion-1.6.0
  #cactus.home.orion2x = c:/Apps/orion-2.0.2
  #cactus.home.jboss3x = c:/Apps/jboss-3.2.1
  #cactus.home.weblogic7x = c:/bea/weblogic700
  
  # Should we instrument our code with Clover (test coverage tool) ?
  # For this to work, the clover.jar needs to be in ANTHOME/lib.
  # Comment out to disable Clover (setting the property to false will have no
  # effect).
  #clover.enable = true
  
  # Clover jar
  clover.jar = ${ant.home}/lib/clover.jar
  
  
  
  1.1                  jakarta-cactus/samples/ejb/README
  
  Index: README
  ===================================================================
  This sample application demonstrates:
  - how to write Cactus test cases for EJBs
  - how to use the Ant Integration to deploy EARs from your own Ant build file
  
  
  
  1.1                  jakarta-cactus/samples/ejb/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  build.properties
  dist-12
  dist-13
  target-12
  target-13
  release-12
  release-13
  ant.bat
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/webapp/j2ee12/WEB-INF/cactus-web.xml
  
  Index: cactus-web.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
  
  <web-app>
  
      <!-- Put Cactus specific definitions here. Note that by default
           the <cactifywar> Ant task automatically adds Servlet
           and JSP redirector definitions and mappings. You only need
           to edit this file if you want to change these defaults or 
           add other definitions required for Cactus testing. -->
  
      <ejb-ref>
          <ejb-ref-name>ejb/Converter</ejb-ref-name>
          <ejb-ref-type>Session</ejb-ref-type>
          <home>org.apache.cactus.sample.ejb.ConverterHome</home>
          <remote>org.apache.cactus.sample.ejb.Converter</remote>
      </ejb-ref>
  
  </web-app>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/webapp/j2ee12/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
  
  <web-app>
  </web-app>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/scripts/share/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
    =============================================================================
      Build file for the Cactus EJB Sample subproject. It shows how to use
      Cactus for unit testing EJBs.
  
      The following Ant tasks need to be available in your ant installation (i.e.
      the Ant task themselves and their dependent jars need to be put in
      ANT_HOME/lib):
  
          junit                  [REQUIRED] JUnit Ant task
  
      Check the build.properties file to find out what properties need to be set
      in order to successfully run this script.
  
      This script should be started with the following command line:
  
          ant <target>
  
      Run "ant -projecthelp" to get a list of available targets.
    =============================================================================
  -->
  <project name="Cactus EJB Sample" default="dist" basedir=".">
  
      <!-- Give user a chance to override without editing this file
         (and without typing -D each time it compiles it) -->
    <property file="build.properties" />
    <property file="${user.home}/build.properties" />
  
    <!-- Global project properties -->
    <property name="project.name.text" value="Cactus EJB Sample"/>
    <property name="project.name.file" value="sample-ejb"/>
    <property name="project.version" value="@version@"/>
  
    <!-- Prefix to add to all distributable files -->
    <property name="project.prefix" value="jakarta-"/>
  
    <!-- Generic properties -->
    <property name="year" value="@year@"/>
    <property name="debug" value="on"/>
    <property name="optimize" value="off"/>
    <property name="deprecation" value="off"/>
  
    <!-- Properties for the Cactus tests -->
    <property name="cactus.port" value="8080"/>
  
    <!--
       ========================================================================
         Set the properties related to the source tree.
       ========================================================================
    -->
    <property name="src.dir" location="src"/>
    <property name="src.java.dir" location="${src.dir}/java"/>
    <property name="src.cactus.dir" location="${src.dir}/test-cactus"/>
    <property name="src.webapp.dir" location="${src.dir}/webapp"/>
    <property name="src.ejb.dir" location="${src.dir}/ejb"/>
    <property name="src.application.dir" location="${src.dir}/application"/>
  
    <!--
       ========================================================================
         Set the properties related to the target area
       ========================================================================
    -->
    <!-- Destination locations for the build -->
    <property name="target.dir" location="target"/>
    <property name="target.classes.dir" location="${target.dir}/classes"/>
    <property name="target.classes.java.dir"
        location="${target.classes.dir}/java"/>
    <property name="target.classes.cactus.dir"
        location="${target.classes.dir}/cactus"/>
    <property name="target.testreports.dir"
        location="${target.dir}/test-reports"/>
  
    <!-- Distribution directory, i.e. where the expanded distibutable files
         are located -->
    <property name="dist.dir" location="dist"/>
  
    <!--
       ========================================================================
         Set the properties related to the required libraries
       ========================================================================
    -->
  
    <!-- Libraries required for the sample project -->
    <property name="j2ee.jar"
        location="../../lib/@j2ee.jar.name@"/>
    <path id="project.classpath">
      <pathelement location="${j2ee.jar}"/>
    </path>
  
    <!-- Libraries required for the Cactus tests -->
    <property name="aspectjrt.jar"
        location="../../lib/@aspectjrt.jar.name@"/>
    <property name="cactus.jar"
        location="../../lib/@cactus.jar.name@"/>
    <property name="cactus.ant.jar"
        location="../../lib/@cactus.ant.jar.name@"/>
    <property name="commons.httpclient.jar"
        location="../../lib/@commons.httpclient.jar.name@"/>
    <property name="commons.logging.jar"
        location="../../lib/@commons.logging.jar.name@"/>
    <property name="junit.jar"
        location="../../lib/@junit.jar.name@"/>
    <path id="cactus.classpath">
      <path refid="project.classpath"/>
      <pathelement location="${aspectjrt.jar}"/>
      <pathelement location="${cactus.jar}"/>
      <pathelement location="${cactus.ant.jar}"/>
      <pathelement location="${commons.httpclient.jar}"/>
      <pathelement location="${commons.logging.jar}"/>
      <pathelement location="${junit.jar}"/>
    </path>
  
    <!--
       ========================================================================
         Initialize the build. Must be called by all targets
       ========================================================================
    -->
    <target name="init">
  
      <condition property="properties.ok">
        <and>
          <available file="${servlet.jar}"/>
        </and>
      </condition>
      <fail unless="properties.ok">Missing property or property pointing to an invalid file
  (check your build.properties file)</fail>
  
      <taskdef resource="cactus.tasks" classpathref="cactus.classpath"/>
  
      <tstamp/>
  
    </target>
  
    <!--
       ========================================================================
         Compiles the sources
       ========================================================================
    -->
    <!-- Compiles the java sources -->
    <target name="compile.java" depends="init">
  
      <mkdir dir="${target.classes.java.dir}"/>
      <javac destdir="${target.classes.java.dir}"
          deprecation="${deprecation}" optimize="${optimize}">
        <src path="${src.java.dir}"/>
        <classpath>
          <path refid="project.classpath"/>
        </classpath>
      </javac>
  
    </target>
  
    <!-- Compiles the Cactus test sources -->
    <target name="compile.cactus" depends="compile.java">
  
      <mkdir dir="${target.classes.cactus.dir}"/>
      <javac destdir="${target.classes.cactus.dir}"
          deprecation="${deprecation}" optimize="${optimize}">
        <src path="${src.cactus.dir}"/>
        <classpath>
          <path refid="cactus.classpath"/>
          <pathelement location="${target.classes.java.dir}"/>
        </classpath>
      </javac>
  
    </target>
  
    <target name="compile" depends="compile.java, compile.cactus"
        description="Compile the sources"/>
  
    <!--
       ========================================================================
         Create the runtime ejb-jar file.
       ========================================================================
    -->
    <target name="ejb" depends="compile.java"
        description="Generate the runtime ejb-jar">
  
      <!-- ATM, only support containers which do not need an ejb compilation
           step. For example: JBoss -->
      <jar jarfile="${target.dir}/${project.name.file}.jar">
        <fileset dir="${target.classes.java.dir}"/>
        <metainf dir="${src.ejb.dir}"/>
      </jar>
  
    </target>
  
    <!--
       ========================================================================
         Create the runtime ear file.
       ========================================================================
    -->
    <target name="ear" depends="ejb"
        description="Generate the runtime ear">
  
      <ear earfile="${target.dir}/${project.name.file}.ear"
          appxml="${src.application.dir}/application.xml">
        <fileset file="${target.dir}/${project.name.file}.jar"/>
      </ear>
  
    </target>
  
    <!--
       ========================================================================
         Generate the distributable files
       ========================================================================
    -->
    <target name="dist" depends="clean, ear, test"
        description="Generate the distributable files">
  
      <copy todir="${dist.dir}"
          file="${target.dir}/${project.name.file}.ear"/>
  
    </target>
  
    <!--
       ========================================================================
         Clean generated files (including distributables)
       ========================================================================
    -->
    <target name="clean" depends="init" description="Clean all generated files">
  
      <delete dir="${target.dir}"/>
      <delete dir="${dist.dir}"/>
  
    </target>
  
    <!--
       ========================================================================
         Create the war file that will hold the Cactus tests. At this point in
         time, as there isn't a <cactifyear> Ant task, we need to create
         manually a war file even if our application doesn't need one.
       ========================================================================
    -->
    <target name="test.war" depends="compile.cactus">
  
      <war warfile="${target.dir}/${project.name.file}.war"
           webxml="${src.webapp.dir}/WEB-INF/web.xml"/>
  
      <!-- Cactify the web-app archive -->
      <cactifywar srcfile="${target.dir}/${project.name.file}.war"
          destfile="${target.dir}/test.war"
          mergewebxml="${src.webapp.dir}/WEB-INF/cactus-web.xml">
        <classes dir="${target.classes.cactus.dir}"/>
        <!-- Needed for Clover coverage reports -->
        <@clover.begin@lib file="${clover.jar}"/@clover.end@>
      </cactifywar>
  
      <!-- Cactify the EAR -->    
      <ear earfile="${target.dir}/test.ear"
          appxml="${src.application.dir}/cactus/application.xml">   
        <zipfileset excludes="META-INF/application.xml"
            src="${target.dir}/${project.name.file}.ear"/>
        <fileset file="${target.dir}/test.war"/>
      </ear>
          
    </target>
  
    <!--
       ========================================================================
         Run the tests on the containers for which the Ant property
         "cactus.home.[container name]" has been defined.
       ========================================================================
    -->
    <target name="test.prepare" depends="ear, test.war">
    
      <!-- Prepare the directories for the JUnit reports -->
      <mkdir dir="${target.testreports.dir}"/>
      <@j2ee13.begin@mkdir dir="${target.testreports.dir}/jboss3x"/@j2ee13.end@>
      <mkdir dir="${target.testreports.dir}/orion1x"/>
      <mkdir dir="${target.testreports.dir}/orion2x"/>
      <mkdir dir="${target.testreports.dir}/weblogic7x"/>
  
    </target>
  
    <target name="test" depends="test.prepare"
        description="Run the tests on the defined containers">
  
      <!-- Run the tests -->
      <cactus earfile="${target.dir}/test.ear" fork="yes"
          failureproperty="tests.failed">
        <classpath>
          <path refid="project.classpath"/>
          <@clover.begin@pathelement location="${clover.jar}"/@clover.end@>
          <pathelement location="${target.classes.java.dir}"/>
          <pathelement location="${target.classes.cactus.dir}"/>
        </classpath>
        <containerset>
          <@j2ee13.begin@jboss3x if="cactus.home.jboss3x"
              dir="${cactus.home.jboss3x}"
              output="${target.testreports.dir}/jboss3x.out"
              todir="${target.testreports.dir}/jboss3x"/@j2ee13.end@>
          <orion1x if="cactus.home.orion1x"
              dir="${cactus.home.orion1x}" port="${cactus.port}"
              output="${target.testreports.dir}/orion1x.out"
              todir="${target.testreports.dir}/orion1x"/>
          <orion2x if="cactus.home.orion2x"
              dir="${cactus.home.orion2x}" port="${cactus.port}"
              output="${target.testreports.dir}/orion2x.out"
              todir="${target.testreports.dir}/orion2x"/>
          <weblogic7x if="cactus.home.weblogic7x"
              dir="${cactus.home.weblogic7x}" port="${cactus.port}"
              output="${target.testreports.dir}/weblogic7x.out"
              todir="${target.testreports.dir}/weblogic7x"/>
        </containerset>
        <formatter type="brief" usefile="false"/>
        <formatter type="xml"/>
        <batchtest>
          <fileset dir="${src.cactus.dir}">
            <include name="**/Test*.java"/>
            <exclude name="**/Test*All.java"/>
          </fileset>
        </batchtest>
      </cactus>
  
      <!-- Generate the JUnit reports -->
      <@j2ee13.begin@junitreport todir="${target.testreports.dir}/jboss3x">
        <fileset dir="${target.testreports.dir}/jboss3x"
            includes="TEST-*.xml"/>
        <report todir="${target.testreports.dir}/jboss3x"
            format="frames"/>
      </junitreport@j2ee13.end@>
      <junitreport todir="${target.testreports.dir}/orion1x">
        <fileset dir="${target.testreports.dir}/orion1x"
            includes="TEST-*.xml"/>
        <report todir="${target.testreports.dir}/orion1x"
            format="frames"/>
      </junitreport>
      <junitreport todir="${target.testreports.dir}/orion2x">
        <fileset dir="${target.testreports.dir}/orion2x"
            includes="TEST-*.xml"/>
        <report todir="${target.testreports.dir}/orion2x"
            format="frames"/>
      </junitreport>
      <junitreport todir="${target.testreports.dir}/weblogic7x">
        <fileset dir="${target.testreports.dir}/weblogic7x"
            includes="TEST-*.xml"/>
        <report todir="${target.testreports.dir}/weblogic7x"
            format="frames"/>
      </junitreport>
  
      <fail if="tests.failed">At least one test failed!</fail>
  
    </target>
  
  </project>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/application/j2ee13/application.xml
  
  Index: application.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!DOCTYPE application
    PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN'
    'http://java.sun.com/j2ee/dtds/application_1_3.dtd'>
  
  <application>
    <display-name>cactus-sample-ejb</display-name>
    <description>Cactus EJB Sample for J2EE 1.3</description>
    <module>
      <ejb>@project.name.file@.jar</ejb>
    </module>
  </application>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/java/share/org/apache/cactus/sample/ejb/Converter.java
  
  Index: Converter.java
  ===================================================================
  /*
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
   *    Foundation" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.cactus.sample.ejb;
  
  import java.rmi.RemoteException;
  
  import javax.ejb.EJBObject;
  
  /**
   * Sample EJB interface
   *
   * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
   * 
   * @version $Id: Converter.java,v 1.1 2003/09/13 12:11:43 vmassol Exp $
   */
  public interface Converter extends EJBObject
  {
      /**
       * Convert Yens to US dollars.
       * 
       * @param theYenAmount the amount to convert
       * @return the conversion in US dollars
       * @throws RemoteException in case of error
       */
      double convertYenToDollar(double theYenAmount) 
          throws RemoteException;
  }
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/java/share/org/apache/cactus/sample/ejb/ConverterHome.java
  
  Index: ConverterHome.java
  ===================================================================
  /*
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
   *    Foundation" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.cactus.sample.ejb;
  
  import java.rmi.RemoteException;
  
  import javax.ejb.CreateException;
  import javax.ejb.EJBHome;
  
  /**
   * Sample EJB home interface
   *
   * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
   * 
   * @version $Id: ConverterHome.java,v 1.1 2003/09/13 12:11:43 vmassol Exp $
   */
  public interface ConverterHome extends EJBHome
  {
      /**
       * @see EJB specifications
       */
      Converter create() throws RemoteException, CreateException;
  }
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/java/share/org/apache/cactus/sample/ejb/ConverterEJB.java
  
  Index: ConverterEJB.java
  ===================================================================
  /*
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
   *    Foundation" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.cactus.sample.ejb;
  
  import javax.ejb.CreateException;
  import javax.ejb.SessionBean;
  import javax.ejb.SessionContext;
  
  /**
   * Sample EJB bean.
   *
   * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
   * 
   * @version $Id: ConverterEJB.java,v 1.1 2003/09/13 12:11:43 vmassol Exp $
   */
  public class ConverterEJB implements SessionBean
  {
      /**
       * Session bean context
       */
      private SessionContext context;
  
      /**
       * @see Converter#convertYenToDollar(double)
       */
      public double convertYenToDollar(double theYenAmount)
      {
          return theYenAmount / 100.0;
      }
  
      /**
       * @see EJB specifications 
       */
      public void ejbCreate() throws CreateException
      {
      }
  
      /**
       * @see EJB specifications 
       */
      public void setSessionContext(SessionContext theContext)
      {
          this.context = theContext;
      }
  
      /**
       * @see SessionBean#ejbActivate()
       */
      public void ejbActivate()
      {
      }
  
      /**
       * @see SessionBean#ejbPassivate()
       */
      public void ejbPassivate()
      {
      }
  
      /**
       * @see SessionBean#ejbRemove()
       */
      public void ejbRemove()
      {
      }
  }
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/test-cactus/share/org/apache/cactus/sample/ejb/TestConverterEJB.java
  
  Index: TestConverterEJB.java
  ===================================================================
  /*
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Cactus" and "Apache Software
   *    Foundation" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.cactus.sample.ejb;
  
  import javax.naming.Context;
  import javax.naming.InitialContext;
  import javax.rmi.PortableRemoteObject;
  
  import org.apache.cactus.ServletTestCase;
  
  /**
   * Sample Cactus test for a session bean.
   *
   * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
   * 
   * @version $Id: TestConverterEJB.java,v 1.1 2003/09/13 12:11:43 vmassol Exp $
   */
  public class TestConverterEJB extends ServletTestCase
  {
      /**
       * Class under test
       */
      private Converter converter;
  
      /**
       * @see TestCase#setUp()
       */ 
      public void setUp() throws Exception
      {
          Context ctx = new InitialContext();
          ConverterHome home = (ConverterHome) PortableRemoteObject.narrow(
              ctx.lookup("java:comp/ejb/Converter"), ConverterHome.class);
          this.converter = home.create();
      }
  
      /**
       * Verify yen to dollars conversion works.
       * @throws Exception on error
       */
      public void testConvert() throws Exception
      {
          double dollar = this.converter.convertYenToDollar(100.0);
          assertEquals("dollar", 1.0, dollar, 0.01);
      }
  }
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/scripts/j2ee13/build.properties
  
  Index: build.properties
  ===================================================================
  # -----------------------------------------------------------------------------
  # build.properties
  # 
  # Use this file to ajust the build of the Cactus EJB Sample to your local
  # environment. Specifically, you will want to define the installation
  # directory of any container you want to test against in this file, or the
  # port on which the containers will be started.
  # 
  # $Id: build.properties,v 1.1 2003/09/13 12:11:43 vmassol Exp $
  # -----------------------------------------------------------------------------
  
  # WARNING:  The relative paths below are relative to the directory where the
  # build.xml file is located.
  
  # -----------------------------------------------------------------------------
  # Mandatory properties
  # -----------------------------------------------------------------------------
  
  # The location of the J2EE 1.3 jar
  j2ee.jar = ../../lib/@j2ee.jar.name@
  
  # -----------------------------------------------------------------------------
  # Optional properties
  # -----------------------------------------------------------------------------
  
  # The port to use for starting the servers during unit testing. If not
  # specified, it defaults to port 8080.
  #cactus.port = 8081
  
  # J2EE containers for the tests
  
  # Note: If you don't want to run the test on a given servlet engine, just
  #       comment it's home property. For example, if you don't want to run the
  #       tests on JBoss 3.x, comment the "cactus.home.jboss3x" property.
  
  #cactus.home.orion1x = c:/Apps/orion-1.6.0
  #cactus.home.orion2x = c:/Apps/orion-2.0.2
  #cactus.home.jboss3x = c:/Apps/jboss-3.2.1
  #cactus.home.weblogic7x = c:/bea/weblogic700
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/ejb/ejb-jar.xml
  
  Index: ejb-jar.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!DOCTYPE ejb-jar PUBLIC
  '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN'
  'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
  
  <ejb-jar>
    <display-name>cactus-sample-ejb</display-name>
    <enterprise-beans>
      <session>
        <description>Converter Session Bean</description>
        <display-name>Converter</display-name>
        <ejb-name>Converter</ejb-name>
        <home>org.apache.cactus.sample.ejb.ConverterHome</home>
        <remote>org.apache.cactus.sample.ejb.Converter</remote>
        <ejb-class>org.apache.cactus.sample.ejb.ConverterEJB</ejb-class>
        <session-type>Stateless</session-type>
        <transaction-type>Container</transaction-type>
      </session>
    </enterprise-beans>
    <assembly-descriptor>
      <container-transaction>
        <method>
          <ejb-name>Converter</ejb-name>
          <method-intf>Remote</method-intf>
          <method-name>*</method-name>
        </method>
        <trans-attribute>NotSupported</trans-attribute>
      </container-transaction>
    </assembly-descriptor>
  </ejb-jar>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/application/j2ee12/application.xml
  
  Index: application.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!DOCTYPE application
    PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN'
    'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
  
  <application>
    <display-name>cactus-sample-ejb</display-name>
    <description>Cactus EJB Sample for J2EE 1.2</description>
    <module>
      <ejb>@project.name.file@.jar</ejb>
    </module>
  </application>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/application/j2ee13/cactus/application.xml
  
  Index: application.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!DOCTYPE application
    PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN'
    'http://java.sun.com/j2ee/dtds/application_1_3.dtd'>
  
  <!-- TODO: In the future you won't have to create a specific
       application.xml in which you have to declare a Cactus test
       war if you don't have a war in your EAR -->
       
  <application>
    <display-name>cactus-sample-ejb</display-name>
    <description>Cactus EJB Sample for J2EE 1.3</description>
    <module>
      <ejb>@project.name.file@.jar</ejb>
    </module>
    <module>
      <web>
        <web-uri>test.war</web-uri>
        <context-root>/test</context-root>
      </web>
    </module>
  </application>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/application/j2ee12/cactus/application.xml
  
  Index: application.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!DOCTYPE application
    PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN'
    'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
  
  <!-- TODO: In the future you won't have to create a specific
       application.xml in which you have to declare a Cactus test
       war if you don't have a war in your EAR -->
       
  <application>
    <display-name>cactus-sample-ejb</display-name>
    <description>Cactus EJB Sample for J2EE 1.2</description>
    <module>
      <ejb>@project.name.file@.jar</ejb>
    </module>
    <module>
      <web>
        <web-uri>test.war</web-uri>
        <context-root>test</context-root>
      </web>
    </module>
  </application>
  
  
  
  1.1                  jakarta-cactus/samples/ejb/src/scripts/j2ee12/build.properties
  
  Index: build.properties
  ===================================================================
  # -----------------------------------------------------------------------------
  # build.properties
  #
  # Use this file to ajust the build of the Cactus EJB Sample to your local
  # environment. Specifically, you will want to define the installation
  # directory of any container you want to test against in this file, or the
  # port on which the containers will be started.
  #
  # $Id: build.properties,v 1.1 2003/09/13 12:11:43 vmassol Exp $
  # -----------------------------------------------------------------------------
  
  # WARNING:  The relative paths below are relative to the directory where the
  # build.xml file is located.
  
  # -----------------------------------------------------------------------------
  # Mandatory properties
  # -----------------------------------------------------------------------------
  
  # The location of the J2EE 1.2 jar
  j2ee.jar = ../../lib/@j2ee.jar.name@
  
  # -----------------------------------------------------------------------------
  # Optional properties
  # -----------------------------------------------------------------------------
  
  # The port to use for starting the servers during unit testing. If not
  # specified, it defaults to port 8080.
  #cactus.port = 8081
  
  # J2EE containers for the tests
  
  # Note: If you don't want to run the test on a given servlet engine, just
  #       comment it's home property. For example, if you don't want to run the
  #       tests on JBoss 3.x, comment the "cactus.home.jboss3x" property.
  
  #cactus.home.orion1x = c:/Apps/orion-1.6.0
  #cactus.home.orion2x = c:/Apps/orion-2.0.2
  #cactus.home.weblogic7x = c:/bea/weblogic700