### Clustering with BEA WebLogic Server 813

This section describes how to configure a WebLogic 813 cluster and then integrate JReport Enterprise Server in the cluster.

Assuming that the server cluster contains an admin server named adminNew (port 7001) and two managed servers named manage1 and manage2. Each clustered computer should have a unique IP address or host name.

#### Configuring a BEA WebLogic cluster

1. Start the Configuration Wizard. On Windows you can start it from the Start menu by selecting BEA WebLogic Platform 8.1 > Configuration Wizard.
2. Select Create a new WebLogic configuration, and then click Next.
3. In the Select a Domain Template page, select WLS Domain from the available template list, and then click Next.
4. Choose the Custom configuration, and then click Next.
5. In the Configure Administration Server page, enter the IP address of your machine in the Listen Address field. Change or accept the default settings for The Server Instance's Name and Listen Port. Then click Next.
6. In the Managed Servers, Cluster and Machine options panel, select Yes. Then click Next.
7. In the Configure Managed Servers page, click Add to add two managed servers as follows:

   Name | Listen Address | Listen port
   --- | --- | ---
   manage1 | 127.0.0.114 | 7006
   manage2 | 127.0.0.131 | 7007

   Note: Keep in mind that each server instance in your cluster, including the admin server and all managed servers, must have a unique Listen Address and Listen Port. If your managed server has the same Listen Address as the admin server, change the default values shown for the listen ports in this page, and enter the same Listen Address as you assigned to the Admin Server. After assigning a unique Listen Address and Listen Port combination, click the Add button to create another managed server.

8. In the Configure Clusters page, add a cluster as follows:

   Name | Multicast Address | Multicast Port | Cluster Addresses
   --- | --- | --- | ---
   Cluster_28 | 237.0.0.1 | 7001 | 127.0.0.114:7006, 127.0.0.131:7007

   Then click Next.

   Note: If there are other users configuring WebLogic clusters, contact your administrator to get the reserved multicast address and port and enter them here. The clustered servers use the multicast address for broadcasting heartbeats and for other server-to-server communications. If another application on your network is using the same multicast address, conflicts may generate and cause cluster problems.

9. In the Assign Servers to Cluster page, highlight the managed servers in the left column, and then use the right arrow button to assign the servers to the cluster listed in the right column. Then click Next.
10. In the Configure Machine page, add two machines as follows:

    Name Node | manager listen address Node | manager listen port
    --- | --- | ---
    Machine_zjh | 127.0.0.114 | 5555
    Machine_zwm | 127.0.0.131 | 5555

11. Assign servers to machines. Assign the server manage1 to the machine Machine_zjh and the server manage2 to the machine Machine_zwm.
12. In the Database(JDBC) Options page, select No. Then click Next.
13. In the Messaging(JMS) Options page, select No. Then click Next.
14. In the Configure Administrative Username and Password page, set User Name to weblogic and User Password to 12341234.
15. In the Configure Windows Options page, set Shortcut to No and Service to No. Then click Next.
16. Set Server Start Mode to Development Mode, and Java SDK to Sun SDK. Then click Next.
17. Create WebLogic configuration. Set Domain Name to madomain28 and Location to `C:\bea813\user_projects\domains\mydomain28`. Then click Create.
18. Copy domains from `C:\bea813\user_projects` from the admin server to the two managed servers.
19. Start the admin server on the admin server:

    `C:\bea813\user_projects\domains\mydomain28\startWebLogic.cmd.`

    Start the manage1 server on manage1 server:

    `C:\bea813\user_projects\domains\mydomain28\startManagedWebLogic.cmd`, and then log onto manage1 using the URL `http://127.0.0.148:7001`.

    Start the manage2 server on manage2 server:

    `C:\bea813\user_projects\domains\mydomain28\startManagedWebLogic.cmd`, and then log onto manage2 using the URL `http://127.0.0.148:7001`.

#### Configuring HTTP Dispatcher

1. Create web.xml and weblogic.xml in `c:\bea813\httproxy\WEB-INF`:

   `jar -cvf httproxy.war WEB-INF`

2. Create a new WebLogic server using the Configuration Wizard:

   Name | Listen address | Listen port
   --- | --- | ---
   httpdispatcher | All Local Addresses | 6000

3. Deploy httproxy.war to the new WebLogic server.
4. Log in `http://localhost:6000/console`.

#### Creating JReport Enterprise Server jreport.war and deploying it to the admin server

1. Go to Mydomain28 > Deployments > Web Application Modules.
2. Click the Deploy a New Web Application Module link.
3. Click Upload your file(s).
4. Select the jreport.war, and then click Upload.
5. Select adminNew > upload.
6. Select jreport.war and then click Target Module.
7. Select Independent Servers > adminNew.
8. Select Clusters > Cluster_28 and then select manage1 and manage2. Then click Continue.
9. Modify admin server C:\bea813\user_projects\domains\mydomain28\startWebLogic.cmd, add reporthome to the class path:

   `-Dreporthome=C:\JReport\Server`

10. Modify manage1 server C:\bea813\user_projects\domains\mydomain28\startManagedWebLogic.cmd, add reporthome to the class path:

    `-Dreporthome=C:\JReport\Server`

11. Modify manage2 server C:\bea813\user_projects\domains\mydomain28\startManagedWebLogic.cmd, add reporthome to the class path:

    `-Dreporthome=C:\JReport\Server`

12. Start admin server, manage1 and manage2 server, and the HTTP dispatcher server. Log in using the URL `http://127.0.0.148:6000/servlet/jinfonet/index.jsp`.