Skip Headers
Oracle® Web Services Manager Administrator's Guide
10g (10.1.3.4)

Part Number E12575-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

10 Oracle WSM Cloning and Horizontal Migration

This chapter contains the following sections:

Cloning Oracle Web Services Manager

The Oracle Web Services Manager cloning feature creates a mirror image of your Oracle WSM environment.

Note:

If you want to migrate only selected Oracle WSM components, policies, or custom steps, then use the migration feature described in "Migrating Oracle Web Services Objects".

Where to Use Cloning

The cloning feature can be used in the following situations:

Support for Database Cloning

You can clone an Oracle Database to another Oracle Database. However, OracleLite Database cloning is not supported. You cannot clone between two OracleLite Databases, nor can you clone an Oracle Database to an OracleLite Database.

Cloning Oracle WSM Overview

Cloning an Oracle Application Server instance that includes Oracle WSM involves two distinct sets of tasks. One set of tasks involves cloning the Oracle Application Server Mid-Tier instance, excluding Oracle WSM. (See step 2 below.) Because this procedure does not clone the Oracle WSM configuration files, Oracle WSM must be cloned separately. The second set of tasks clones the Oracle WSM application and data (steps 1, 3, and 4).

The following is an overview of the steps to clone an Oracle WSM installation:

  1. Inspect the source installation and export the data from the Oracle WSM Database and configuration files.

    From the ORACLE_HOME/owsm/bin directory on the source installation, execute the wsmadmin inspectTopology command. The command does the following:

    • Generates a file that describes the topology of the Oracle installation (ORACLE_HOME\owsm\config\topology\topology.properties )

    • Exports the data in the Oracle Database tables

    For more information on wsmadmin inspectTopology, see Appendix C, "Oracle Web Services Manager WSMADMIN Commands" in the Oracle Web Services Manager Deployment Guide.

  2. Clone the Oracle Application Server Middle-Tier instance.

    Refer to Chapter 9, "Cloning Application Middle-Tier Instances" in the Oracle Application Server Administrator's Guide 10g Release 3 (10.1.3.1.0) for information on cloning the Oracle Application Server.

  3. Make any changes required for the destination topology.

    The file containing the description of the source installation topology is: ORACLE_HOME/owsm/config/topology/topology.properties. This file must be edited with the properties that describe the destination installation. If the database on the destination installation is different than the source installation, then edit the database properties. Enter the database password in clear text in the topology.properties file, then use the wsmadmin encodePassword command to encode the password.

    For more information on the properties in this file and how you edit them, see wsmadmin applyTopology in Appendix C, "Oracle Web Services Manager WSMADMIN Commands" in the Oracle Web Services Manager Deployment Guide.

  4. Clone the source installation.

    From the ORACLE_HOME/owsm/bin directory on the destination installation, execute the wsmadmin applyTopology command. Any changes are applied to to the database tables, the tables are then imported into the destination Oracle Database, and the configuration files are updated.

    For more information on wsmadmin applyTopology, see Appendix C, "Oracle Web Services Manager WSMADMIN Commands" in the Oracle Web Services Manager Deployment Guide.

Migrating Oracle Web Services Objects

Oracle Web Services Manager provides a way to migrate selected components and policies between environments.

The following objects can be migrated between environments:

You may migrate one or more of these objects at one time between your development, test, and production environments.

Note:

If you want to migrate all Oracle WSM components and all data in the Oracle WSM Database, then use the Oracle WSM cloning feature described in "Cloning Oracle Web Services Manager".

The objects to be migrated are specified in an input file. The WSMADMIN command-line tool uses this input file to export the data for the specified components to a directory. The data is exported as XML files.

The exported objects have attributes that must be specified in order to import them successfully to the destination machine. These attributes are specified in an input file which is used by the WSMADMIN command-line tool to import the data for the objects.

Before Exporting and Importing Oracle Web Services Objects

Before you export and import Oracle Web services objects, verify that you have installed Oracle Application Server 10g Release 3 (10.1.3.4) on both the source and destination machines.

See the following sections for an overview of the steps to export and import objects:

Exporting Oracle Web Services Objects

Complete the following steps to export Oracle Web services objects:

  1. Create the input file and specify the objects to be exported.

  2. Edit the ORACLE_HOME/owsm/bin/coresv.properties file. Edit the value of the db.export.dir property, and specify the directory into which the components will be exported.

  3. Export the components.

  4. Verify that the data has been successfully exported.

The sections that follow provide additional details.

Creating the Input File Used to Export Objects

The input file, LMTInstructions.xml, specifies the components, services, and custom steps that are to be exported. At a minimum, the file must specify the component IDs for all components that are to be exported. Any policies associated with the components are exported. You must specify which services to export by specifying the service ID.

Example 10-1 is an example of an LMTInstructions.xml file used to export components. In this example, two components are exported with IDs C0003001 and C0003030. Two services registered to the first component are exported, with the IDs SID0003268 and SID0003269.

For the second component, C0003030, a custom step with ID 891B611A-0F24-85DD-3C27-8B56B5F7G4F21249 is exported. In order to export a custom step, you must specify the component to which the custom step has been added. No other services or custom steps associated with this component are exported.

Example 10-1 Example LMTInstructions.xml File Used to Export Objects

<?xml version="1.0"?>
<lmt-instructions>
     <transferable-objects>
          <component id="C0003001">
               <service id="SID0003268">
               </service>
               <service id="SID0003269">
               </service>                    
          </component>
          <component id="C0003030">
               <step-template id="891B611A-0F24-85DD-3C27-8B56B5F7G4F21249" 
                version="1.0">
               </step-template>
          </component>
          <component id="C0003031">     
          </component>
     </transferable-objects>
</lmt-instructions>

Exporting the Oracle Web Services Objects

Execute the following command from the ORACLE_HOME\owsm\bin directory:

wsmadmin exportTransferableObjects

The input file, LMTInstructions.xml, must be in the ORACLE_HOME/scripts directory on the source machine. The data is exported to the directory specified by the db.export.dir property specified in the ORACLE_HOME/owsm/bin/coresv.properties file.

For more information on this command, see Appendix C, "Oracle Web Services Manager WSMADMIN Commands" in the Oracle Web Services Manager Deployment Guide

Verifying the Exported Data

Let us assume that the following objects were exported:

  • An Oracle Web Services Manager Gateway with a component ID C0003001

  • Two Web services registered to C000301 with a component IDs SID0003268 and SID0003269

  • A second component with component ID C0003030. This component is not a gateway; therefore, no Web services are exported.

  • A custom step template with a component ID 891B611A-0F24-85DD-3C27-8B56B5F7G4F21249

Within the directory specified by the db.export.dir property (in this example, export_dir), a subdirectory is created. The timestamp of the export is assigned as the name of the subdirectory.

Let us assume that db.export.dir is set to export_dir, and the export was performed on January 28, 2008 at 05:12:15 p.m.You would see a directory structure similar to the following:

export_dir/28Jan2008-05-12-15PM

Within the timestamp (28Jan2008-05-12-15PM) subdirectory, you would find a directory for each exported component. For example:

export_dir/28Jan2008-05-12-15PM/C0003001
export_dir/28Jan2008-05-12-15PM/C0003030

If you exported any other components, you would see a subdirectory under export_dir/28Jan2008-05-12-15PM for each component.

Within the C003001 component subdirectory, you would find directories for any Web services that were exported. Using this example, you would find the following directories:

export_dir/28Jan2008-05-12-15PM/C0003001/SID0003268/
export_dir/28Jan2008-05-12-15PM/C0003001/SID0003269/

Similarly, you would find directories for any exported custom step templates. Using this example, you would find the following directory:

export_dir/28Jan2008-05-12-15PM/C0003030/891B611A-0F24-85DD-3C27-8B56B5F7G4F21249/

Within each of the directories under export_dir/28Jan2008-05-12-15PM would be a number of XML files.

Importing Oracle Web Services Objects

Complete the following steps to import Oracle Web services objects:

  1. Create the input file for the destination machine.

  2. Specify the directory from which the data will be imported. The import directory is specified with the db.import.dir property in the ORACLE_HOME/owsm/bin/coresv.properties file.

  3. Copy the exported data to the import directory on the destination machine.

  4. Execute the command to import the components.

  5. Verify that the components have been successfully imported.

  6. When you import a client or server agent, it is assigned a new component ID. Therefore, after it is imported, the client or server agent must be redeployed in the Web application or Web service with the new component ID.

    Note:

    For more information about deploying client agents, see the Oracle Web Services Manager Deployment Guide.
  7. If you import a custom step, you must copy the Java Archive (JAR) file from the source machine to the destination machine, and extract the custom step in the following directory: ORACLE_HOME/owsm/samples/customsteps.

The following sections provide additional details.

Creating the Input File Used to Import Objects

Create the LMTInstructions.xml input file. For more information about this file, see Chapter 10," Oracle WSM Cloning and Horizontal Migration," in the Oracle Web Services Manager Administrator's Guide.

Importing the Oracle Web Services Objects

Execute the following command from the ORACLE_HOME\owsm\bin directory:

wsmadmin importTransferableObjects

Usage

  • The input file, LMTInstructions.xml, must be in the ORACLE_HOME/scripts directory on the destination machine.

  • The data is imported from the directory specified by the db.import.dir property in the ORACLE_HOME/owsm/bin/coresv.properties file.

  • Any imported Oracle WSM components, services, and step templates are assigned the next available ID on the destination machine.

Example 10-2 is an example of an LMTInstructions.xml file used to import objects.

Example 10-2 Example LMTInstructions.xml File to Import Objects

<?xml version="1.0"?>
<lmt-instructions>
  <transferable-objects>
    <component id="C0003029"
      import-name="ImportedGateway16Jan" 
      url="http://rgupta-lap.idc.oracle.com:7780/gateway"
      monitor-rmi-host="localhost"
      monitor-rmi-port="3118"
      monitor-soap="http://localhost:7780/coreman/services/CoremanMeasurementClient"
      monitor-type="rmi"
      database-url="jdbc:oracle:thin:@//10.177.34.170:1521/orcl.idc.oracle.com"
      database-driver="oracle.jdbc.driver.OracleDriver"
      database-user-id="ORAWSM"
      database-user-password="????BXbXX/cf08QHKYYAb6v4o/bb2r37tTw4Tw=="
      create-new="false"
      type="Gateway"
      mapped-to-component-id="C0003029">
    <service id="SID0003268"
      import-name="TimeService16Jan1"
      version="1.0"
      wsdl="http://rgupta-lap.idc.oracle.com:7780/ccore/TimeService.wsdl" 
      url="http://rgupta-lap.idc.oracle.com:7780/ccore/TimeService.jsp">
      <pipeline-property pipeline-name="Service" step="0" prop-name="ReplyTimeout" 
        prop-value="300000"/>
      <pipeline-property pipeline-name="Request" step="0" prop-name="LDAPHost" 
        prop-value="localhost"/>
    </service>
    <component id="C0003030" 
      import-name="ImportedServerAgent16Jan" 
      url=""
      monitor-rmi-host="localhost"
      monitor-rmi-port="3118"
      monitor-soap="http://localhost:7780/coreman/services/CoremanMeasurementClient"
      monitor-type="rmi"
      database-url="jdbc:oracle:thin:@//10.177.34.170:1521/orcl.idc.oracle.com"
      database-driver="oracle.jdbc.driver.OracleDriver"
      database-user-id="ORAWSM"
      database-user-password="????BXbXX/cf08QHKYYAb6v4o/bb2r37tTw4Tw=="
      create-new="true"
      type="ServerAgent"
      mapped-to-component-id="">
      <step-template id="891B611A-0F24-85DD-3C27-8B56B5F7G4F21248" 
        version="1.0"
        import-id="891B611A-0F24-85DD-3C27-8B56B5F7G4F21249"
        import-name="Custom JMS Header step - XXXXXX" 
        import-version="1.0"
      </step-template>
    </component>
    <component id="C0003031"
      import-name="ImportedServerAgent16Jan" 
      url=""
      monitor-rmi-host="localhost"
      monitor-rmi-port="3118"
      monitor-soap="http://localhost:7780/coreman/services/CoremanMeasurementClient"
      monitor-type="rmi"
      database-url="jdbc:oracle:thin:@//10.177.34.170:1521/orcl.idc.oracle.com"
      database-driver="oracle.jdbc.driver.OracleDriver"
      database-user-id="ORAWSM"
      database-user-password="????BXbXX/cf08QHKYYAb6v4o/bb2r37tTw4Tw=="
      create-new="true"
      type="ClientAgent"
      mapped-to-component-id="">
    </component>
  </transferable-objects>
</lmt-instructions>

Note:

For more information on the wsmadmin importTransferableObjects command, see Appendix C, "Oracle Web Services Manager WSMADMIN Commands" in the Oracle Web Services Manager Deployment Guide

Verifying the Imported Data

Using Web Services Manager Control, verify that the component and service properties are correct. Use the Test Page to test the components and services, and verify that you are getting the expected results.

Rolling Back Your Changes

When you import the data, an undo_import.sql file is created in the import directory (db.import.directory). You can execute this script to roll back all changes that were made as part of the import operation.Run this script at the SQL prompt, then execute a database commit command to commit the changes.