...
Code Block |
---|
| xml |
---|
| xml |
---|
borderStyle | solid |
---|
title | geronimo-application.xml |
---|
|
<application application-name="HelloWorldEar"
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
<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>
|
Sample Code for the Configuring modules*
This sample has been taken from the user guide, Sample application.http://cwiki.apache.org/GMOxDOC11/jms-and-mdb-sample-application.html.ThisImage Modified is a sample deployment plan for A context root for web application module with a ejb application.
Code Block |
---|
| xml |
---|
| xml |
---|
borderStyle | solid |
---|
title | geronimo-application.xml |
---|
|
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>samples</dep:groupId>
<dep:artifactId>Order</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>
</application>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
borderStyle | solid |
---|
title | application.xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<application
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/application_1_4.xsd"
version="1.4">
<module>
<ejb>OrderEjb.jar</ejb>
</module>
<module>
<web>
<web-uri>OrderWeb.war</web-uri>
<context-root>/Order</context-root>
</web>
</module>
</application>
|
Sample code for Adding a new module
This sample application uses a connector module in the deployment plan itself.This sample code for geronimo-application and the application.xml has been excerpt from user guide, sample application located at http://cwiki.apache.org/GMOxDOC11/ejb-sample-application.htmlImage Added
Code Block |
---|
| xml |
---|
| xml |
---|
borderStyle | solid |
---|
title | geronimo-application.xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>default</dep:groupId>
<dep:artifactId>Bank</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>
<module>
<connector>tranql-connector-1.2.rar</connector>
<alt-dd>BankPool.xml</alt-dd>
</module>
</application>
|
Code Block |
---|
| xml |
---|
| xml |
---|
borderStyle | solid |
---|
title | application.xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<application
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/application_1_4.xsd"
version="1.4">
<module>
<ejb>BankEJB.jar</ejb>
</module>
<module>
<web>
<web-uri>BankWeb.war</web-uri>
<context-root>/Bank</context-root>
</web>
</module>
<module>
<connector>tranql-connector-1.2.rar</connector>
</module>
</application>
|
geronimo-application.xml and application.xml define the main components of the EAR. Both EJB component and Web archive information are given in these files. Additionally, these two XML files define application scoped database connection pool with tranql-connector-1.2.rar and BankPool.xml.
Deployment plan for geronimo-application.xml and openejb-jar.xml
...