Skip Headers

Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g Release 3 (10.1.3) B14428-01 |
| Home | Solution Area | Contents | Index

Previous | Next |

# Deploying Incrementally

OC4J supports incremental or partial redeployment of EJB modules that are part of a deployed application. This feature makes it possible to redeploy only those beans within an EJB JAR that have changed to be deployed, without requiring the entire module to be redeployed. Previously deployed beans that have not been changed will continue to be used.

This functionality represents a significant enhancement over previous releases of OC4J, which treated an EJB module as a single unit, requiring that the module first be undeployed, then redeployed with any updates.

You can use the `updateEBJModule` command in both the `admin.jar` and `admin_client.jar` utilities to incrementally update a deployed application with one or more EJBs contained within an EJB JAR file.

A restart of OC4J is required only if changes are made to the EJB configuration data during the redeployment process. If no changes are made, a hot deployment can be performed without re-starting OC4J.

The incremental redeployment operation will automatically stop the application containing the EJB(s) to be updated, then automatically restart the application when finished.

Note: During redeployment, all idle client connections to the EJB being updated will be lost. All existing requests will be allowed to complete, but no new requests will be allowed until the application is restarted. It is strongly recommended that you stop the application before redeploying the EJB.

The general procedure for using incremental deployment is:

1. Deploy an application with a large number of enterprise JavaBeans.

2. Change a bean-related class file in an EJB module and rebuild the EJB JAR file (for example, `myBeans-ejb.jar`).

3. Submit the updated EJB JAR to OC4J using any of the following:

   - JDeveloper

   - EnterpriseManager

   - `<``OC4J_HOME``>\j2ee\home\admin.jar`.

   Example 28-2 shows how to use the `admin.jar`:

   Example 28-2 Incremental Deployment Using the admin.jar

       java -jar admin.jar ormi://localhost:23791 admin welcome -application -updateEJBModule -jar myBeans-ejb.jar

4. Repeat steps 2 and 3.

For more information see, "Incremental Redeployment of Updated EJB Modules" in the Oracle Containers for J2EE Deployment Guide.