Using Oracle Coherence*Web 3.4.2 with Oracle WebLogic Server 10gR3
Part 1: Installation

Purpose

This tutorial shows you how to install Oracle Coherence*Web 3.4.2 (or later) support on Oracle WebLogic Server 10gR3.

Time to Complete

Approximately 30 minutes

Topics

This tutorial covers the following topics:

 Overview
 Scenario
 Prerequisites
 Applying a Patch to WebLogic Server

Creating the WebLogic Server Domains and Installing Coherence*Web Libraries

Creating a Launch Script for the Coherence Cache Server
 Summary
 Related Information

Viewing Screenshots

 Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so the response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step.

Overview

Oracle Coherence*Web is an extension module that is built on top of Oracle Coherence and handles HTTP session management for Web application servers such as Oracle WebLogic Server, IBM WebSphere, Tomcat, and others. Coherence*Web support can be added to Oracle WebLogic Server (WLS) in just a few steps because it is packaged as a native WebLogic session management Service Provider Interface (SPI).

This tutorial is the first of a two-part tutorial that covers the installation of Coherence*Web in a WLS domain. Part 2 covers configuring an application to use Coherence*Web and testing it against two separate running domains.

Back to Topic List

Scenario

Oracle WebLogic Server 10gR3 must be patched in order to use Coherence*Web. An update utility is bundled with the Application Server that can make obtaining or installing patches easy. When the server is ready, installing support for Coherence*Web is as simple as copying a library into your domain’s lib folder, and then installing it as a shared library.

Back to Topic List

Prerequisites

Before starting this tutorial, you should:

1.

Install the following software:

  • Oracle Coherence 3.4.2 (or later) for Java ( Download)
  • Oracle WebLogic Server 10gR3 ( Download)

There is a tutorial that discusses setting up a development environment for Oracle Coherence and Oracle WebLogic Server (and uses the Eclipse IDE). You should complete that tutorial before this one. (It covers the information needed to install Oracle Coherence and Oracle WebLogic Server as well as the setup of a WebLogic domain that you will need for this tutorial.) You can find it by following this link: Oracle Coherence and Oracle WebLogic Server: Setting Up an Eclipse Development Environment.

Although you can install the products in locations of your choice, the following generic labels refer to these locations in the tutorial instructions:

  • $MIDDLEWARE_HOME: The product installation location for Oracle WebLogic Server (The current installation documentation refers to this as BEA_HOME.)
  • $COHERENCE_HOME: The location of your Oracle Coherence installation
  • $DOMAIN_HOME:The location of the WebLogic Server domain that you will create

 

2.

Consult the following documentation before this tutorial:

 

Back to Topic List

Applying a Patch to WebLogic Server

To use Coherence*Web on WebLogic Server 10gR3, a patch must be applied to the WLS installation. A utility called Smart Update is part of the Oracle WebLogic Server installation and is used to find, download, and install patches. It requires that you have an Oracle support account. If you do not already have an account, you can create one here.

 Patch WebLogic Server

Back to Topic List

 

To download and apply the Coherence patch to WebLogic Server 10gR3, perform the following steps:

1.

Access the Smart Update utility by going to Start > Programs > Oracle WebLogic > Smart Update.

 

2.

When the Login screen appears, log in with a valid Oracle support ID.

Note: If you are an Oracle customer and are unsure of your support ID, please contact Oracle support for more information.

 

3.

Click the Get Patches tab and select the check box for patch 6W2W. Then click Download Selected.

Note: Patch 6W2W is a replacement for N41D, which may be referenced in other documentation.

 

4.

Select No to check for conflicts later, and then click OK. (You will check for conflicts after the patch is downloaded.)

 

5.

Click the Manage Patches tab, and then click the Apply button for the downloaded patch .

 

6.

Click OK in both the Support Notice and the Performing Validation dialog boxes.

 

7.

After the patch is shown as installed, close the Smart Update utility.

 

Back to Topic

Back to Topic List

 

Creating the WebLogic Server Domains and Installing the Coherence*Web Libraries

The Oracle WebLogic Server Coherence*Web SPI consists of the coherence-web-spi.war file, which is located in the $COHERENCE_HOME\libdirectory in the Coherence distribution. The coherence.jar file, which is located in the same directory, is also necessary for enabling the Coherence*Web functionality in WebLogic Server.

Create WebLogic Server domains
Copy and deploy the needed Coherence library resources

If you have already created the WLS_A domain during the Oracle Coherence and Oracle WebLogic Server: Setting Up an Eclipse Development Environment OBE tutorial, you can skip to Create the Second WebLogic Server Domain.

Back to Topic List

To create WebLogic Server domains, perform the following steps:

1.

Read the following documentation on creating an Oracle WebLogic Server domain with the Domain Configuration Wizard.

http://download.oracle.com/docs/cd/E12840_01/common/docs103/confgwiz/index.html

 

2.

Open the WebLogic Domain Configuration Wizard by selecting Start > All Programs > Oracle WebLogic > WebLogic Server 10gR3 > Tools > Configuration Wizard.

image

 

3.

Select the Create a new WebLogic domain option and click Next.

image

 

4.

Create a domain based on WebLogic Server (accept the default that is presented). Click Next.

image

 

5.

Enter the login credentials to be used. Enter weblogic as the username and weblogic as the password.

image

 

6.

Accept the defaults for Development Mode and the JDK ( Sun SDK 1.6), and click Next.

image

 

7.

Select No for any further changes. Click Next.

image

 

8.

Name the domain WLS_A, choose the location, and then click Create to generate the domain.

image

 

9.

When finished, make sure that Start Admin Server is not selected. Click Done.

image

A complete WebLogic Server domain called WLS_A has been created. The default administration port for WebLogic Server is 7001, which is what was set in this instance.

 

10. Create the second WebLogic domain.

Perform the previous steps again to create a second domain called WLS_B. The only difference, other than the domain name, should be to select Yes in the "Customize Environment and Services Settings" dialog box. Click Next.

image

Now, follow these steps to complete creating the WLS_B domain.

 

11.

Click Next in the "Configure RDBMS Security Store Database" dialog box.

image

 

12.

In the "Configure the Administration Server" dialog box, change the port number to 7201 and click Next.

image

 

13.

Click Next for each of the following screens until you reach the "Create WebLogic Domain" screen.

Change the name to WLS_B and set the location to the same general area in which you created the WLS_A domain.

Click Create.

image

 

14.

Click Done to exit the wizard.

 

15.

Test whether each of the domains start and verify that the patch you installed in section 1 is being applied to the domains.

Start your domain by running the start script $DOMAIN_HOME\WLS_A\startWebLogic.cmd , and verify that the patch is listed. You have to scroll up towards the top of the screen buffer. Look for the following line:

<Oct 15, 2009 3:10:11 PM CDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch 
for 8557089 Fri May 29 10:39:28 IST 2009

Remember to test the WLS_B domain startup as well.

Back to Topic

 

To install the required Coherence*Web libraries in your WebLogic Server domains, perform the following steps:

1.

Copy the coherence.jar file from the $COHERENCE_HOME\lib folder to the $DOMAIN_HOME\WLS_B\lib folder so that Coherence can run within the WLS_B domain. If you have not performed this step for the WLS_A domain, repeat this step for that domain.

 

2.

Make sure that the domain server WLS_A is running and access the WebLogic Administration Console with a Web browser:

http://localhost:7001/console

Log in as weblogic/weblogic.

(You could also use whatever you chose as your domain credentials.)


3.

Click Deployments.

 

4.

Click the Install button. Browse to the $COHERENCE_HOME/lib folder and select coherence-web-spi.war.

Click Next.

 

5.

Select Install this deployment as a library and click Next.

 

6.

Accept all the defaults. Click Finish.

 

7.

Verify that the deployment is listed as Active.

 

8.

Important: Log out of the server Administration Console by clicking the Log Out link.

Note: This is important because the default behavior of the WLS Admin Console is to lock the configuration if the Admin Console is active. This will prevent you from deploying to WebLogic Server from Eclipse in the following tutorial.

 

9. Run steps 1 through 8 again on the WLS_B domain. Remember that the port number you should use is 7201 at step 2.

Back to Topic

Back to Topic List

Creating a Launch Script for the Coherence Cache Server

The defaultcache-server.cmdscript to launch Coherence does not reference the libraries needed for Coherence*Web. In this section, you create a modified start script that is properly configured to start a Coherence cache server that will handle the HttpSession-caching duties for WebLogic Server.

 Creating the Coherence cache server launch script

Back to Topic List

To create a properly configured Coherence*Web Cache Server, perform the following steps:

1.

Go to the $COHERENCE_HOME\bin folder. Make a copy of cache-server.cmd and name it web-cache-server.cmd.

 

2.

Open web-cache-server.cmd in a text editor and add the following (in bold) to the launch line:

         java -server -Xms512m -Xmx512m -cp <Coherence installation dir>/lib/coherence.jar;
          
                              
<Coherence installation dir>/lib/coherence-web-spi.war 
         -Dtangosol.coherence.management.remote=true 
         -Dtangosol.coherence.cacheconfig=WEB-INF/classes/session-cache-config.xml
                              
-Dtangosol.coherence.session.localstorage=true com.tangosol.net.DefaultCacheServer

(where <Coherence installation dir> is the path to your Coherence installation)


3.

Start a Coherence cache server by running the web-cache-server.cmd script and ensure that it starts up properly.

 

Back to Topic

Back to Topic List

Summary

In this lesson, you learned how to:

 Find and apply patches required for Coherence*Web to WebLogic Server
 Copy and install the needed libraries for Coherence*Web in your WebLogic Server domains
 Create a launch script for the Coherence*Web cache server

You have now installed the required libraries for Coherence*Web to function as an externally scalable Web session cache for applications running on Oracle WebLogic Server. But this is not an automatic condition for the applications. The Coherence*Web cache does not replace the native WebLogic Server session system. Applications must be specifically configured for it and there are several different models it can work in.

Part 2 of this tutorial will cover the simple development, configuration, and deployment and testing of an application that uses Oracle Coherence*Web to cache its session data.

Back to Topic List

Related Information

To learn more about Coherence*Web, you can refer to:

bullet Oracle Coherence on OTN
bullet Oracle Coherence 3.4x Documentation
bullet Oracle Coherence Knowledge Base Dashboard
bullet Oracle Coherence Incubator
bullet Oracle Coherence OBE section on the OTN Web site

Back to Topic List

 Place the cursor over this icon to hide all screenshots.