Assemble an enterprise bean JAR file into an EAR file


 

+

Search Tips   |   Advanced Search

 

Before assembling a Web services-enabled EAR file, assemble an enterprise bean JAR file.

To assemble a Web services-enabled EAR file:

  1. Start an assembly tool.

  2. Configure the assembly tool so that it works on Java EE modules. Make sure that the Java EE and Web categories are enabled.

  3. Assemble the Web services-enabled JAR file into an EAR file.

    The EAR file can contain...

    • an enterprise bean or application client JAR files
    • WAR files
    • Web apps
    • metadata describing the applications or application.xml files

In the following example, there is an application.xml deployment descriptor packaged with a Web services-enabled JAR file called AddressBook.jar that is packaged into an EAR file called AddressBook.ear. The EAR file contains:

 META-INF/MANIFEST.MF META-INF/application.xml AddressBook.jar

Example application.xml deployment descriptor...

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE application 
          PUBLIC "-
//Sun Microsystems, Inc.
//DTD J2EE Application 1.3
//EN" 
          "http://java.sun.com/dtd/application_1_3.dtd">

  <application id="Application_ID">

    <display-name>AddressBookJ2WEE</display-name>
    <description>AddressBook EJB Example from Java </description>

    <module id="EjbModule_1">
      <ejb>AddressBook.jar</ejb>
    </module>

  </application>

 

Next steps

Enable the EAR file. Then, deploy the EAR file into WAS.

 

Related tasks

Assemble a JAR file that is enabled for Web services from an enterprise bean
Assembly tools
Assemble a Web services-enabled enterprise bean JAR file from a WSDL file
Enable an EAR file for EJB modules that contain Web services