You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ge...@incubator.apache.org on 2004/04/28 23:53:11 UTC

[Apache Geronimo Wiki] New: Deployment

   Date: 2004-04-28T14:53:11
   Editor: 208.42.65.236 <>
   Wiki: Apache Geronimo Wiki
   Page: Deployment
   URL: http://wiki.apache.org/geronimo/Deployment

   no comment

New Page:

= Deployment =

The Geronimo deployment tool is packaged in the executable jar `bin/deployer.jar'.  The deployer uses a XML deployment plan to figure out what to do and this xml file determined by the module type. Ultimately this will be produced by a JSR-88 tool but for now an XML aware text editor is the best choice.

'''NOTE:''' You should only run the deploy tool with the server stopped - online deployment will be available soon when default deployment includes the remoting layer.

  == General Configuration ==

  All of the configuration files shown below support the follow common element:
    {{{
<dependency>
    <uri>junit/jars/junit-3.8.jar</uri>
</dependency>

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8</version>
</dependency>
}}}

  These two equivalent declarations, add a dependency on junit-3.8.jar.  When Geronimo starts this configuration it will search the repository for the specified file and will add it to the class path of the configuration.

= Web Aplication =

  == Configuration ==

  To deploy a web application in Geronimo, you '''must''' add a `WEB-INF/geronimo-jetty.xml` file to your war file (this restriction will be removed in a future release).  An example geronimo-jetty.xml file follows:
    {{{
<?xml version="1.0" encoding="UTF-8"?>
<web-app
    xmlns="http://geronimo.apache.org/xml/ns/web/jetty"
    configId="your/domain/name/Example"
    parentId="org/apache/geronimo/Server"
    >
    <context-root>/debug-tool</context-root>
    <context-priority-classloader>false</context-priority-classloader>
</web-app>
}}}

  Change the configId attribute to the configuration identifier you would like to use for your application.  The configId should begin with the domain name of your organization.  For example, we use org/apache/geronimo, and the OpenEJB project uses org/openejb.  The remaining elements are described below:

    *context-root

    Your application will be mounted at `http://localhost:8080/<context-root>`

    *context-priority-classloader

    If true, Geronimo will load classes from the web application before the Geronimo server environment.  If  false, Geronimo will use normal Java class loading rules and check the Geronimo server before loading class from the web application.  False is the preferred setting

  == Deployment ==

  To deploy your web application execute the following command from the Geronimo home directory:
    {{{
java -jar bin/deployer.jar --install --module YourWebApplication.war
}}}

  Once the deployment completes, you can start your configuration by executing the following command from the Geronimo home directory:
    {{{
java -jar bin/server.jar your/domain/name/Example   
}}}

  If you want to start several configurations, simply list the extra configuration IDs on the command line.

= EJB Aplication =

  == Configuration ==

  To deploy an EJB application in Geronimo, you '''must''' add a `META-INF/openejb-jar.xml` file to your ejb-jar file (this restriction will be removed in a future release).  An example openejb-jar.xml file follows:
    {{{
<?xml version="1.0"?>

<openejb-jar
    xmlns="http://www.openejb.org/xml/ns/openejb-jar"
    configId="your/domain/name/Example"
    parentId="org/apache/geronimo/Server">

    <enterprise-beans>
        <session>
            <ejb-name>SimpleStatelessSession</ejb-name>
            <jndi-name>client/test/simple/SimpleStatelessSessionHome</jndi-name>
        </session>
    </enterprise-beans>
</openejb-jar>
}}}

  Change the configId attribute to the configuration identifier you would like to use for your application.  The configId should follow with the domain name of your organization.  

  == Deployment ==

  To deploy your EJB application execute the following command from the Geronimo home directory:
    {{{
java -jar bin/deployer.jar --install --module YourEJBApplication.jar
}}}

  Once the deployment completes, you can start your configuration by executing the following command from the Geronimo home directory:
    {{{
java -jar bin/server.jar your/domain/name/Example   
}}}

  If you want to start several configurations, simply list the extra configuration IDs on the command line.

= Resource Adapter =

  == Configuration ==

  To deploy a Resource adapter into Geronimo, you '''must''' add a `META-INF/geronimo-ra.xml` file to your rar file (this restriction will be removed in a future release).  An example openejb-jar.xml file follows:
    {{{
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee"
    version="1.0"
    configId="your/domain/name/Example"
    parentId="org/apache/geronimo/Server">

    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>DefaultDatasource</name>
                    <config-property-setting name="DefaultUserName"></config-property-setting>
                    <config-property-setting name="DefaultPassword"></config-property-setting>
                    <config-property-setting name="JdbcDriver">org.axiondb.jdbc.AxionDriver</config-property-setting>
                    <config-property-setting name="JdbcUrl">jdbc:axiondb:DefaultDatabase</config-property-setting>
                    <connectionmanager>
                        <!--realm-bridge>TargetRealm</realm-bridge-->
                        <blockingTimeout>100</blockingTimeout>
                        <maxSize>1</maxSize>
                        <useTransactions>true</useTransactions>
                        <useLocalTransactions>true</useLocalTransactions>
                        <useTransactionCaching>true</useTransactionCaching>
                        <useConnectionRequestInfo>false</useConnectionRequestInfo>
                        <useSubject>false</useSubject>
                    </connectionmanager>
                </connectiondefinition-instance>

            </connection-definition>

        </outbound-resourceadapter>
    </resourceadapter>
</connector>
}}}

  Change the configId attribute to the configuration identifier you would like to use for your application.  The configId should follow with the domain name of your organization.  

  == Deployment ==

  To deploy your resource adapter execute the following command from the Geronimo home directory:
    {{{
java -jar bin/deployer.jar --install --module YourResourceAdapter.rar
}}}

  Once the deployment completes, you can start your configuration by executing the following command from the Geronimo home directory:
    {{{
java -jar bin/server.jar your/domain/name/Example   
}}}

  If you want to start several configurations, simply list the extra configuration IDs on the command line.

= EAR =

Deployment of EAR files is currently not supported by Geronimo.

= Services =

  == Configuration ==

  Geronimo can deploy generalized GBean services in addition to the standard J2EE deployment types.   An example service-plan.xml file follows:
    {{{
<configuration
    xmlns="http://geronimo.apache.org/xml/ns/deployment"
    configId="your/domain/name/Example"
    parentId="org/apache/geronimo/System"
    >

    <gbean name="some.domain:name1=value1,name2=value2" class="your.package.SomeGBean">
        <attribute name="SomeAttribute" type="int">42</attribute>
        <reference name="SomeReference">some.domain:type=SomeOtherGBean</reference>
    </gbean>
</configuration>
}}}

  Change the configId attribute to the configuration identifier you would like to use for your application.  The configId should follow with the domain name of your organization.  

  == Deployment ==

  To deploy your resource adapter execute the following command from the Geronimo home directory:
    {{{
java -jar bin/deployer.jar --install --plan YourService-plan.xml
}}}

  Once the deployment completes, you can start your configuration by executing the following command from the Geronimo home directory:
    {{{
java -jar bin/server.jar your/domain/name/Example   
}}}

  If you want to start several configurations, simply list the extra configuration IDs on the command line.