WebSphere Application Server Version 6.1 Feature Pack for Web Services
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results
             New or updated topic for this feature pack

Assembling an enterprise bean JAR file into an EAR file

You can assemble an enterprise bean Java archive (JAR) file into an enterprise archive (EAR) file with an assembly tool. Assembling the JAR file, and now the EAR file, are required tasks to enable Java code for Web services.

Before you begin

You can assemble Java-based Web services modules with assembly tools provided with WebSphere Application Server.

Before assembling a Web services-enabled EAR file you must assemble an enterprise bean JAR file that you want to enable for Web services. To learn more about the artifacts that are needed for the assembly of the enterprise bean JAR file see Assemble an enterprise bean JAR file from Java code that is enabled for Web services.

About this task

To assemble a Web services-enabled EAR file:

Procedure

  1. Start an assembly tool. See "Starting WebSphere Application Server Toolkit" in the Application Server Toolkit documentation for more information.
  2. If you have not done so already, configure the assembly tool so that it works on J2EE modules. You need to make sure that the J2EE and Web categories are enabled. See "Configuring WebSphere Application Server Toolkit" in the Application Server Toolkit documentation for more information.
  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 applications, and metadata describing the applications or application.xml files.

Results

A Web services-enabled EAR file.

Example

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

An example of the application.xml deployment descriptor is as follows:

<?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>

What to do next

Enable the EAR file. Then, deploy the EAR file into WebSphere Application Server.



In this information ...


IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

IBM Suggests
Task topic    

Terms of Use | Feedback

Last updated: Nov 25, 2008 2:35:59 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/twbs_assembearjar.html