To Create Deployment Descriptors Manually

Note: For some application servers, deployment descriptors are automatically created when you generate an EJB using the IMTK. A list of application servers for which deployment descriptions are automatically created appears in the drop-down list for the field . See To set deployment properties and for details.

You can create deployment descriptors using the administration tool provided by your Java application server. Alternatively, you can generate a sample descriptor using the Interface Mapping Toolkit and edit the sample. You need to specify the following information in the deployment 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*.xml
    • *ejb-jar*.xml
    • *web*.xml
  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/application.xml
    jar -xvf JMapServ.jar META-INF/ibm-ejb-jar-bnd.xml
    jar -xvf JMapServ.war WEB-INF/ibm-web-bnd.xml
    jar -xvf JMapServ.war WEB-INF/web.xml
  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*.xml. Replace the .jar and .war filenames with the names of your files.

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

    • *ejb-jar*.xml. 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*.xml. 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*.xml my-ear-dir\meta-inf
    *ejb-jar*.xml my-jar-dir\meta-inf
    *web*.xml 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