Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (10.1.3.5.0)

Part Number E13981-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

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.

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 restarting OC4J.

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

Note:

During redeployment, all idle client connections to the enterprise bean 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 enterprise bean.

For CMP or BMP entity beans, OC4J uses code generation to generate the server implementation of the EJB interfaces (wrappers). In this case, incrementally redeploying only changed beans is most likely to be more efficient than redeploying the entire application.

For session beans, message-driven beans, and EJB 3.0 JPA entities, OC4J uses byte code generation to generate wrappers. Because this approach reduces deployment time so much, it may be just as efficient to redeploy the entire application as to redeploy only changed beans. In this case, incremental redeployment is optional.

The general procedure for using incremental deployment is as follows:

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

  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 or admin_client.jar using the updateEBJModule command

    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.