Enabling hot method replace for a WAS
If you want to make changes to your Java™ classes while you are debugging, you can set this preference by editing the server before you start it. When hot method replace is enabled most application changes is picked up automatically without requiring an application or server restart.
Restriction:
To enable hot method replace for a local or remote WAS v6.0.x:
- For a local or remote WebSphere® Application Server v6.1 or later, the hot method replace is always enabled in debug mode.
- In the Servers view, double-click your WAS v6.0.x to open the server editor.
- Click the
Overview tab.
- Expand the
Server section, and select the
Enable hot method replace in debug mode check box.
- Save and close the editor.
- Start the server in debug mode. When the server is started in debug mode, class file changes is going to be picked up by the server automatically.
Note:
- To debug a stand-alone application using hot method replace, you must use the JRE provided by the IBM® Rational® Software Delivery Platform available at x:
\jdk\jre, where x is the directory where this product is installed. For example, C:\Program Files\IBM\SDP75\jdk\jre. In addition, specify -Xj9 as a VM argument.
- Hot-method replace cannot be used while profiling an application. When you profile an application, data related to the program's runtime behavior is collected and presented in both graphical and tabular views. Profiling enables you to see which operations take the most time and helps you to find and solve memory leaks. For more information, refer to the Profiling and logging documentation.
- When using hot method replace to debug servlets, the server will reload a method which is changed. It will not reload the class or reload and reinitialize the servlet.
- JSP debugging does not support hot method replace.
- When hot method replace is enabled, the JIT compiler is also enabled. The JIT compiler used when Hot-method replace is enabled, is much faster than when using normal debugging. The JAVA_COMPILER=NONE environment variable and system property -Djava.compiler=NONE to disable the JIT compiler is going to be ignored if hot method replace is enabled when debugging an application. When hot method replace is enabled, the -Xint option is going to disable the JIT compiler.
Related information