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

...

Anchortoptop

First step on Deployment plans for Geronimo v1.1

...

Introduction Anchorintrointro

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 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 get an insight.

...

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.

...

4.Create a new folder called WEB-INF inside the app_home directory.

5.Open a new text file and save it as "geronimo-web.xml" and this is the Apache Geronimo v1.1 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.

...

...

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.

...

9.The next step is packaging the application.From a command line window change the directory to <app_home> and run the following command to package the HelloWorld application into a single .war file.
noformat
bgColor#000000borderStylesolid jar -cvf HelloWorld.war *
This will create a HelloWorld.war file in the <app_home> directory. The next step is to deploy this application.

...

11.Change directory to <geronimo_home>/bin and run the following command:
No FormatbgColor#000000borderStylesolid java -jar deployer.jar --user system --password manager deploy <app_home>/HelloWorld.war

12.For further instructions about deployment process please refer the Quick Start or Sample Applications working.The sample application code can be downloaded here.
HelloWorld web Sample

...

This section will cover Geronimo v1.1 deployment plan for the simple helloworld ejb.
Here is the folder structure for the above simple application.Sample Application is available to download here
HelloWorld ejb Sample

...

...

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

...

Geronimo v1.1 deployment plan for the above sample

...

...

Steps to deploying the sample

...

org.geronimo.ejbsample.client.HelloWorld.java is the client code for the above application.Set the necessary class path to run client in your environment.
No FormatbgColor#000000borderStylesolid < <app-home>/org/geronimo/ejbsampleclient> >java HelloWorld
You will see the "Hello world" print on your command line
No FormatbgColor#000000borderStylesolid HelloWorld/org/geronimo/ejbsampleclient> Hello World!

*Image needed to be upload.

...

This sample application gives you an overview of basic steps to deploy an EAR application in Geronimo v1.1.
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

...

The HelloWorldEar application's content can be described as follows:-

...

Here is the application.xml for the above application

...

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

...

xml

...

Here is the web.xml

...

...

Here is the geronimo-web.xml for the above WAR module.

...

Direct deployment can be done using the Geronimo v1.1 Web console or else application can be deployed using the following command.
noformat
bgColor#000000borderStylesolid java -jar <geronimo-home>/bin/deployer.jar deploy <app-home>helloworld.ear

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

...

Folder structure for the JCA sample is shown below.

...

J2EE RAR Deployment Plan

...

J2EE RAR Geronimo v1.1 deployment plan

...

...

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.

...

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:

...

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
No FormatbgColor#000000borderStylesolid java -jar <geronimo_home>/bin/deployer.jar --user system --password manager deploy meta/geronimo/jca-plan.xml jca.rar
No FormatbgColor#000000borderStylesolid java -jar <geronimo_home>/bin/deployer.jar --user system --password manager deploy jca.war

No FormatbgColor#000000borderStylesolid Insert the out put
Once the JCA application is deployed, open a Web browser and access the following URL:
http://localhost:8080/jca

...