
Clustering with IBM WebSphere Server 5.1
The following example describes how to configure a WebSphere 5.1 cluster and then integrate JReport Enterprise Server in the cluster.
Configuring a WebSphere 5.1 cluster
Assuming that there are four computers named admin-PC, PC1, PC2, and PC3 in the server cluster. The admin-PC is used as a dispatcher. Each clustered computer should have a unique IP address and host name.
Take the following steps:
- Installation
- Install IBM Http Server1.3.28 on admin-PC.
- Install IBM WebSphere Network Deployment Server 5.1 on admin-PC. Set Admin Console Port to 9091 and Soap Connector Address to 8889.
- Install IBM WebSphere Application Server 5.1 on PC1, PC2, and PC3.
- Adding PC1, PC2, and PC3 to Deployment Manager
- Start Deployment Manager on admin-PC.
- On PC1, go to the folder
<WebSphere_Application_server_install_root>/bin. Then, use the command addnode.bat admin-pc 8889 to add the node agent to Deployment Manager. Where 8889 is the Soap Connector Address of the Deployment Manager.
- After receiving the successful message, perform the same action on PC2, and then on PC3. Never do this on more than one node at a time.
After that, on each node there is a node agent running.
-
Creating a cluster
- Open a web browser and then use the URL
http://admin-pc:9091/admin to open the Deployment Manager Administrative Console.
- In the Administrative Console, go to Servers > Clusters.
- Click New to create a new cluster.
- Input a cluster name jreport-cluster. Uncheck the Prefer Local option and check the Create Replication Domain for this cluster option. Then click Next.
- Input a clone name clone1 and then select PC1 to assign to. Check the Generate Unique Http Ports and Create Replication Entry in this Server options. Select the Default application server template option. You also can assign a value to weight of this clone. Then click Apply.
- Repeat the above step to create clone2 and clone3 which are assigned to PC2 and PC3. Then click Next.
- Click Finish. Now, you can start the cluster jreport-cluster.
- Testing the cluster workable
- By default, after installing the WebSphere Application server, there is a standalone server instance named server1 created. The server1 uses port 9080 for the HTTP transport. When a clone is created, another unique HTTP port is created. In this demonstration, this port on clone1, clone2, and clone3 are all set to 9081. You need to add this port to the host alias. Follow Environment > Virtual Hosts > default_host > Host Aliases > New to do this.
- Deploy the DefaultApplication.ear from
<WebSphere_install_root>/installableApps. During the deployment, map the application to the cluster jreport-cluster.
- When the deployment has finished, start the application. You can then use these URLs to test whether the clones work or not:
http://PC1:9081/hello
http://PC2:9081/hello
http://PC3:9081/hello
- Working with IBM Http Server
- In the Administrative Console, use Environment > Update Web Server Plugin to generate the plugin-cfg.xml file. The file will be generated in
<Network_Deployment_install_root>/config/cells.
- Edit the httpd.conf in
<Http_Server_root>/conf by adding the following lines:
LoadModule ibm_app_server_http_module "d:\WebSphere\AppServer/bin/mod_ibm_app_server_http.dll"
WebSpherePluginConfig "d:\WebSphere\ DeploymentManager\config \cells\plugin-cfg.xml"
The plugin file should point to the one generated before.
- Start Http Server, then test the working load, using the following URL:
http://admin-pc/snoop
Integrating JReport Enterprise Server in the cluster
- Create a WAR file including the JReport Enterprise Server application. Be sure to add
<load-on-startup> in the web.xml.
For information about creating a JReport Enterprise Server WAR file, see Building a WAR/EAR file to include a self-contained JReport Enterprise Server.
- Deploy the application WAR. Make sure that it is mapped to the cluster. Set context root to
/jreport.
- Set JVM parameter –Dreporthome in each clone.
- Regenerate the plugin-cfg.xml file.
- Copy the admin, dhtmljsp, images, javascript, jinfonet, and style folders to
<http_server_root>/htdocs/en_US.
- Start the JReport application and then restart the HTTP server.
- Access JReport using the following URLs:
http://admin-pc/jreport/jrserver
http://admin-pc/jreport/jinfonet/index.jsp
