Sun ONE logo      Previous      Contents      Index      Next     

Sun ONE Portal Server 6.2 Installation Guide

Appendix B
BEA WebLogic Server


Setting Up Sun ONE Portal Server on BEA Clusters

This section gives a brief description and example of how the Sun™ ONE 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.
  • SRA does not work with clusters.
  • The BEA WebLogic Server proxy does not load balance. All server instances in a BEA WebLogic cluster must use the same listen port. The new cluster servlet needs to be used for weblogic.servlet.proxy.HttpClusterServlet.
  • Resonate 3.3 cannot load balance a BEA WebLogic cluster.

For our example, there are five machines. All the machines must be on the same subnet. One has a directory server only (DSmach). Another is the BEA WebLogic administration server (AS). There are three cluster machines (CS1, CS2, and CS3). If you want to support load balancing, an additional machine or the administration server machine may be configured as a proxy servlet for load balancing. You may also use a hardware-based load balancer. Load balancing is needed for clusters. In this example, the proxy is on the administration server.

Install the directory server on DSmach. Install BEA WebLogic Server on all four of the other machines using the default installation. Check that all servers are working correctly.

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

Next install the Portal Server software on the four machines to the managed server instance (PORTALSERVER).

  1. Respond n to the question: Use these settings? [y]/n
  2. A list of questions follows.

  3. Accept the default values except for these questions. These questions show the values that need to be changed and important default values. This example is for the BEA WebLogic administration server. The installation values for the cluster machines is similar.
  4. What is the Application Server domain? [mydomain] NEWDOMAIN

    What is the Application Server instance? [myserver] PORTALSERVER

    What is the Application Server administration port? [7001]

    What port should be used to access the Portal Server? [80]

    Use an existing Directory Server? y/[n] y

    What is the name of the directory server?[...] DSmach

    Answer the questions about the directory server appropriately.

  5. Stop and restart all the servers (the Portal Server, the managed server and the administration server) on all the machines.
  6. Check and see that the installations were successful.
  7. Log in to the Sun ONE Identity Server admin console as administrator.
  8. By default, Identity Management is selected in the location pane and All created organizations are displayed in the navigation pane.

  9. Choose Service Configuration in the location pane.
  10. Click on the Properties arrow next to Platform in the navigation pane.
  11. Check that the Server List has the full-ps-servername for the machine you plan to put the proxy on. In our example, the machine is http://AS.example.com:80.
  12. Click Save.

To set up a cluster:

  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 servername: 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 are going to use a proxy servlet for load balancing, create a web.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 file is the only file in a directory (WEB-INF). Use the fully qualified machine names in the file.

Figure B-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>

  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. Deploy the .war file on the BEA WebLogic administration server using the java weblogic.deploy command supplied by the BEA WebLogic Server software.
  4. In the BEA WebLogic Server administration console on the administration server, expand Servers and select PORTALSERVER:80.
  5. Click the HTTP tab.
  6. Set the Default Web Application to the proxy.
  7. Restart the Portal Server.
  8. Or after making the .war file, copy the .war file to the applications directory in the new domain on the administration machine (AS).

  9. Select Web Applications.
  10. Click Configure a new Web Application.
  11. Enter proxy as the Name and give the complete path to the .war file.
  12. Click Create.
  13. In the left pane under Web Applications, click proxy.
  14. In the right pane, click the Target tab, and move Portal Server from the Available box to the Chosen box.

Next you need to deploy the Portal Server software to the cluster. For each web application (amconsole, amserver, amcommon, ampassword and portal) follow these steps.

  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 one of the Portal Server software web applications (amconsole, amserver, amcommon, ampassword and portal).
  3. Undeploy the admin server (you have installed Portal on the PORTALSERVER server, but it is not part of the cluster, so now you remove it from this server).
    1. Select the Target tab, then the Servers sub-tab.
    2. Move your server name from Chosen to Available box and click Apply.
  4. Click the Edit Web Application Descriptor link; click the Configure a new Web App Ext Descriptor link.
  5. In the left pane under WebApp Ext, Select Session Descriptor.
  6. In the right pane, change Persistent Store Type to replicated. Click Apply.
  7. Select top topic in the left pane, Web Descriptor or Identity Server Services. Select Persist. Close this window.
  8. Select the Target tab, then the Cluster sub-tab.
  9. Move your cluster name (NEWCLUSTER) from Available to Chosen box and click Apply.
  10. For each of the three Portal Server machines, go to the identity-server-install-root/SUNWam/lib directory and open the AMConfig.properties files with a text editor.
  11. Set the following values on all the machines:
  12. com.iplanet.am.session.failover.enabled=true

    com.iplanet.am.replica.enable=true

    com.iplanet.am.naming.url=http://AS.example.com:80/amserver/namingservi ce

    com.iplanet.am.notification.url=http://AS.example.com:80/amserver/notif icationservice

    com.iplanet.am.session.server.host=AS.example.com

    com.iplanet.am.server.host=ASNMS.example.com

    com.iplanet.services.cdsso.CDCURL=http://AS.example.com:80/amserver/cdc servlet

    com.iplanet.services.cdc.authLoginUrl=http://AS.example.com:80/amserver /login

  13. Stop and restart all the servers. For the managed servers, on each machine, type:
  14. ./startManagedWebLogic.sh managed-servername http://AS.example.com:80

  15. Check to see if all is working well.


Setting the Cookie Encoding Values

The com.iplanet.am.cookie.encode property in the AMConfig.properties file should be set to “true” when the target web container is BEA WebLogic Server or WebSphere Application Server. This is necessary because WebLogic does not automatically encode cookie values set by web applications.

Setting com.iplanet.am.cookie.encode to “true” under BEA WebLogic Server and IBM WebSphere Application Server will prevent characters like the comma, semi-colon and white space to be set in cookie values by Sun ONE Identity Server without being escaped or encoded. When characters such as comma, semi-colon and white space are set as cookie values directly without being encoded or escaped, some web browsers will not parse the cookie value correctly. Thus, the application will receive corrupted cookie values in subsequent requests.

When the target web container is WebLogic, edit the AMConfig.properties file and set the value of the com.iplanet.am.cookie.encode property to true.



Previous      Contents      Index      Next     


Copyright 2003 Sun Microsystems, Inc. All rights reserved.