8 Using the Lifecycle Management Tools to Configure the SOA Suite Domain

After installing Oracle SOA Suite and creating the database schemas, follow these steps to use Apache Groovy to run the create-domain standard action and create the domain.

8.1 Starting FMW Composer

Start FMW Composer from the ORACLE_HOME/oracle_common/bin directory.

  1. Set the JAVA_HOME environment variable to the path of a certified JDK.

    For example:

    export JAVA_HOME=/home/Oracle/products/jdk1.8.0_101
    
  2. Change directory to the ORACLE_HOME/oracle_common/bin directory and start FMW Composer (fmw-composer.sh).
    cd ORACLE_HOME/oracle_common/bin
    ./fmw-composer.sh
    

8.2 Opening the soa-topology-1.0.json File

After you start FMW Composer, open the sample soa-topology-1.0.json file. You need to provide information about your environment in this file to create the domain.

This file is located in the path_to_example_directory/create-domain-example/models/topologies directory.
  1. From the File menu, select Settings to open the Composer Settings page.
  2. On the Composer Settings page, specify the location of the Oracle home where Oracle SOA Suite and the LCM Tools are installed.
    1. Click select next to Oracle Home.
    2. In the Select an Oracle Home dialog box, select the Oracle home directory and click Open.
  3. After specifying the Oracle home location, specify the location of the wallet you created in the path_to_example_directory/create-domain-example/mywallet directory.
    1. Click change next to Wallet.
    2. In the Change wallet dialog box, select Select an existing wallet and click OK.
    1. In the Select a Wallet Directory dialog box, select the path_to_example_directory/create-domain-example/mywallet directory and click Open.
    2. Enter the wallet password and click OK.
  4. Click OK to close the Settings page.
  5. From the File menu, select Open File...
  6. In the Open Composer File dialog box, navigate to the path_to_example_directory/create—domain—example/models/topologies directory.
  7. Select soa-topology-1.0.json and click Open.

    When you open the file, you should see the following topology diagram on the screen:

    Description of GUID-F674CA62-1993-4D5D-9CF2-E636403683E6-default.png follows
    Description of the illustration GUID-F674CA62-1993-4D5D-9CF2-E636403683E6-default.png

8.3 Editing the soa-topology-1.0.json File

After opening the soa-topology-1.0.json file in Composer, you need to specify information about the elements of the topology. This information will be used to configure your domain.

Complete the following tasks to fill in the topology file with values specific to your environment:

8.3.1 Editing the Host Address

Enter the host address for the host in the Address field.

Select the Host: machine1 box in the Composer topology diagram. This will display a panel on the right side of the screen with fields where you can specify information about the host.

In the Address field, enter the primary IP address or DNS name of this host. The default value is 127.0.0.1.

8.3.2 Editing the Oracle Home Element

Specify information about the SOA Suite Oracle home directory, such as the Oracle home and Java JDK locations.

  1. Select the Oracle home: soahome box in the Composer topology diagram.

    This will display a panel on the right side of the screen with fields where you can specify information about the Oracle home.

  2. In the Path field, enter the full path to the Oracle home where you installed Oracle SOA Suite.

    For example:

    /home/Oracle/products/fmw12212
    
  3. In the Java Home field, enter the path to a certified JDK.

    For example:

    /home/Oracle/products/jdk1.8.0_101
    

8.3.3 Editing the Domain Element

Specify information about the SOA Suite domain, such as the directory locations for where the domain and applications will be created.

  1. Select the Domain: soadomain box in the Composer topology diagram.

    This will display a panel on the right side of the screen with fields where you can specify information about the domain you will create.

  2. In the Path field, enter the full path to the domain home directory. This is the directory where the domain will be created and will be referred to as DOMAIN_HOME in this guide.

    For example:

    /home/Oracle/config/domains/soadomain
    

    Oracle recommends that you place your domain home outside of the Oracle home directory. For more information on selecting a domain home, see About the Domain Home Directory in Oracle Fusion Middleware Planning an Installation of Oracle Fusion Middleware.

    Make a note of the domain location; you need it later to access the scripts that start the servers.

  3. In the Application Path field, enter the full path to the application home directory. This is the directory where applications associated with the domain will be created and will be referred to as APPLICATION_HOME in this guide.

    For example:

    /home/Oracle/config/applications/soadomain
    

    Oracle recommends that you place your application home outside of the Oracle home directory. For more information on selecting an application home, see About the Application Home Directory in Oracle Fusion Middleware Planning an Installation of Oracle Fusion Middleware.

  4. In the Admin Server Url field, enter the URL that will be used to connect to the domain’s Administration Server. Use the following format:
    http://adminserver_host:adminserver_port
    

    Make a note of the Administration Server URL; you need it later to access the Administration Server.

8.3.4 Editing the Administration Server Element

Specify the listen address and listen port to be used by the WebLogic Administration Server.

  1. Select the Server: AdminServer box in the Composer topology diagram.
  2. On the right side of the screen, verify that the Is Admin Server option is checked (checked by default).
  3. In the Name field, enter a name for the Administration Server. The default name is AdminServerBinding.
  4. In the Listen Address field, specify the IP address or DNS name of the host where the Administration Server will reside. The default value is 127.0.0.1.
  5. In the Listen Port field, enter the port number to be used by the Administration Server. The default port is 7001.

8.3.5 Editing the Managed Server Element

Specify the listen address and listen port to be used by the Managed Server.

  1. Select the Server: soa_server1 box in the Composer topology diagram.
  2. On the right side of the screen, verify that the Is Admin Server option is unchecked (unchecked by default).
  3. In the Name field, enter a name for the Managed Server. The default name is soa_server1Binding.
  4. In the Listen Address field, specify the IP address or DNS name of the host where the Managed Server will reside. The default value is 127.0.0.1.
  5. In the Listen Port field, enter the port number to be used by the Managed Server. The default port is 7002.

8.3.6 Editing the Schema Information

Use the Data Sources tab in Composer to edit and verify the schema and data source information for the topology.

  1. Navigate to the Data Sources tab, and use the following table to verify the Prefix fields for each of the schema components.

    Note that FMWEX is the schema prefix used for this tutorial. If you used a different prefix, make sure to replace FMWEX with the value of your actual prefix in each of the Prefix fields.

    Component Credential Prefix

    IAU

    db1/iau

    FMWEX

    IAU_APPEND

    db1/iau-append

    FMWEX

    IAU_VIEWER

    db1/iau-viewer

    FMWEX

    MDS

    db1/mds

    FMWEX

    OPSS

    db1/opss

    FMWEX

    SOAINFRA

    db1/soa-infra

    FMWEX

    STB

    db1/stb

    FMWEX

    UCSUMS

    db1/ums

    FMWEX

    WLS

    db1/wls

    FMWEX

  2. The dummy schema component groups data sources that are not associated with a particular schema in their templates. Similar to the other components, you will need to assign a database to this component as well as credentials to run the action.
    1. Select Component: dummy, and on the right side of the screen, click select next to the Credential field to assign credentials to this component.

      A dialog box appears that lists the credentials in the wallet. You can assign an existing credential from the list, or click New to add a new one to the wallet for this component.

    2. To assign a database, right-click Component: dummy on the screen and select Assign Existing Database to Schema Component ‘dummy’ to select a database for this component.
  3. Select the DS: SOALocalTxDataSource data source associated with the SOAINFRA component, and deselect the XA check box on the right side of the screen.

    Repeat this step to deselect this option for DS: EDNLocalTxDataSource as well.

  4. The WLSSchemaDataSource data source associated with the WLS component is not defined in any template for the domain. Right-click DS: WLSSchemaDataSource on the screen to remove it.

8.3.7 Editing the Database URL

Specify the connection information for the database in which you created the schemas.

  1. Navigate to the Data Sources tab, and select the Node element on the screen.
  2. In the Connect String field, enter the JDBC URL to the database repository in the following format:
    jdbc:oracle:thin:@db_host:db_port/service_name
    

    Where db_host is the host name of the machine on which the database resides, db_port is the listener port of the database, and service_name is the service name identified for the database.

8.4 Validating and Saving the Topology File

If there any validation errors found in the topology file, these errors are displayed in the validation panel at the bottom of the screen. Correct any issues before continuing.

To locate an error in the file, select the error message from the list, and then click Go To icon. You can also double-click the error message to go straight to the panel that contains the error.

After correcting any errors, save the file and exit Composer.

8.5 Using Apache Groovy to Run the create-domain Standard Action

After editing and validating the sample soa-topology-1.0.json file, use Apache Groovy to run the create-domain.groovy script. This script executes the create-domain action and configures your domain based on the information you specified in the topology file.

The create-domain.groovy script is located in the create-domain-example directory.

To run the action:

  1. Change directory to the create-domain-example directory.
    cd path_to_example_directory/create-domain-example
    
  2. In the call-domain.sh file, update the Oracle home location to point to the SOA Suite Oracle home.

    There are two places in this file where you must update the Oracle home location, as shown in the following example.

    #!/bin/bash
    
    groovy -cp "ORACLE_HOME/oracle_common/modules/features/oracle.fmwplatform.envspec_lib.jar:
    ORACLE_HOME/oracle_common/modules/features/oracle.fmwplatform.common_lib.jar" $*
    

    In this example, replace ORACLE_HOME with the actual path to your Oracle home directory.

  3. In the create-domain.groovy file in the create-domain-example directory, update the Oracle home location to point to the SOA Suite Oracle home.

    For example:

    // get ready to run the action
    
    def af = DefaultActionFactoryLocator.locateActionFactory()
    def action = af.getAction("create-domain", "ORACLE_HOME")
    def target = ModelTargetFactory.createDomainTarget("soadomain")
    def targets = new ArrayList<ModelTarget>()
    targets.add(target)
    

    In this example, replace ORACLE_HOME with the actual path to your Oracle home directory.

  4. In the create-domain.groovy file, replace secret1@ with the actual password of the wallet you created, as shown in the following example:
    "wallet_password".toCharArray()    // the wallet passphrase
    
  5. Verify that the ORACLE_HOME variable is not set in your environment.
    echo $ORACLE_HOME
    

    If the ORACLE_HOME variable is set in your environment, unset it before running create-domain.groovy:

    unset ORACLE_HOME
    
  6. If not already set, set the JAVA_HOME variable to the path of a certified JDK, as shown in the following example:
    export JAVA_HOME=/home/Oracle/products/jdk1.8.0_101
    
  7. If not already set, set the GROOVY_HOME variable to the directory where you installed the Apache Groovy distribution, as shown in the following example:
    export GROOVY_HOME=/home/Oracle/groovy-2.4.6
    export PATH=$PATH:$GROOVY_HOME/bin
    
  8. Run the following command from the create-domain-example directory to execute the action:
    sh call-domain.sh create-domain.groovy
    

    If the action is successful, the exit status code is SUCCESS, as shown in the following example:

    May 18, 2016 9:39:28 AM oracle.fmwplatform.actionframework.v2.internal.AbstractActionImpl logActionResult
    INFO: SUCCESS: JAVA_WLST_ACTION: Init: 
    May 18, 2016 9:39:28 AM oracle.fmwplatform.actionframework.v2.internal.ActionBase setInitializedState
    INFO: Action create-domain changed from state CREATED to state NOT_READY
    May 18, 2016 9:39:28 AM oracle.fmwplatform.actionframework.v2.internal.ActionBase setCanInvokeState
    INFO: Action create-domain changed from state NOT_READY to state READY
    May 18, 2016 9:39:28 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logComponentCall
    INFO: Action create-domain: Calling the component wlst.selectTemplate(Basic WebLogic Server Domain) {"domainName":"soadomain"}
    May 18, 2016 9:39:39 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logComponentReturn
    INFO: Action create-domain: Resuming execution upon the return from the component wlst.selectTemplate(Basic WebLogic Server Domain) {"domainName":"soadomain"}
    May 18, 2016 9:39:39 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logComponentCall
    INFO: Action create-domain: Calling the component wlst.selectTemplate(Oracle SOA Suite) {"domainName":"soadomain"}
    May 18, 2016 9:39:39 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logComponentReturn
    INFO: Action create-domain: Resuming execution upon the return from the component wlst.selectTemplate(Oracle SOA Suite)
    {"domainName":"soadomain"}
    May 18, 2016 9:39:39 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logComponentCall
    INFO: Action create-domain: Calling the component wlst.loadTemplates() {"domainName":"soadomain"}
    May 18, 2016 9:39:52 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logComponentReturn
    INFO: Action create-domain: Resuming execution upon the return from the component wlst.loadTemplates() {"domainName":"soadomain"}
    drw-   AppDeployment
    drw-   CoherenceClusterSystemResource
    drw-   Credential
    drw-   FileStore
    drw-   JDBCSystemResource
    drw-   JMSServer
    drw-   JMSSystemResource
    drw-   Keystore
    drw-   Library
    drw-   NMProperties
    drw-   Security
    drw-   SecurityConfiguration
    drw-   SelfTuning
    drw-   Server
    drw-   ServerTemplate
    drw-   ShutdownClass
    drw-   StartupClass
    drw-   StartupGroupConfig
    drw-   WLDFSystemResource
    drw-   WebAppContainer
    drw-   AdminServer
    drw-   soa_server1
    drw-   AppDeployment
    drw-   CoherenceClusterSystemResource
    drw-   Credential
    drw-   FileStore
    drw-   JDBCSystemResource
    drw-   JMSServer
    drw-   JMSSystemResource
    drw-   Keystore
    drw-   Library
    drw-   NMProperties
    drw-   Security
    drw-   SecurityConfiguration
    drw-   SelfTuning
    drw-   Server
    drw-   ServerTemplate
    drw-   ShutdownClass
    drw-   StartupClass
    drw-   StartupGroupConfig
    drw-   WLDFSystemResource
    drw-   WebAppContainer
    drw-   AdminServer
    May 18, 2016 9:39:53 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logInfo
    INFO: Action create-domain: Server AdminServerBinding is not mapped to a domain node manager {"domainName":"soadomain"}
    May 18, 2016 9:39:54 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logInfo
    INFO: Action create-domain: Server soa_server1Binding is not mapped to a domain node manager {"domainName":"soadomain"}
    drw-   AppDeployment
    drw-   CoherenceClusterSystemResource
    drw-   Credential
    drw-   FileStore
    drw-   JDBCSystemResource
    drw-   JMSServer
    drw-   JMSSystemResource
    drw-   Keystore
    drw-   Library
    drw-   NMProperties
    drw-   Security
    drw-   SecurityConfiguration
    drw-   SelfTuning
    drw-   Server
    drw-   ServerTemplate
    drw-   ShutdownClass
    drw-   StartupClass
    drw-   StartupGroupConfig
    drw-   WLDFSystemResource
    drw-   WebAppContainer
    drw-   AppDeployment
    drw-   CoherenceClusterSystemResource
    drw-   Credential
    drw-   FileStore
    drw-   JDBCSystemResource
    drw-   JMSServer
    drw-   JMSSystemResource
    drw-   Keystore
    drw-   Library
    drw-   NMProperties
    drw-   Security
    drw-   SecurityConfiguration
    drw-   SelfTuning
    drw-   Server
    drw-   ServerTemplate
    drw-   ShutdownClass
    drw-   StartupClass
    drw-   StartupGroupConfig
    drw-   WLDFSystemResource
    drw-   WebAppContainer
    drw-   AppDeployment
    drw-   CoherenceClusterSystemResource
    drw-   Credential
    drw-   FileStore
    drw-   JDBCSystemResource
    drw-   JMSServer
    drw-   JMSSystemResource
    drw-   Keystore
    drw-   Library
    drw-   NMProperties
    drw-   Security
    drw-   SecurityConfiguration
    drw-   SelfTuning
    drw-   Server
    drw-   ServerTemplate
    drw-   ShutdownClass
    drw-   StartupClass
    drw-   StartupGroupConfig
    drw-   WLDFSystemResource
    drw-   WebAppContainer
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    drw-   Property
    May 18, 2016 9:39:57 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logComponentCall
    INFO: Action create-domain: Calling the component wlst.writeDomain() {"domainName":"soadomain"}
    May 18, 2016 9:42:21 AM oracle.fmwplatform.actionframework.v2.logging.internal.ActionsLoggerImpl logComponentReturn
    INFO: Action create-domain: Resuming execution upon the return from the component wlst.writeDomain() {"domainName":"soadomain"}
    May 18, 2016 9:42:21 AM oracle.fmwplatform.actionframework.v2.internal.AbstractActionImpl logActionResult
    INFO: SUCCESS: Action create-domain succeeded for Target soadomain
    May 18, 2016 9:42:21 AM oracle.fmwplatform.actionframework.v2.internal.ActionBase setInvokedState
    INFO: Action create-domain changed from state READY to state NOT_READY
    May 18, 2016 9:42:21 AM oracle.fmwplatform.actionframework.v2.internal.AbstractActionImpl logActionResult
    INFO: SUCCESS: Action create-domain succeeded for Target soadomain
    May 18, 2016 9:42:21 AM oracle.fmwplatform.actionframework.v2.internal.ActionBase setClosedState
    INFO: Action create-domain changed from state NOT_READY to state DESTROYED
    May 18, 2016 9:42:21 AM oracle.fmwplatform.actionframework.v2.internal.ActionBase setDoneState
    INFO: Action create-domain changed from state DESTROYED to state DONE
    {
      "actionResultList" : [ {
        "statusCode" : "SUCCESS",
        "statusDetail" : "JAVA_WLST_ACTION: Init: "
      }, {
        "statusCode" : "SUCCESS",
        "statusDetail" : "Action create-domain succeeded for Target soadomain",
        "target" : {
          "domainName" : "soadomain"
        }
    

8.6 Starting the Servers

To verify that your domain is properly configured, manually start the Administration Server and Managed Server.

  1. To start the WebLogic Administration Server, change directory to the DOMAIN_HOME/bin directory and run the following command:
    ./startWebLogic.sh
    
  2. To verify that the Administration Server is running, enter the following URL in a browser to access the WebLogic Administration Console:
    http://adminserver_host:adminserver_port/console
    

    Log in using the WebLogic administrator credentials that you created and added to the wallet for this tutorial. See Creating a Wallet.

  3. After starting the Administration Server, start the Managed Server from the DOMAIN_HOME/bin directory:
    ./startManagedWebLogic.sh managed_server_name http://adminserver_host:adminserver_port
    

    You are prompted for the administrator user login credentials. Enter the WebLogic administrator credentials that you created and added to the wallet.