Packaging Enterprise Applications

Changing the configuration of the J2EE stateful session EJBs or resource adapters requires you to unpackage the BridgeAPI.ear, edit the configuration files, and then repackage. The following sections detail each of these procedures.

Perform these steps before executing any of the following procedures
  1. Open a command prompt.

  2. Create a directory to work in.

  3. Change to the working directory.

Note To unpackage and repackage the EAR you need to use the jar utility supplied in a java JDK or some other utility (like WinZip).

All examples will use the jar utility from a JDK under windows. It is expected that there is an environment variable JAVA_HOME that point to the root of the JDK.

Perform these steps after executing any of the following procedures
  1. Repackage the enterprise application (EAR).

  2. Deploy the packaged EAR to your appropriate application server.

J2EE Session EJB Processes

Unpackaging the BridgeAPI.ear

You must unpackage the BridgeAPI.ear if you want to make changes to stateful session EJBs and resource adapters or add your web application to the enterprise application.

To unpackage everything execute the following commands in the command prompt:


md BridgeAPI_EAR
cd BridgeAPI_EAR
$JAVA_HOME/bin/jar -xf ../BridgeAPI.ear
cd ..

md BridgeAPI-ejb_JAR
cd BridgeAPI-ejb_JAR
$JAVA_HOME/bin/jar -xf ../BridgeAPI_EAR/BridgeAPI-ejb.jar
cd ..

md BridgeAPI_RAR
cd BridgeAPI_RAR
$JAVA_HOME/bin/jar -xf ../BridgeAPI_EAR/BridgeAPI.rar
cd ..

md BridgeAPI-ra_jar
cd BridgeAPI-ra_jar
$JAVA_HOME/bin/jar -xf ../BridgeAPI_RAR/BridgeAPI-ra.jar
cd ..

Back to Top

Changing Enterprise Applications

Add web applications to your enterprise applications using module sections.

To add web applications
  1. Copy WAR files into the BridgeAPI_EAR directory.

  2. Open the BridgeAPI_EAR/META-INF/application.xml for editing.

  3. Add a module section for each web application that you wish to include.

    Code for a module section:

    
    	<module>
    		<web>
    			<web-uri>YourWebApp.war</web-uri>
    			<context-root>/YourContextRoot</context-root>
    		</web>
    	</module>
    
    

Back to Top

Changing Stateful Session EJBs

Edit the appropriate configuration file for each specific purpose.

To affect
Modify
All application servers BridgeAPI-ejb_JAR/META-INF/ejb-jar.xml

Modifications to the resource reference name may cause application failure.

WebLogic configurations and/or setup bean-cache BridgeAPI-ejb_JAR/META-INF/weblogic-ejb-jar.xml

Modifications to the reference desciptor to the resource adapter may cause application failure.

SunONE configurations and/or setup bean-cache BridgeAPI-ejb_JAR/META-INF/sun-ejb-jar.xml

Modifications to the resource reference to the resource adapter may cause application failure.

Oracle configurations BridgeAPI-ejb_JAR/META-INF/orion-ejb-jar.xml

Modifications to the resource reference mapping to the resource adapter may cause application failure.

Back to Top

Changing Resource Adapters

Edit the appropriate configuration file for each specific purpose.

To affect
Modify
All application servers and/or enable tracing inside the BridgeAPI.jar BridgeAPI_RAR/META-INF/ra.xml
WebLogic configurations and/or setup pool-params BridgeAPI_RAR/META-INF/weblogic-ra.xml

Modifications to the JNDI name may cause application failure.

SunONE configurations and/or setup pool-params BridgeAPI_RAR/META-INF/sun-ra.xml

Modifications to the JNDI name may cause application failure.

Oracle configurations BridgeAPI_RAR/META-INF/oc4j-ra.xml

Modifications to the JNDI name may cause application failure.

Back to Top

Changing the ID Manager Location

Edit the configuration file when changing to a different MCS location.

To change the MCS ID Manager location
  1. Open the file BridgeAPI-ra_jar/com/attachmate/cicsbridge/ws/BridgeAPI.properties for editing.

  2. Change the IDManagerIPAddress= line to point to the new location of ID Manager.

Back to Top

Repackaging the BridgeAPI.ear

To package everything back up again execute the following commands in the command prompt:


cd BridgeAPI-ra_jar
$JAVA_HOME/bin/jar -cfm ../BridgeAPI_RAR/BridgeAPI-ra.jar META-INF/MANIFEST.MF .
cd ..

cd BridgeAPI_RAR
$JAVA_HOME/bin/jar -cfm ../BridgeAPI_EAR/BridgeAPI.rar META-INF/MANIFEST.MF .
cd ..

cd BridgeAPI-ejb_JAR
$JAVA_HOME/bin/jar -cfm ../BridgeAPI_EAR/BridgeAPI-ejb.jar META-INF/MANIFEST.MF .
cd ..

cd BridgeAPI_EAR
$JAVA_HOME/bin/jar -cfm ../BridgeAPI.ear META-INF/MANIFEST.MF .
cd ..

Back to Top

Related Topics
Bullet Using J2EE Architecture
Bullet RA and EJB Requestor Errors
Bullet J2EE Sample Code: Accessing the Stateful Session EJB in a Web Application
Bullet J2EE Sample Code: Accessing the Resource Adapter from a Web Application
  Attachmate