This script opens a new, small, floating window and puts TOC<name>.html and IX<name>.html files in it and sets a generic popup window code to enable the display of some viewlets in the WebLogic Platform Tour.
Previous Next

 Creating and Deploying to WebLogic Server Clusters

Tutorial 2: Starting the Cluster

This tutorial describes how to start the new cluster so that you can configure MedRec resources and deploy the MedRec applications.

The tutorial includes the following sections:

 

 

 

Prerequisites

Before starting this tutorial, create the MedRecCluster domain. See Tutorial 1: Creating a WebLogic Server Cluster.

 

 

 

Procedure

Follow these steps to start the MedRec cluster:

Step 1: Start PointBase.

Before configuring resources in the cluster, start the PointBase server in order to test the JDBC configuration in the steps that follow.

  1. Open a new command window by selecting Start—>Run... and entering cmd.exe in the resulting dialog box.

  2. Move to the WebLogic Server 8.1 tools subdirectory:
    cd c:\bea\weblogic81\common\eval\pointbase\tools
    

  3. Start PointBase by executing its start script:
    startPointBase.cmd
    

    The server starts and displays the message:

    Server started, listening on port 9092, display level: 3 ...
    

Step 2: Start the Administration Server for the cluster domain.

You will configure cluster resources using the Administration Console for the domain you created in the previous tutorial. To use the Administration Console, first start the Administration Server for MedRecClusterDomain:

  1. Open a new command window by selecting Start—>Run... and entering cmd.exe in the resulting dialog box.

  2. Move to the new MedRecClusterDomain directory you created in the previous tutorial:
    cd c:\bea\user_projects\domains\MedRecClusterDomain
    

  3. Open three additional command windows by entering the commands:
    start cmd
    
    start cmd
    
    start cmd
    

    You will use these additional command windows to start the Managed Servers in in Step 4: Start the Managed Servers in the cluster.

  4. Start the Administration Server by executing its start script:
    startWebLogic.cmd
    

    The server displays boot messages and finishes with the message:

    <Feb 19, 2003 2:10:08 PM PST> <Notice> <WebLogicServer> 
    <BEA-000360> <Server started in RUNNING mode>
    

Step 3: Edit the Managed Server startup scripts.

The MedRec application suite uses log4j for logging application messages. You must copy the log4j properties file from the installed MedRec domain and identify it using a startup option in the Managed Server startup scripts. For Web Services, you must also identify the .wsdl and the incoming directory for XML files. To complete these steps:

  1. Copy the log4j properties file from the pre-configured MedRec domain to the new domain you just created:
    cp c:\bea\weblogic81\samples\domains\medrec\log4j.properties 
    c:\bea\user_projects\domains\MedRecClusterDomain
    

  2. Open the startManagedWebLogic.cmd script for your new domain:
    notepad 
    c:\bea\user_projects\domains\MedRecClusterDomain\startManagedWe
    bLogic.cmd
    

  3. Find the following comment lines in the startManagedWebLogic.cmd script:
    @rem Set JAVA_OPTIONS to the java flags you want to pass to the 
    vm. i.e.: 
    
    @rem set JAVA_OPTIONS=-Dweblogic.attribute=value 
    -Djava.attribute=value
    

  4. Add the following line immediately after the above comments:
    set JAVA_OPTIONS=-Dlog4j.config=log4j.properties 
    -Dcom.bea.medrec.xml.incoming=incoming 
    -Dphys.app.wsdl.url=http://localhost:8001/ws_medrec/MedRecWebSe
    rvices?WSDL
    

  5. Save the file and exit your text editor.

Step 4: Start the Managed Servers in the cluster.

  1. In one of the command windows you opened in Step 2: Start the Administration Server for the cluster domain., enter the following command to start the MedRec1 server:
    startmanagedweblogic MedRec1 http://127.0.0.1:7001
    

  2. Repeat Step 1 with the remaining command windows to start the other servers in the cluster. Use the commands:
    startmanagedweblogic MedRec2 http://127.0.0.1:7001
    
    startmanagedweblogic MedRec3 http://127.0.0.1:7001
    

Step 5: Invoke the Administration Console for MedRecServer in your browser.

Use the Administration Console to verify that Managed Server instances in the cluster have booted successfully.

  1. Open a browser window and enter the following URL:
    http://127.0.0.1:7001/console
    

  2. Enter weblogic as the username and password, then click Sign In.

  3. Expand the Clusters node in the left pane and select MedRecCluster.

  4. Click the Monitoring tab in the right pane, and monitor the startup process for the Managed Servers. Continue with the next tutorial when all servers in the cluster show the "RUNNING" state. (Use the refresh button in the right pane to ensure that the contents of the monitoring page update at regular intervals.)

 

 

 

Best Practices

The Configuration Wizard installs the startManagedWebLogic.cmd script to help you start Managed Servers in a multi-server domain. When using this script, you need only specify the name of the server to start, and the URL to contact the Administration Server for the domain.

 

 

 

The Big Picture

The cluster you have created and started represents a typical cluster used on a development or multihomed machine. The configuration and root directories for all servers reside on the same physical machine, and each server listens on its own address.

In a development environment, localhost addresses can be used to provide unique listen addresses for each server (as they are in this tutorial). In a production environment, a multihomed machine would generally include multiple Network Interface Cards (NICs) or a multihomed NIC to provide the cluster addresses, as well as multiple CPUs to manage the load of the clustered servers.

 

 

 

Related Reading

 

 Back to Top Previous Next