If you create a client with your EJB using the Interface Mapping Toolkit, the necessary deployment descriptors are automatically generated. You do not need to create them manually.
If you need to create deployment descriptors, either use the administration tool provided by your J2EE application server or generate a sample and edit that. In both cases you need to specify the following information in the depoyment descriptor:
- The JNDI name of the EJB. This can be any name you like, but it must match the JNDI name that other components of your application use when they refer your EJB.
- The JNDI name and resource reference name of the Micro Focus resource adapter. You must use the following names depending on the J2EE version that your application server uses:
|
JNDI name |
Reference name |
J2EE 1.3 |
eis\MFCobol_v1.0 |
CCIMFCobol_v1.0 |
J2EE 1.4 |
eis\MFCobol_v1.5 |
CCIMFCobol_v1.5 |
To create deployment descriptors from dummy ones:
- Generate a dummy EJB and client using the Interface Mapping Toolkit.
- Create deployment descriptors, by deploying the dummy EJB using the Deploy tool:
The descriptors are packaged in the myService.ear file in the folder repos/myService.deploy. The following descriptors are generated:
-
*application*.xm?
-
*ejb-jar*.xm?
-
*web*.xm?
- Extract the descriptors from the .ear file using jar commands similar to the following for WebSphere:
jar -xvf JMapServ-WS.ear JMapServ.jar JMapServ.war
jar -xvf JMapServ-WS.ear META-INF/ibm-application-bnd.xmi
jar -xvf JMapServ-WS.ear META-INF/ibm-application-ext.xmi
jar -xvf JMapServ.jar META-INF/ibm-ejb-jar-bnd.xmi
jar -xvf JMapServ.jar META-INF/ibm-ejb-jar-ext.xmi
jar -xvf JMapServ.war WEB-INF/ibm-ejb-web-bnd.xmi
jar -xvf JMapServ.war WEB-INF/ibm-ejb-web-ext.xmi
- Make copies of the descriptors and edit them using an XML editor of your choice, making sure that you retain valid XML. Edit the descriptors as follows:
- Put each descriptor into a subdirectory below the archive file to which the descriptor belongs, as follows:
Descriptor |
Directory |
*application*.xm?
|
my-ear-dir\meta-inf
|
*ejb-jar*.xm?
|
my-jar-dir\meta-inf
|
*web*.xm?
|
my-war-dir\web-inf
|
- Package your descriptors into your archive files using jar commands similar to:
jar -uvf myService.ear META-INF/myAppServer-application.xml
jar -uvf myService.jar META-INF/myAppServer-ejb-jar.xml
jar -uvf myService.war WEB-INF/myAppServer-web.xml
- Package your updated .jar and .war into your .ear file, using jar command similar to:
jar -uvf myService.ear myService.jar myService.war
Note:
Deployment descriptors are automatically created for the supported application servers that are listed in Servers > Settings on the EJB Generation tab in the Application server field.