InfoCenter Home >
6: Administer applications >
6.5: Maintaining and updating applications >
6.5.1: Hot deployment and dynamic reloading
6.5.1: Hot deployment and dynamic reloading
This article outlines the types of changes that can be made to application servers and their contents
with respect to hot deployment and dynamic reloading. In other words, it discusses what you can change,
and how, without having to stop the server and start it again.
Hot deployment is the process of adding new components (such as enterprise beans, servlets, and JSP files)
to a running server without having to stop the application server process and start it again.
Dynamic reloading is the ability to change an existing component without needing to restart the server
in order for the change to take effect. Dynamic reloading involves:
- Changes to the implementation of a component of an application, such as changing
the implementation of a servlet
- Changes to the settings of the application, such as changing the deployment descriptor
for a Web module
When modules of an application are installed on a server group then the user actions mentioned
below must be taken on all nodes that run individual clones of the server group.
View information about updating and redeploying:
Change an existing JSP File
- User Action: None
- Comments:
The changed JSP can be placed directly in the product_installation_root/installedApps/<app
name>.ear/<module name>
directory, or the appropriate subdirectory. The change will be automatically
detected and the JSP will be recompiled and reloaded.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Add a new JSP File to an existing application
- User Action:
None
- Comments:
The new JSP can be placed directly in the product_installation_root/installedApps/<app
name>.ear/<module name>
directory, or the appropriate subdirectory. The new file will be automatically detected
and compiled on the first request to the page.
- Hot deployment:
Yes
- Dynamic reloading:
Yes
Change an existing Servlet class (edit and recompile)
- User Action:
None (if reloading is enabled). If reloading is disabled, the
enterprise application
will have to be restarted to detect the change.
- Comments:
The new version of the servlet .class file can be placed directly in the product_installation_root/installedApps/
<app name>.ear/<module name>/WEB-INF/classes
directory. If the .class file is part of a jar file, the new version of the jar
file can be placed directly in product_installation_root/installedApps/<app
name>.ear/<module name>/WEB-INF/lib.
In either case, the change will be detected, the Web application will be shut
down and reinitialized, picking up the new class.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Change a dependent class of an existing Servlet class
- User Action:
None (if reloading is enabled). If reloading is disabled, the
enterprise application
will have to be restarted to detect the change.
- Comments:
The new version of the dependent .class file can be placed directly in the product_installation_root/installedApps
/<app name>.ear/<module name>/WEB-INF/classes
directory. If the .class file is part of a jar file,
the new version of the jar file can be placed directly in product_installation_root/installedApps/<app
name>.ear/<module name>/WEB-INF/lib.
In either case, the change will be detected, the Web application will be shut down
and reinitialized, picking up the new class.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Add a new Servlet using the Invoker (Serve Servlets by class name) facility or add a dependent class
to an existing application
- User Action:
None (if reloading is enabled). If reloading is disabled, the
enterprise application
will have to be restarted to detect the change.
- Comments:
The new .class file can be placed directly in the product_installation_root/installedApps/<app
name>.ear/<module name>/WEB-INF/classes
directory. If the .class file is part of a jar file, the new version of the jar file
can be placed directly in product_installation_root/installedApps/<app
name>.ear/<module name>/WEB-INF/lib.
This case is treated the same as changing an existing class. The difference is that
adding the servlet/class does not immediately cause the Web application to reload,
since the class has never been loaded before. The class simply becomes available for execution.
- Hot deployment:
Yes
- Dynamic reloading:
Non-applicable
Modification to the ibm-web-ext.xmi of an application
- User Action:
None (if reloading is enabled). If reloading is disabled, the
enterprise application
will have to be restarted to detect the change.
- Comments: You can change all of the extension settings.
The only warning is if you set the reloadInterval property to zero (0) or
you set reloadEnabled property to false, the application will reload once at the
time of the change. However, after this final reloading, the Web module will no
longer detect any changes of any kind. Both of these changes disable the reloading
function. The only way to re-enable reloading and the Dynamic functions is to change the
appropriate property and restart the module using the
administrative console or a wscp command.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Modification to ibm-ejb-jar-ext.xmi
- User Action:
Restart the Module
- Comments:
You can use the administrative console or a wscp command
to restart a module of the application. The changes will be reloaded at that time.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Modification to Table.ddl for an EJB Jar
- User Action:
Rerun DDL file on user database server
- Comments:
This change really has no effect on the application server and is a change
to the database table schema for the EJBs
- Hot deployment:
Non-applicable
- Dynamic reloading:
Non-applicable
Modification to the Map.mapxmi file for an EJB Jar
- User Action:
Redeploy the EJB and restart the module
- Comments:
A change to this file requires you to regenerate the deployed code artifacts for
the EJB, apply the new EJB jar to the server and restart the module using the
administrative console or a wscp command.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Modification to the Schema.dbxmi file for an EJB Jar
- User Action:
Redeploy the EJB and restart the module
- Comments:
A change to this file requires you to regenerate the deployed code artifacts for
the EJB, apply the new EJB jar to the server and restart the module using the
administrative console or a wscp command.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Update the Implementation class for an EJB or a dependent class of the implementation
class for an EJB
- User Action:
Restart the Module and/or Application.
- Comments:
After changing the Jar/Class File in the installedApps folder, you must restart
the module or application that the EJB is part of. You should restart the
application if other modules in the application use the changed module. If the
changed module is used by modules in other applications, you should restart those
applications/modules.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Update the Home/Remote interface class for an EJB
- User Action:
Redeploy the EJB and restart the application
- Comments:
A change in the interfaces of the EJB requires you to regenerate the deployed code
artifacts for the EJB, apply the new EJB jar to the server and restart the
application that the EJB jar is a part of. This will always work as long as
you are using Module or Application visibility for class loading on the server.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Modification to the ibm-app-ext.xmi file for an application
- User Action:
Restart the Application
- Comments:
The application must be restarted with the
administrative console or a wscp command.
- Hot deployment:
Non-applicable
- Dynamic reloading:
Yes
Modification to a non-module Jar contained in the EAR
- User Action:
Restart the application
- Comments:
Use the administrative console or a wscp command
to restart the application containing the Jar that has changed
- Hot deployment:
Yes
- Dynamic reloading:
Yes
Modifications to application.xml to change the context root of a war file
- User Action:
Generate the Plugin config file through the Web-browser admin or through
the GenPluginCfg.bat/sh script.
- Comments:
None
- Hot deployment:
Yes
- Dynamic reloading:
Yes
|
|