Overview
Version
| WebSphere Server Version |
|---|
WebSphere 8.5 |
Application Scenario
1. For convenience, you want to change the server port instead of using the default port.
2. When running, a Java application consumes the memory of the web application server. If the server runs out of memory, Out of Memory (OOM) errors may occur. To address this, you need to adjust the server's memory settings.
3. After the application file is changed, you need to update the FanRuan application deployed on the WebSphere server.
Function Description
This document describes how to modify the port number, memory settings, and other JVM configurations for the WebSphere server, and how to restart the FanRuan application deployed on WebSphere.
Modifying the Port Number
1. Log in to the WebSphere administration console as the admin.
2. On the navigation panel, choose Servers > Server Types > WebSphere Application Server.
3. Click the application server to be modified, and choose Communications > Ports.

4. Click WC_defaulthost, and modify the value of Port to change the project port.
5. Click Apply to save the change.
6. Restart the WebSphere server for the change to take effect.

Modifying Memory Settings and JVM Parameters
1. Log in to the WebSphere administration console as the admin.
2. On the navigation panel, choose Servers > Server Types > WebSphere Application Server.
3. Click the application server to be modified, and choose Server Infrastructure > Java and Process Management > Process definition.

4. Click Java Virtual Machine, and modify the initial heap size and maximum heap size.
5. You can add and modify JVM parameters in Generic JVM arguments.
-Xss1024k
-Xgc:parallel
-XX:MaxPermSize=4096m
-XX:MaxDirectMemorySize=2048m
5. Click Apply to save the server configuration changes.
7. Restart the WebSphere server for the change to take effect.

Updating the Application File
This section describes how to update the FanRuan application deployed on the WebSphere server after the application file is changed.
Example scenario: manually updating the JAR package for a minor version update.
1. Locate the file under the deployment directory of the report application on the WebSphere server.
For example, C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\WIN-O9584D1PVIINode01Cell\webroot_war.ear\webroot.war
2. Replace the JAR file in the path webroot.war\WEB-INF\lib with the new one.
3. If you access the FanRuan application at this point, a 404 error will be returned. You need to restart the application for the new JAR file to take effect.
4. Log in to the WebSphere administration console as the admin.
5. On the navigation panel, choose Applications > Application Types > WebSphere enterprise applications.
6. Tick the resource to be updated, click Stop, and then click Start. The report application will be successfully updated in this way.
7. When you access the FanRuan application again, the new JAR file has already taken effect.
