...
After extracting the zip file, a document_manager directory is created. From now on this directory will be referred as <document_manager_home>. In the <document_manager_home>/config directory open the build.properties file and edit the geronimo.home & xdoclet.home as given in below.
Code Block |
---|
| xml |
---|
| xml |
---|
borderStyle | solid |
---|
title | build.propertiesxml |
---|
|
## Set the Geronimo 1.1 home here
geronimo.home=<geronimo_home>
## Set the XDoclet 1.2.3 home here
xdoclet.home=<xdoclet_home>
|
...
- Developed a Geronimo specific deployment plan for the Enterprise application. The geronimo-application.xml deployment plan is located in the <document_manager_home>/config/geronimo directory. During the build process, this deployment plan is placed in the META-INF subdirectory in the EAR archive and should look like the following:
Code Block |
---|
| xml |
---|
| xml |
---|
2 | geronimo-application.xml |
---|
borderStyle | solidxml |
---|
|
<?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>org.apache.geronimo.samples</dep:groupId>
<dep:artifactId>DocumentManager</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type>
</dep:moduleId>
<dep:dependencies>
<dependency>
<groupId>geronimo</groupId>
<artifactId>j2ee-security</artifactId>
<type>car</type>
</dependency>
</dep:dependencies>
<dep:hidden-classes/>
<dep:non-overridable-classes/>
</dep:environment>
<security xmlns="http://geronimo.apache.org/xml/ns/security">
<default-principal realm-name="j2g">
<principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" name="system"/>
</default-principal>
<role-mappings>
<role role-name="authenticated">
<realm realm-name="j2g">
<principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="authenticated"/>
</realm>
</role>
<role role-name="uploader">
<realm realm-name="j2g">
<principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="uploader"/>
</realm>
</role>
</role-mappings>
</security>
<gbean name="j2g" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
<attribute name="realmName">j2g</attribute>
<reference name="ServerInfo">
<name>ServerInfo</name>
</reference>
<reference name="LoginService">
<name>JaasLoginService</name>
</reference>
<xml-reference name="LoginModuleConfiguration">
<log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.1">
<log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
<log:login-domain-name>j2g</log:login-domain-name>
<log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule
</log:login-module-class>
<log:option name="usersURI">var/security/j2g_users.properties</log:option>
<log:option name="groupsURI">var/security/j2g_groups.properties</log:option>
</log:login-module>
</log:login-config>
</xml-reference>
</gbean>
</application>
|
...
- Created a Geronimo specific deployment plan for the EJB module openejb-jar.xml. This deployment plan is located in the <document_manager_home>/config/geronimo directory. During the build the file is copied to the META-INF subdirectory of the DocumentMangerEJB.jar EJB module. This deployment plan should look like the following example:
Code Block |
---|
| xml |
---|
| xml |
---|
2 | openejb-jar.xml |
---|
borderStyle | solidxml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<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.apache.geronimo.samples</dep:groupId>
<dep:artifactId>DocumentManagerEJB</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>DocumentManager</ejb-name>
</session>
</enterprise-beans>
</openejb-jar>
|
- Created a Geronimo specific deployment plan for the Web module geronimo-web.xml. This plan is located in the <document_manager_home>/web/WEB-INF directory. During the build, this file is retained to the WEB-INF subdirectory of the DocumentMangerWeb.war Web module and remove unnecessay files from this folder. This file linked with geronimo-application.xml with security realm information contained in it. This deployment plan should look like the following example:
Code Block |
---|
| xml |
---|
| xml |
---|
2 | geronimo-web.xml |
---|
borderStyle | solidxml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>org.apache.geronimo.samples</dep:groupId>
<dep:artifactId>DocumentManagerWeb</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>
<context-root>/document</context-root>
<security-realm-name>j2g</security-realm-name>
</web-app>
|
...