## Clustering JReport Server with Oracle WebLogic Server 12c (12.1.3)

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

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

### Installing Oracle WebLogic Server 12c (12.1.3)

1. Run the installation file fmw_12.1.3.0.0_wls.jar downloaded from Oracle website to start the Oracle Fusion Middleware 12c WebLogic Server and Coherence Installation wizard.
2. Click Next. In the Installation Type screen, choose Coherence Installation.
3. Keep clicking Next till the Installation Complete screen, then click Finish to finish the installation.

### Configuring an Oracle WebLogic cluster

1. Start the Configuration Wizard. On Windows you can start it from the Start menu by selecting Start > All Programs > Oracle > OracleHome > WebLogic Server 12c (12.1.3)> Tools > Configuration Wizard.
2. In the Create Domain page, select Create a new domain and then click Next.
3. In the Templates page, check Create Domain Using Product Templates and choose WebLogic Coherence Cluster Extension - 12.1.3.0 [wlserver] from the available templates list, and then click Next.
4. In the Administrator Account page, enter the name and password, and then click Next.
5. In the Domain Mode and JDK page, choose Production for Domain Mode and Oracle HotSpot 1.7.0_40 D:\Java\JDK17~1.0_4 for JDK. Click Next.
6. In the Advanced Configuration page, keep the three advanced configuration options selected, then click Next.
7. In the Administration Server page, enter the IP address of your machine in the Listen Address field. Change or accept the default settings for Server Name and Listen Port. Then click Next.
8. In the Node Manager page, choose Per Domain for Node Manager Type. and then click Next.
9. In the Managed Servers page, click Add to add two managed servers and a proxy server as follows:

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

   Note: Keep in mind that each server instance in your cluster, including the admin server, proxy 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.

10. In the Clusters page, add a cluster named Cluster_28. Then click Next.
11. In the Assign Servers to Clusters page, highlight the managed servers and the proxy server 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.
12. In the Coherence Clusters page, set the Cluster Name as defaultCoherenceCluster and Unicast Listen Port as 0, and then click Next.
13. In the Machines 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 | 5556

14. Assign servers to machines. Assign the admin server, server manage1 and the proxy server to the machine Machine_zjh.
15. Review your configuration specifications and configure the domain. Set Domain Name to mydomain28 and Location to `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28`. Then click Create.

16. Start the servers on machine Machine_zjh:

    Start the admin server on the admin server:

    `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28\bin\startWebLogic.cmd.`

    Start the node manager:

    `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28\bin\startNodeManager.cmd.`

    Start and log onto the proxy server on the proxy server:

    `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28\bin\startManagedWebLogic.cmd proxy http://127.0.0.114:7001`.

    Start and log onto the manage1 server on manage1 server:

    `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28\bin\startManagedWebLogic.cmd manage1 http://127.0.0.114:7001`.

17. Now let's configure another managed server. Repeat step 1 to 8 for manage2.

18. Skip the Managed Servers page, the Clusters page and the Assign Servers to Clusters page. In the Coherence Clusters page, set the Cluster Name as defaultCoherenceCluster and Unicast Listen Port as 0, and then click Next.
19. Skip the Machines page. In the Assign Servers to Machines page, assign server manage2 to the machine Machine_zwm. Then click Next.
20. In the configuration Summary page, also set Domain Name to mydomain28 and Location to `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28`. Then click Create.

21. Start the servers on machine Machine_zwm:

    Start the admin server on the admin server:

    `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28\bin\startWebLogic.cmd.`

    Start the node manager:

    `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28\bin\startNodeManager.cmd.`

    Start and log onto the manage2 server on manage2 server:

    `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28\bin\startManagedWebLogic.cmd manage2 http://127.0.0.114:7001`.

### Deploying JReport to the Oracle WebLogic cluster

1. Start WebLogic by running startWeblogic.cmd in `C:\Oracle12c\Middleware\Oracle_Home\user_projects\domains\mydomain28\bin`.
2. Access the WebLogic Server Administrative Console 12c by using URL `http://127.0.0.114:7001/console/`, where 127.0.0.114 is host name or IP address, and 7001 is the port number.
3. Go to Home > Summary of Environment > Summary of Servers > Summary of Deployments. In the Available targets for jreport section, choose the cluster named Cluster_28 and check Part of the cluster, then choose the two managed servers manage1 and manage2. Click Finish to finish selecting deployment targets.
4. Go to Home > Summary of Environment > Summary of Servers > Summary of Deployments > jreport, click the Save button to save the settings for jreport. When you see the message Settings updated successfully, click the Activate Changes button in the Change Center panel on the left.
5. Continue to go to Home > Summary of Environment > Summary of Servers > Summary of Deployments > jreport > Summary of Deployments. In the Deployments section of Control panel, click the Start drop-down list and choose Servicing all requests. Click the Lock & Edit button in the Change Center panel on the left.
6. Wait until the deployments state of jreport changes to Active.
7. Start JReport Server using the URL `http://127.0.0.114:7008/jreport`. 127.0.0.114 is host name or IP address for the proxy server, and 7008 is its port number.