Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Here are the steps to understand the deployment plan for the "HelloWorld" Example
1.Create a folder in called <app_home> in your working directory
2.Open a new text file and save it as "HelloWorld.jsp" in side the app_home directory
3.Copy and paste the following code with the "HelloWorld.jsp" in it.

No Format
borderStyle
borderStylesolid
titleHelloWorld.jspsolid
<%@ 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.2!
         </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.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.xmlborderStylesolid
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <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>

7.Open a another new text file save it in <app_home\WEB_INF> directory and name it as "web.xml"
8.Copy and paste the following xml code in it and save.

No Format
borderStyle
borderStylesolid
titleweb.xmlsolid
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
   xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <welcome-file-list>
         <welcome-file>HelloWorld.jsp</welcome-file>
    </welcome-file-list>

</web-app>

...

Here is the ejb-jar.xml for the above sample

No Format
borderStylesolid
titleejb-jar.xmlborderStylesolid
<?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.2 deployment plan for the above sample

No Format
borderStylesolid
titleopenejb.jarborderStylesolid
<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.2">
    <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>

...

Here is the application.xml for the above application

No Format
borderStyle
borderStylesolid
titleapplication.xmlsolid
<?xml version="1.0" encoding="ISO-8859-1"?>
<application>
<display-name>HelloWorldEar</display-name>
<module>
<web>
<web-uri>helloworld.war</web-uri>
<context-root>/hello</context-root>
</web>
</module>
</application>

Here is the Geronimo specific deployment plan geronimo-application.xml

No Format
borderStylesolid
titlegeronimo-application.xmlborderStylesolid
<application application-name="HelloWorldEar"
              xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2" 
              xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2" 
              xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
  <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>

Here is the web.xml

No Format
borderStyle
borderStylesolid
titleweb.xmlsolid
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
  <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <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>

...

J2EE RAR Deployment Plan

No Format
borderStylesolid
titlera.xmlborderStylesolid
<connector xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd" version="1.5"
   xmlns="http://java.sun.com/xml/ns/j2ee" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <display-name>FileRetriever</display-name>
  <vendor-name>IBM</vendor-name>
  <eis-type>File system</eis-type>
  <resourceadapter-version>1.0</resourceadapter-version>
  <resourceadapter>
    <outbound-resourceadapter>
      <connection-definition>  
      <managedconnectionfactory-class>com.ibm.j2g.jca.connector.impl.FileRetrieverManagedConnectionFactory
      </managedconnectionfactory-class>
        <config-property>
          <description>Path to the directory being the file repository</description>
          <config-property-name>RepositoryPath</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
        </config-property>
        <connectionfactory-interface>com.ibm.j2g.jca.connector.FileRetrieverConnectionFactory
        </connectionfactory-interface>
        <connectionfactory-impl-class>com.ibm.j2g.jca.connector.impl.FileRetrieverConnectionFactoryImpl
        </connectionfactory-impl-class>
        <connection-interface>com.ibm.j2g.jca.connector.FileRetrieverConnection</connection-interface>
        <connection-impl-class>com.ibm.j2g.jca.connector.impl.FileRetrieverConnectionImpl
       </connection-impl-class>
      </connection-definition>
      <transaction-support>NoTransaction</transaction-support>
      <reauthentication-support>false</reauthentication-support>
    </outbound-resourceadapter>
  </resourceadapter>
</connector>

J2EE RAR Geronimo v1.1 deployment plan

No Format
borderStylesolid
titlegeronimo-ra.xmlborderStylesolid
<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>

...