Troubleshooting
Problem
Making any application changes in IBM Rational Application Developer V7 triggers automatic publishing to the IBM WebSphere Application Server V6.1.
Symptom
Making any application changes in Rational Application Developer V7 triggers automatic publishing to the WebSphere Application Server V6.1. Frequent republishing can be disruptive to the software development process.
Cause
In Rational Application Developer (RAD) version 6.0, minor changes to application files, like Java™ class files or JSP, would not trigger a publish to the server. Thus, before publishing all changes to the server, the software developer could make several changes to the application without disruption. However, in Rational Application Developer V7.0 any changes to the application files will trigger the server to republish the application. This can take awhile and be disruptive.
Resolving The Problem
In Rational Application Developer V7.0 any changes made to the application will trigger the server state to change to 'Republish'. If you have automatic publishing enabled, then Rational Application Developer will automatically publish to the server after the specified publishing interval (5 seconds by default). When Rational Application Developer publishes to the WebSphere Application Server, it performs an "update" action on the application, which will usually result in the application being stopped and restarted by WebSphere Application Server.
This process of publish --> update --> stop --> restart can take awhile. The only way to prevent this process is to completely turn OFF automatic publishing in Rational Application Developer V7.0. To do this, double click on the server to bring up the server overview page, go to the publishing section and select "Never publish automatically", and then save the change. Then you can make as many changes to your application as needed, and Rational Application Developer will NOT automatically publish every time. Of course, when you are ready to publish the application changes, you will need to do so manually by right-clicking on the server and choosing "Publish". Although you will not be using automatic publishing, you should ensure that Rational Application Developer is configured to "Build Automatically" to ensure that the compiled content is up-to-date (make sure project --> build automatically is checked).
Note that WebSphere Application Server can automatically detect changes to JSP and Java class files, and pick-up those changes without requiring a 'Publish'. To configure WebSphere Application Server so that it will automatically pick-up changes to JSP and Java class files, do the following:
- In Rational Application Developer V7.0, remove all applications from the WebSphere Application Server. Right click on the server and choose Add and Remove projects. Then, click Remove All, and click Finish.
- Double click on the server to bring up the Server Overview page, and then change the Publishing option to Run server with resource within the workspace.
- Also change Automatic Publishing to Never publish automatically. Save these changes in Rational Application Developer.
- Add the application to the server (Add / Remove Projects...) and open the WebSphere Application Server administrative console.
- Under Applications > Enterprise Applications > application_name, click Class loading and update detection. Make sure that the option Reload classes when application files are updated is checked, and that the polling interval has a non-zero value such as 5 seconds.
- Under Applications > Enterprise Applications > application_name, click JSP reload options for web modules. Make sure that the option JSP enable class reloading option is checked and the reload interval has a non-zero value, like 5 seconds.
- Save the above changes in the WebSphere Application Server Administrative Console.
Now when you make changes to JSP files or Java class files that were already published, these changes will automatically be picked-up by WebSphere Application Server without having to republish from Rational Application Developer to WebSphere Application Server.
Note that proper functioning of JSP reloading and Java class Hot Code Replace in WebSphere Application Server does require the latest WebSphere Application Server fix packs. Update WebSphere Application Server to the latest fix pack level, including the fix pack for the Java SDK.
You can get the latest WebSphere Application Server fix packs from Recommended fixes for WebSphere Application Server.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21306325