Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}

Anchor
top
top

First step on Deployment plans for Geronimo v1.

...

2

-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

Introduction
Anchor
intro
intro

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 in Geronimo v1.1 2 deployment plans which with cover a simple sample.
The next step of deployment plan will be ready for users soon, which will provide you with complex and advance samples.This first step will help beginners of Apache Geronimo v1.1 2 get an insight.

Apache Geronimo v1.

...

2 Deployment Plans

The following table illustrates the deployment descriptors name and file location for both standard J2EE and Apache Geronimo specific.

...

It is assumed that you have installed the either Tomcat or the Jetty version of Geronimo v1.1 2 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)

...

No Format
borderStylesolid
titleHelloWorld.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>HelloWorld!</title>
</head>
<body bgcolor="#707DB8">
     <h1>
        <font face="courier" color="white">
                 Hello world from GERONIMO V1.12!
         </font>
       </h1>
          <font face="courier" color="white"> ${datetime}</font>
</html>

...

5.Open a new text file and save it as "geronimo-web.xml" and this is the Apache Geronimo v1.1 2 deployment plan for this sample module.
6.Copy and paste the following xml code in that file and save it inside the <app_home\WEB-INF> directory.

No Format
borderStylesolid
titlegeronimo-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.12">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.12">
    <dep:moduleId>
      <dep:groupId>geronimo</dep:groupId>
      <dep:artifactId>HelloWorld</dep:artifactId>
      <dep:version>1.1</dep:version>
      <dep:type>war</dep:type>
    </dep:moduleId>
  </dep:environment>

  <context-root>/hello</context-root>
</web-app>

...

No Format
borderStylesolid
titleejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
  <enterprise-beans>
    <session>
      <ejb-name>HelloBean</ejb-name>
      <home>org.geronimo.ejbsample.HelloHome</home>
      <remote>org.geronimo.ejbsample.HelloObject</remote>
      <ejb-class>org.geronimo.ejbsample.HelloBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
    </session>
  </enterprise-beans>
  <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>HelloBean</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
</ejb-jar>

Geronimo v1.1 2 deployment plan for the above sample

No Format
borderStylesolid
titleopenejb.jar
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.12">
    <dep:moduleId>
      <dep:groupId>org.geronimo.</dep:groupId>
      <dep:artifactId>ejbsample</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies/>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <enterprise-beans>
    <session>
      <ejb-name>HelloBean</ejb-name>
      <jndi-name>org.geronimo.ejbsample.HomeBean</jndi-name>
    </session>
  </enterprise-beans>
</openejb-jar>

...

*Image needed to be upload.

Deploying the EAR Application On Geronimo v1.

...

2

This sample application gives you an overview of basic steps to deploy an EAR application in Geronimo v1.12.
Though this is a simple application it helps new users to understand the basics of Geronimo v1.1 specific deployment plan for an EAR and move on to work with complex applications. In this sample ,Servelts are used in the back end while JSP is used in the front end.
The following diagram depicts the folder structure

...

No Format
borderStylesolid
titlegeronimo-application.xml
<application application-name="HelloWorldEar"
              xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.12" 
              xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.12" 
              xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.12">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>default</sys:groupId>
      <sys:artifactId>HelloWorldEar_HelloWorldEar</sys:artifactId>
      <sys:version>1-default</sys:version>
      <sys:type>car</sys:type>
    </sys:moduleId>
    <sys:dependencies/>
    <sys:hidden-classes/>
    <sys:non-overridable-classes/>
  </sys:environment>
</application>

...

No Format
borderStylesolid
titleweb.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.12">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.12">
    <dep:moduleId>
      <dep:groupId>geronimo</dep:groupId>code
      <dep:artifactId>HelloWorldEar</dep:artifactId>
      <dep:version>1.1</dep:version>
      <dep:type>war</dep:type>
    </dep:moduleId>
  </dep:environment>

  <context-root>/hello</context-root>

</web-app>

...

No Format
borderStylesolid
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.12">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.12">
    <dep:moduleId>
      <dep:groupId>geronimo</dep:groupId>
      <dep:artifactId>HelloWorldEar</dep:artifactId>
      <dep:version>1.1</dep:version>
      <dep:type>war</dep:type>
    </dep:moduleId>
  </dep:environment>
  <context-root>/hello</context-root>
</web-app>

Direct deployment can be done using the Geronimo v1.1 2 Web console or else application can be deployed using the following command.

No Format
bgColor#000000
borderStylesolid
java -jar <geronimo-home>/bin/deployer.jar deploy <app-home>helloworld.ear

Deploying a J2EE Connector resources archive (RAR) with Geronimo v1.

...

2

This section will describe the deployment plan for RAR application with Geronimo v1.12.The base of this sample has been borrowed and modified from User Guide.(Migration to Apache Geronimo-JBoss to Geronimo JCA migration.html)This sample contains a File Retriever JCA sample application it consists of two modules that, (for the purpose of this sample)for this sample purposes, are deployed separately and not as a single EAR archive.
The first module is a simple file system resource adapter that conforms to the JCA architecture without any server-specific extensions. The adapter provides two functions:

...

No Format
borderStylesolid
<!--This is Geronimo-specific descriptor-->
<connector version="1.5" xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.12">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.12">
    <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>

...

No Format
bgColor#000000
borderStylesolid
Insert the out put

Once the JCA application is deployed, open a Web browser and access the following URL:
http://localhost:8080/jca

Deploying an J2EE client application archive (JAR) with Geronimo v1.

...

2

Conclusion