Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

First step on Deployment plans for GeronimoV1.1

  • Introduction
  • Apache Geronimo v1.1 deployment Plans
  • Work out Deployment Plan with Samples
    (I will include the completed samples here)
    -Deploying and Undeploying Simple HelloWorld (war module,web.xml,geronimo-web.xml)
    -Deploying and Undeploying HelloWorld J2EE Samples(JAR containing EJB ,ejb-jar.xml,openejb.xml)
    -Deploying and Undeploying JCA sample with Geronimo

...

Every service,application or resource in Geronimo is configured with an xml deployment plan.Deployment plans are the Geronimo version of the J2EE deployment descriptors. They are still XML files based on XML schemas and containing the configuration details for a specific application module. Via the deployment plans you can not only deploy application modules but also other configurations such as a security realm etc..This is the First step on to geronimoV1.1 deployment plans which with cover very simple samples.Upcoming Next step of deployment plans will be ready for user users soon, which will provides you on complex and advance samples.This first steps will help for the beginers beginners of apache geronimo V1.1 to play with it.

Apache Geronimo V1.1 Deployment Plans

...

File

Standard Deployment Descriptors in the J2EE specification

Apache Geronimo specific Deployment plan

Web Application Archive (WAR)

web.xml under the WEB-INF directory

geronimo-web.xml

Enterprise Web application archive (EAR)

application.xml

geronimo-application.xml

J2EE Connector resources archive (RAR)

ra.xml

geronimo-ra.xml

J2EE client application archive (JAR)

client.xml

geronimo-application-client.xml

JAR containing EJBs

ejb-jar.xml under the META-INF directory

openejb-jar.xml

Work Out Deployment Plans with

...

Samples

Assumptions

It's assumed that you have installed the either tomcat or the jetty version of Geronimo V1.1 successfully and it is working. Please find the further details to get the software and install it.(need to direct the link to Installation Guide and the User Guide)

...

Code Block

<connector version="1.5" xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
    <dep:moduleId>
      <dep:groupId>com</dep:groupId>
      <dep:artifactId>ibm</dep:artifactId>
      <dep:version>j2g</dep:version>
      <dep:type>jca.rar</dep:type>
    </dep:moduleId>
    <dep:dependencies/>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <resourceadapter>
    <outbound-resourceadapter>
      <connection-definition>
        <connectionfactory-interface>com.ibm.j2g.jca.connector.FileRetrieverConnectionFactory</connectionfactory-interface>
        <connectiondefinition-instance>
          <name>FileRetriever</name>
          <!--The following path refers to the Geronimo home directory-->
          <config-property-setting name="RepositoryPath">..</config-property-setting>
          <connectionmanager>
            <no-transaction/>
            <no-pool/>
          </connectionmanager>
        </connectiondefinition-instance>
      </connection-definition>
    </outbound-resourceadapter>
  </resourceadapter>
</connector>

To deploy the adapter on Geronimo you also need a deployment plan specific to this server. Such a plan can be either named geronimo-ra.xml and be placed into the META-INF folder of the corresponding RAR archive, or can have any name and stay outside the archive. In the latter case, the path to the plan should be specified during the deployment of the resource adapter.
The deployment plan used by the sample application contains the repository path configuration parameter that may be updated before the deployment. Because of this, the jca-plan.xml file is not included in the RAR archive but it is placed into the <jca_home>/meta/geronimo directory instead. The content of this file is listed in the following example.

Code Block

<!--This is Geronimo-specific descriptor-->
<connector version="1.5" xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
    <dep:moduleId>
      <dep:groupId>com</dep:groupId>
      <dep:artifactId>ibm</dep:artifactId>
      <dep:version>j2g</dep:version>
      <dep:type>jca.rar</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>geronimo</dep:groupId>
        <dep:artifactId>geronimo-connector</dep:artifactId>
       <!-- <dep:type>car</dep:type>-->
      </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <resourceadapter>
    <outbound-resourceadapter>
      <connection-definition>
        <connectionfactory-interface>com.ibm.j2g.jca.connector.FileRetrieverConnectionFactory</connectionfactory-interface>
        <connectiondefinition-instance>
          <name>FileRetriever</name>
          <config-property-setting name="RepositoryPath">..</config-property-setting>
          <connectionmanager>
            <no-transaction/>
            <no-pool/>
          </connectionmanager>
        </connectiondefinition-instance>
      </connection-definition>
    </outbound-resourceadapter>
  </resourceadapter>
</connector>

In this deployment plan the attribute <dep:moduleId> </dep:moduleId>segment specifies the unique name com/ibm/j2g/jca.rar used to identify the RAR module in Geronimo and that this module is deployed on the server as a separate component.
The descriptor also:
Defines the FileRetriever name which looks up for the resource adapter factory.
Specifies that neither transactions nor connection pool are supported.
Provides value of the repository path configuration parameter.

Building the sample Application.

In order to build the modules of the File Retriever JCA application you need to update the build.properties file and property such as geronimo-home match your environment.

Next step is the deploying the rar application with Geronimo.
As stated in the previous examples user will have two choices of deploying an application with geronimo either Geronimo web console or command line.Here the command line option is described following.
From a command line, change directory to <jca_home> and type the following commands:
Deploying jca-plan.xml and rar

Code Block

java -jar <geronimo_home>/bin/deployer.jar --user system --password manager deploy meta/geronimo/jca-plan.xml jca.rar
Code Block

java -jar <geronimo_home>/bin/deployer.jar --user system --password manager deploy jca.war