Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.1.0) Part Number B28221-02 |
|
|
View PDF |
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:
Deploy an application with a large number of enterprise beans.
Change a bean-related class file in an EJB module and rebuild the EJB JAR file (for example, myBeans-ejb.jar
).
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
:
For more information see, "Incremental Redeployment of Updated EJB Modules" in the Oracle Containers for J2EE Deployment Guide.