Previous Topic Next topic Print topic


To create deployment descriptors manually

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:

To create deployment descriptors from dummy ones:

  1. Generate a dummy EJB and client using the Interface Mapping Toolkit.
  2. 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?
  3. 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
    
  4. 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:
    • *application*.xm?. Replace the .jar and .war filenames with the names of your files.

      For WebLogic, a weblogic-application.xml file is not required.

    • *ejb-jar*.xm?. Replace the JNDI name with the JNDI name of your EJB. Notice that the JNDI name of the resource adapter is set to eis/MFCobol_*** (where *** is the version), which you must not change.
    • *web*.xm?. Replace the JNDI name with the JNDI name of your EJB.
  5. 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
  6. 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
    
  7. 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.

Previous Topic Next topic Print topic