Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update docs slightly.

...

No Format
borderStylesolid
|- calculator-stateless-ear-2.0-SNAPSHOT.ear
   |- META-INF
      |- application.xml
      |- geronimo-application.xml
   |- calculator-stateless-ejb-2.0-SNAPSHOT.jar
   |- calculator-stateless-war-2.0-SNAPSHOT.war

application.xml: The JAR file is referenced to provide the functionality of this deployable. The WAR file is referenced in order to show the usage of this deployable through a web based interface. The context-root is set to be /calculator-stateless so that the URL for this application will be http://<hostname>:<port>/calculator-stateless. This is generated by maven during the build and may be found in the ear or at calculator-stateless-ear/target/application.xml. The versions will vary depending on the source code version.

Code Block
xml
xml
borderStylesolid
titleapplication.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
             version="5">
    <description>Geronimo Sample EAR for Stateless Session</description>
    <display-name>Geronimo Sample EAR for Stateless Session</display-name>
    <module>
        <web>
            <web-uri>calculator-stateless-war-2.02-SNAPSHOT.war</web-uri>
            <context-root>/calculator-stateless</context-root>
        </web>
    </module>
    <module>
        <ejb>calculator-stateless-ejb-2.02-SNAPSHOT.jar</ejb>
    </module>
</application>

geronimo-applicationplan.xml: Information about the project (e.g. module's unique identification, any dependencies) is described inside the <environment> tag. In this case, there are no dependencies so there is nothing to be listed. However, it is a good idea to give this module some sort of unique identification, so that it can later be referenced by some other deployable applicationA Geronimo plan is not needed for standalone deployment of this application but is recommended to fix the module id. This example is completed by the car-maven-plugin in calculator-stateless-jetty. The dependencies are not actually needed for standalone deployment.

Code Block
xml
xml
borderStylesolid
titlegeronimo-applicationplan.xml
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">

    <environment<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <dep:moduleId>
     <moduleId> <dep:groupId>org.apache.geronimo.samples</dep:groupId>
      <dep:artifactId>calculator-stateless-jetty</dep:artifactId>
      <groupId>${pom.groupId}</groupId><dep:version>2.2-SNAPSHOT</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <artifactId>${pom.artifactId}</artifactId><dep:dependencies>
      <dep:dependency>
      <version>${version}</version>
  <dep:groupId>org.apache.geronimo.configs</dep:groupId>
        <dep:artifactId>jasper</dep:artifactId>
        <type>ear</type><dep:version>2.2-SNAPSHOT</dep:version>
        </moduleId>
<dep:type>car</dep:type>
      </environment>dep:dependency>
      <dep:dependency>
        <module><dep:groupId>org.apache.geronimo.configs</dep:groupId>
        <web>calculator-stateless-war-${version}.war</web><dep:artifactId>jetty6</dep:artifactId>
        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2"><dep:version>2.2-SNAPSHOT</dep:version>
        <dep:type>car</dep:type>
      </dep:dependency>
      <dep:dependency>
        <dep:groupId>org.apache.geronimo.configs</dep:groupId>
        <dep:artifactId>openjpa</dep:artifactId>
        <context-root>/calculator-stateless</context-root><dep:version>2.2-SNAPSHOT</dep:version>
        </web-app>
<dep:type>car</dep:type>
      </module>dep:dependency>
      
</application>

Installation instructions

...

<dep:dependency>
        <dep:groupId>org.apache.geronimo.configs</dep:groupId>
        <dep:artifactId>openejb</dep:artifactId>
        <dep:version>2.2-SNAPSHOT</dep:version>
        <dep:type>car</dep:type>
      </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
</application>