Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2004Q2 Administration Guide 

Chapter 17
BEA WebLogic Server


Setting Up Portal Server on BEA Clusters

This section gives a brief description and example of how the Sun Java™ System Portal Server software can be used with BEA WebLogic Server™ clusters.


Note

  • For a cluster, all the machines must be on the same subnet. All BEA WebLogic Server instances participating in the cluster must listen on the same port. In order to run the Portal Server software with session failover successfully you need three managed servers running the Portal Server software.
  • Do not run perftune if you are planning on using clusters.
  • The cluster servlet that needs to be used for proxy is weblogic.servlet.proxy.HttpClusterServlet.
  • Resonate 3.3 cannot load balance a BEA WebLogic cluster.

For this example, there are five machines. All the machines must be on the same subnet. One has Identity Server and Directory Server (IS). Another is the BEA WebLogic administration server (AS). There are three cluster machines (CS1, CS2, and CS3). Load balancing is needed for clusters. In this example, the proxy is on the administration server.

Install Identity Server and Directory Server on the IS machine. Install BEA WebLogic Server on all four of the other machines using the default installation. Check that all servers are working correctly. On the administration server(AS) machine with BEA WebLogic Server, using the BEA WebLogic instructions, create a new domain (NEWDOMAIN) consisting of an administration server with listen port of 80. The name of the instance should be PORTALSERVER.

Install the Sun Java™ System Portal Server software on the AS machine with the following details.

On the other three machines with BEA WebLogic Server, using the BEA WebLogic instructions, create a new domain (NEWDOMAIN on all the three machines) consisting of an administration server with listen port of 7001 (ADMINSERVER on all the three machines) and another server with a listen port of 80 (PORTALSERVER on all the three machines). Each listen port should be the same; the example uses 80.

Next install the Portal Server software on the three machines to the managed server instance (PORTALSERVER) giving the following details.

On machines AS, CS1, CS2, and CS3, perform the steps required for deploying portal as mentioned in chapter 2.

To set up a cluster:

On the administration server(AS) machine with BEA WebLogic Server, using the BEA WebLogic instructions, create a new server instance listen port of 7001 and make the instance the administration server instance.

  1. Using the administration console of the admin machine AS (http://AS:7001/console), create a server for each of the machines to be in the cluster.
    1. Select Servers, configure new Server.
    2. Use the machine name for the new server name: CS1, CS2, and CS3.
  2. Stop all the servers on the machines to be in the cluster.
  3. Restart those servers, but have them connect to the administration server AS. For example,
  4. ./startManagedWebLogic.sh CS1 AS:7001

  5. Using the administration console of the administration machine AS (http://AS:7001/console), create the cluster.
    1. Select Clusters, Configure a new Cluster.
    2. For Name, the example uses NEWCLUSTER.

    3. For Address, put in the names for the servers representing the machines to be clustered: CS1,CS2,CS3.
    4. Inside this same window, select the Servers tab, then select the servers CS1, CS2, and CS3; move them from the Available box to the Chosen box.

For more detail, see the BEA WebLogic Server instructions to set up a cluster.

As you set up clusters remember the following:

Check to see that cluster is set up correctly by going the BEA WebLogic Server administration console, selecting Cluster in the left pane, selecting the Monitoring tab in the right pane, then select Monitor server participation in cluster. If one or more of the started server instances does not appear in the display, use the BEA WebLogic Server tool to verify the correct multicast addresses and port numbers.


Note

If you want to start and stop the BEA WebLogic managed servers remotely from the administration console, you need to configure and run a BEA Node Manager. See the BEA WebLogic Server documentation for detailed information.


If you plan on using a proxy servlet for load balancing, create a web.xml, and a weblogic.xml file for your cluster to use to configure the load balancing servlet. Using a temporary directory make a subdirectory WEB-INF. The web.xml, and the weblogic.xml files are the only files in a directory (WEB-INF). Use the fully qualified machine names in the file.

Code Example 17-1  Sample web.xml File

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.

      //DTD Web Application 2.2//EN"

      "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

     <web-app>

     <servlet>

         <servlet-name>HttpClusterServlet</servlet-name>

             <servlet-class>

                 weblogic.servlet.proxy.HttpClusterServlet

             </servlet-class>

         <init-param>

             <param-name>WebLogicCluster</param-name>

             <param-value>

                   CS1.domain.COM:80:7002|CS2.domain.COM:80:7002|CS3.domain.COM:80:7002

             </param-value>

         </init-param>

     </servlet>

     <servlet-mapping>

         <servlet-name>HttpClusterServlet</servlet-name>

         <url-pattern>/</url-pattern>

     </servlet-mapping>

     <servlet-mapping>

         <servlet-name>HttpClusterServlet</servlet-name>

         <url-pattern>*.jsp</url-pattern>

     </servlet-mapping>     

     <servlet-mapping>

         <servlet-name>HttpClusterServlet</servlet-name>

         <url-pattern>*.htm</url-pattern>

     </servlet-mapping>

     <servlet-mapping>

         <servlet-name>HttpClusterServlet</servlet-name>

         <url-pattern>*.html</url-pattern>

     </servlet-mapping>

     </web-app>

Code Example 17-2  Sample weblogic.xml File

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"

"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

<weblogic-web-app>

  <context-root>/</context-root>

</weblogic-web-app>

  1. Make web.xml with your cluster server values into a .war file. In a terminal window, type:
  2. jar cvf proxy.war WEB-INF

  3. Copy the .war file to the applications directory in the NEWDOMAIN on the administration machine (AS)
  4. Deploy the proxy.war to the PORTALSERVER instance.

Next you need to deploy the Portal Server software to the cluster.

  1. Go to the BEA WebLogic Server administration console for the administration server (AS:7001/console).
  2. Expand Web Applications in the left pane, then select Portal.
  3. Click on Targets tab. Uncheck PORTALSERVER and check “All servers in the cluster” and click Apply.
  4. Stop and restart all the servers. For the managed servers, on each machine, type:
  5. ./startManagedWebLogic.sh managed-servername http://AS.example.com:7001



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.