Wiki Markup |
---|
{scrollbar} |
Anchor | ||||
---|---|---|---|---|
|
First step on Deployment plans for Geronimo v1.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
Introduction
Anchor | ||||
---|---|---|---|---|
|
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.
Apache Geronimo v1.1 Deployment Plans
The following table illustrates the deployment descriptors name and file location for both standard J2EE and Apache Geronimo specific.
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 is 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)
Deployment plan for WAR Module
Deploying and Undeploying Helloworld sample.
This section will cover understanding how the deployment plan works for different application modules.
First let's have look at the simple "HelloWorld"example which creates a Web Application Archive (WAR) under the WEB-INF directory and has a geronimo-web.xml as the Apache Geronimo specific deployment Plan.
...
Access Hello World web sample
http://localhost:8080/hello
Deploying JAR containing Simple EJB application
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
...
No Format | ||||
---|---|---|---|---|
| ||||
<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.1"> <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> |
Steps to deploying the sample
There are two ways in which the sample can be deployed :-
...
2.Use the following command line code to deploy the application.
Code Block |
---|
Running the Client to test the HelloWorld EJB service
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 Format bgColor #000000 borderStyle solid
< <app-home>/org/geronimo/ejbsampleclient> >java HelloWorld
You will see the "Hello world" print on your command line
No Format bgColor #000000 borderStyle solid
HelloWorld/org/geronimo/ejbsampleclient>
Hello World!
*Image needed to be upload.
Deploying the EAR Application On Geronimo v1.1
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
...
Direct deployment can be done using the Geronimo v1.1 Web console or else application can be deployed using the following command.
No Format bgColor #000000 borderStyle solid
java -jar <geronimo-home>/bin/deployer.jar deploy <app-home>helloworld.ear
Deploying a J2EE Connector resources archive (RAR) with Geronimo v1.1
This section will describe the deployment plan for RAR application with Geronimo v1.1.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:
...
- Defines the FileRetriever name which looks up the resource adapter factory.
- Specifies that neither transactions nor connection pools are supported.
- Provides the 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> matches your environment.
...
No Format bgColor #000000 borderStyle solid
Insert the out put
Once the JCA application is deployed, open a Web browser and access the following URL:
http://localhost:8080/jca