Skip navigation.

Creating WebLogic Configurations Using the Configuration Wizard

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

How Do I . . . ?

This section provides information and examples for some common domain configuration tasks:

Related Topics

Note: If you are using WebLogic Platform 8.1 SP2 or earlier, see "Configuring JDBC Domain Resources in SP2 or Earlier" in Important Usage Notes for Previous Releases of WebLogic Platform 8.1 at the following URL:

http://download.oracle.com/docs/cd/E13196_01/platform/docs81/sp_notes/sp_notes.html#sp2_config

 


Creating XA Domains Using Configuration Templates

By default, the Configuration Wizard creates domains with non-XA configurations, based on the JDBC settings defined in the prepackaged configuration templates. If you want to create a domain in which JDBC resources are set up to participate in global transactions (XA), then you need to use an XA JDBC database driver and change some of the default JDBC settings.

This section provides the following topics:

Guidelines for Changing to an XA Configuration

To change to an XA configuration:

  1. Use the Configuration Wizard to create or extend a domain and configure the JDBC connection pools as XA resources, as required.
  2. Use the WebLogic Server Administration Console to verify configuration option settings.

To learn about the JDBC settings required for an XA domain configuration using the Configuration Wizard and the configuration options that need to be set or verified using the WebLogic Server Administration Console, see Summary of JDBC Settings for XA Configurations.

Summary of JDBC Settings for XA Configurations

The following sections summarize the JDBC settings required for an XA domain configuration using the Configuration Wizard and the prepackaged configuration templates, including:

Each section also provides a list of the configuration options that need to be set or verified using the WebLogic Server Administration Console.

Please note the following about creating WebLogic Server XA domain configurations:

JDBC Settings for WebLogic Workshop XA Configurations

Table 14-1 summarizes the JDBC settings to use with the Basic WebLogic Workshop Domain configuration template for an XA domain configuration. After using the Configuration Wizard to make the required additions and changes, remember to use the WebLogic Server Administration Console to complete the XA configuration setup.

Note: The scope of the JDBC configuration settings provided below is the JDBC settings in the prepackaged configuration templates only. If you are using a custom template or have already developed application resources in an existing domain, you may have additional JDBC resources to configure to complete the XA configuration.

Table 14-1 Changes to Workshop Template Settings for an XA Configuration 

JDBC Resource Type

Resource Name

XA Configuration Requirements

Database

workshop

Change the database being used to one that supports XA configurations, such as Oracle, Sybase, DB2, and MS SQL Server. For database support details, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Connection Pool

cgJMSPool-nonXA

Maintain association with a non-XA JDBC driver.

Connection Pool

cgPool

Change the type of driver being used to a Type 4/XA driver, such as the Oracle Thin XA driver, to connect to a supported database. For details about database driver support, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Use the WebLogic Server Administration Console to verify the following configuration options:

  • Supports Local Transaction option is enabled. (This is the default setting for this connection pool; you should not change this setting.)

  • Maximum Capacity option for the JDBC connection pool is greater than or equal to the value of the Thread Count option for the execute queue.

Tx Data Source

cgDataSource

Keep bound to the cgPool connection pool.

Tx Data Source

cgDataSource-nonXA

Keep bound to the cgJMSPool-nonXA connection pool.

Note: Although cgDataSource-nonXA is provided as a JDBC Tx Data Source, it cannot participate in global transactions. Therefore, you must always set it up with a connection pool configured with a non-XA JDBC driver, such as cgJMSPool-nonXA.

JMS Store

cgJMSStore

Keep bound to the cgJMSPool-nonXA connection pool.


 

JDBC Settings for WebLogic Integration XA Configurations

Table 14-2 summarizes the JDBC settings to use with the Basic WebLogic Integration Domain configuration template for an XA domain configuration. After using the Configuration Wizard to make the required additions and changes, remember to use the WebLogic Server Administration Console to complete the XA configuration setup.

For an example of creating a WebLogic Integration XA configuration, see How Do I: Create a Domain Using a Database with an XA Driver?.

Note: The scope of the JDBC configuration settings provided below is the JDBC settings in the prepackaged configuration templates only. If you are using a custom template or have already developed application resources in an existing domain, you may have additional JDBC resources to configure to complete the XA configuration.

Table 14-2 Changes to Integration Configuration Template Settings for an XA Configuration 

JDBC Resource Type

Resource Name

XA Configuration Requirements

Database

workshop

Change the database being used to one that supports XA configurations, such as Oracle, Sybase, DB2, and MS SQL Server. For database support details, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Connection Pool

bpmArchPool

Change the type of driver being used to a Type 4/XA driver, such as the Oracle Thin XA driver, to connect to a supported database. For details about database driver support, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Use the WebLogic Server Administration Console to verify the following configuration options:

  • Supports Local Transaction option is enabled. (This is the default setting for this connection pool; you should not change this setting.)

  • Maximum Capacity option for the JDBC connection pool is greater than or equal to the value of the Thread Count option for the execute queue.

  • For Oracle databases only, the value of the Timeout Seconds option for JTA is less than or equal to the value of the XA Transaction Timeout option in the JDBC connection pool if the Enable XA Transaction Timeout option is enabled. It is recommended that you set the value of the XA Transaction Timeout option to 60 seconds, and the value of the Timeout Seconds option for JTA to 50 for normal size messages, and increase these values proportionately as the size of your message increases.

Connection Pool

cgJMSPool-nonXA

Maintain association with a non-XA JDBC driver.

Connection Pool

cgPool

Change the type of driver being used to a Type 4/XA driver, such as the Oracle Thin XA driver, to connect to a supported database. For details about database driver support, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Use the WebLogic Server Administration Console to verify the following configuration options:

  • Supports Local Transaction option is enabled. (This is the default setting for this connection pool; you should not change this setting.)

  • Maximum Capacity option for the JDBC connection pool is greater than or equal to the value of the Thread Count option for the execute queue.

  • For Oracle databases only, the value of the Timeout Seconds option for JTA is less than or equal to the value of the XA Transaction Timeout option in the JDBC connection pool if the Enable XA Transaction Timeout option is enabled. It is recommended that you set the value of the XA Transaction Timeout option to 60 seconds, and the value of the Timeout Seconds option for JTA to 50 for normal size messages, and increase these values proportionately as the size of your message increases.

Tx Data Source

bpmArchDataSource

Keep bound to the bpmArchPool connection pool.

Tx Data Source

cgDataSource

Keep bound to the cgPool connection pool.

Tx Data Source

cgDataSource-nonXA

Keep bound to the cgJMSPool-nonXA connection pool.

Note: Although cgDataSource-nonXA is provided as a JDBC Tx Data Source, it cannot participate in global transactions. Therefore, you must always set it up with a connection pool configured with a non-XA JDBC driver, such as cgJMSPool-nonXA.

JMS Store

cgJMSStore

Keep bound to the cgJMSPool-nonXA connection pool.


 

JDBC Settings for WebLogic Portal XA Configurations

Table 14-3 summarizes the JDBC settings to use with the Basic WebLogic Portal Domain configuration template for an XA domain configuration. After using the Configuration Wizard to make the required additions and changes, remember to use the WebLogic Server Administration Console to complete the XA configuration setup.

Note: The scope of the JDBC configuration settings provided below is the JDBC settings in the prepackaged configuration templates only. If you are using a custom template or have already developed application resources in an existing domain, you may have additional JDBC resources to configure to complete the XA configuration.

Table 14-3 Changes to Portal Template Settings for an XA Configuration 

JDBC Resource Type

Resource Name

XA Configuration Requirements

Database

workshop

Change the database being used to one that supports XA configurations, such as Oracle, Sybase, DB2, and MS SQL Server. For database support details, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Connection Pool

cgJMSPool-nonXA

Maintain association with a non-XA JDBC driver.

Connection Pool

cgPool

Change the type of driver being used to a Type 4/XA driver, such as the Oracle Thin XA driver, to connect to a supported database. For details about database driver support, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Use the WebLogic Server Administration Console to verify the following configuration options:

  • Supports Local Transaction option is enabled. (This is the default setting for this connection pool; you should not change this setting.)

  • Maximum Capacity option for the JDBC connection pool is greater than or equal to the value of the Thread Count option for the execute queue.

Connection Pool

portalPool

Change the type of driver being used to a Type 4/XA driver, such as the Oracle Thin XA driver, to connect to a supported database. For details about database driver support, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Use the WebLogic Server Administration Console to verify the following configuration options:

  • Supports Local Transaction option is disabled.

  • Maximum Capacity option for the JDBC connection pool is greater than or equal to the value of the Thread Count option for the execute queue.

Data Source

p13n_trackingDataSource

Keep bound to the cgJMSPool-nonXA connection pool.

Data Source

p13nDataSource

Keep bound to the cgJMSPool-nonXA connection pool.

Tx Data Source

cgDataSource

Keep bound to the cgPool connection pool.

Tx Data Source

cgDataSource-nonXA

Keep bound to the cgJMSPool-nonXA connection pool.

Note: Although cgDataSource-nonXA is provided as a JDBC Tx Data Source, it cannot participate in global transactions. Therefore, you must always set it up with a connection pool configured with a non-XA JDBC driver, such as cgJMSPool-nonXA.

Use the WebLogic Server Administration Console to verify that the Enable Two-Phase Commit option is enabled.

Tx Data Source

portalFrameworkPool

Keep bound to the portalPool connection pool.

Note: If you are using the optional commerce functionality in a Portal domain configured for XA, then you must move the weblogic.jdbc.jts.commercePool JNDI name from the portalFrameworkPool to the cgDataSource-nonXA JDBC Tx Data Source. For information about using commerce functionality, see "Adding Commerce Services to an Application" in the WebLogic Workshop Help at the following URL: http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/portal/buildportals/commerce.html

JMS Store

cgJMSStore

Keep bound to the cgJMSPool-nonXA connection pool.


 

JDBC Settings for WebLogic Platform XA Configurations

Table 14-4 summarizes the XA domain configuration settings to use with the Basic WebLogic Platform Domain configuration template. After using the Configuration Wizard to make the required additions and changes, remember to use the WebLogic Server Administration Console to complete the XA configuration setup.

Note: The scope of the JDBC configuration settings provided below is the JDBC settings in the prepackaged configuration templates only. If you are using a custom template or have already developed application resources in an existing domain, you may have additional JDBC resources to configure to complete the XA configuration.

For an example of creating a domain with an XA configuration, see How Do I: Create a Domain Using a Database with an XA Driver?.

Note: The setup tasks in these examples also apply to creating a WebLogic Platform domain using Oracle with an XA driver because WebLogic Platform domains include WebLogic Integration and WebLogic Portal functionality.

Table 14-4 Changes to Platform Configuration Template Settings for an XA Configuration 

JDBC Resource Type

Resource Name

XA Configuration Requirements

Database

workshop

Change the database being used to one that supports XA configurations, such as Oracle, Sybase, DB2, and MS SQL Server. For database support details, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Connection Pool

bpmArchPool

Change the type of driver being used to a Type 4/XA driver, such as the Oracle Thin XA driver, to connect to a supported database. For details about database driver support, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Use the WebLogic Server Administration Console to verify the following configuration options:

  • Supports Local Transaction option is enabled. (This is the default setting for this connection pool; you should not change this setting.)

  • Maximum Capacity option for the JDBC connection pool is greater than or equal to the value of the Thread Count option for the execute queue.

  • For Oracle databases only, the value of the Timeout Seconds option for JTA is less than or equal to the value of the XA Transaction Timeout option in the JDBC connection pool if the Enable XA Transaction Timeout option is enabled. It is recommended that you set the value of the XA Transaction Timeout option to 60 seconds, and the value of the Timeout Seconds option for JTA to 50 for normal size messages, and increase these values proportionately as the size of your message increases.

Connection Pool

cgJMSPool-nonXA

Maintain association with a non-XA JDBC driver.

Connection Pool

cgPool

Change the type of driver being used to a Type 4/XA driver, such as the Oracle Thin XA driver, to connect to a supported database. For details about database driver support, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Use the WebLogic Server Administration Console to verify the following configuration options:

  • Supports Local Transaction option is enabled. (This is the default setting for this connection pool; you should not change this setting.)

  • Maximum Capacity option for the JDBC connection pool is greater than or equal to the value of the Thread Count option for the execute queue.

  • For Oracle databases only, the value of the Timeout Seconds option for JTA is less than or equal to the value of the XA Transaction Timeout option in the JDBC connection pool if the Enable XA Transaction Timeout option is enabled. It is recommended that you set the value of the XA Transaction Timeout option to 60 seconds, and the value of the Timeout Seconds option for JTA to 50 for normal size messages, and increase these values proportionately as the size of your message increases.

Connection Pool

portalPool

Change the type of driver being used to a Type 4/XA driver, such as the Oracle Thin XA driver, to connect to a supported database. For details about database driver support, see "Supported Database Configurations" in Supported Configurations for WebLogic Platform 8.1.

Use the WebLogic Server Administration Console to verify the following configuration options:

  • Supports Local Transaction option is disabled.

  • Maximum Capacity option for the JDBC connection pool is greater than or equal to the value of the Thread Count option for the execute queue.

Data Source

p13n_trackingDataSource

Keep bound to the cgJMSPool-nonXA connection pool.

Data Source

p13nDataSource

Keep bound to the cgJMSPool-nonXA connection pool.

Tx Data Source

bpmArchDataSource

Keep bound to the bpmArchPool connection pool.

Tx Data Source

cgDataSource

Keep bound to the cgPool connection pool.

Tx Data Source

cgDataSource-nonXA

Keep bound to the cgJMSPool-nonXA connection pool.

Note: Although cgDataSource-nonXA is provided as a JDBC Tx Data Source, it cannot participate in global transactions. Therefore, you must always set it up with a connection pool configured with a non-XA JDBC driver, such as cgJMSPool-nonXA.

Use the WebLogic Server Administration Console to verify that the Enable Two-Phase Commit option is enabled.

Tx Data Source

portalFrameworkPool

Keep bound to the portalPool connection pool.

Note: If you are using the optional commerce functionality in a Portal domain configured for XA, then you must move the weblogic.jdbc.jts.commercePool JNDI name from the portalFrameworkPool to the cgDataSource-nonXA JDBC Tx Data Source. For information about using commerce functionality, see "Adding Commerce Services to an Application" in the WebLogic Workshop Help at the following URL: http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/portal/buildportals/commerce.html

JMS Store

cgJMSStore

Keep bound to the cgJMSPool-nonXA connection pool.


 

 


How Do I: Create a Domain Using a Different Database?

If you want to use a database other than PointBase, the default database, in your domain, then you need to customize the JDBC Options configuration. Minimally, you need to configure settings for a JDBC connection pool(s).

  1. Start the Configuration Wizard in graphical mode as described in Table 14-5.
  2. Table 14-5 Starting the Configuration Wizard in Graphical Mode

    On this platform...

    Perform the following steps...

    Windows

    From the Start menu:

    Start—> Programs—> BEA WebLogic Platform 8.1—> Configuration Wizard

    From an MS-DOS command prompt window:

      1. Go to the \common\bin subdirectory of the product installation directory. For example:

    cd c:\bea\weblogic81\common\bin

      2. Enter config.cmd.

    UNIX

      1. Log in to the UNIX system.

      2. Go to the /common/bin subdirectory of the product installation directory. For example:

    cd $BEAHOME/weblogic81/common/bin

      3. Enter sh config.sh


     
  3. In the Create or Extend a Configuration window, select Create a new WebLogic configuration and click Next.
  4. In the Select a Configuration Template window, select a configuration template from the list of WebLogic Configuration Templates and click Next.
  5. In the Choose Express or Custom Configuration window, select Custom and click Next to create a domain with customized settings.
  6. In the Configure the Administration Server window, complete the configuration for the Administration Server, as required. For more information, see Configuring the Administration Server. Click Next to go to the Managed Servers, Clusters, and Machines Options window.
  7. In the Managed Servers, Clusters, and Machines Options window, do one of the following:
  8. In the Database (JDBC) Options window, select Yes and click Next to go through the JDBC configuration setup.
  9. In the Configure JDBC Connection Pools window, do one or both of the following:
    • If your configuration template already has JDBC connection pools set up, select the tab for each connection pool to change the settings to use the new database configuration.
    • If there are no JDBC connection pools set up, or if your application requires additional JDBC connection pools, select Add and set the JDBC settings, as required.

    The following provides example settings for configuring an Oracle database:

    • Name: myOraclePool
    • Vendor: Oracle
    • Driver: OracleDriver
    • DBMS name: MyOracleDB
    • DBMS host: MyOracleMachineName
    • DBMS port: MyOraclePortNumber
    • User name: MyUserName
    • User password: MyUserPassword
    • Confirm user password: MyUserPassword

    where myOraclePool is the name you assign to the JDBC connection pool, OracleDriver is the JDBC driver you select to use with Oracle, MyOracleDB is the database name, MyOracleMachineName is the name of the machine on which your Oracle database resides, MyOraclePortNumber is the database port number (for example, 1521), and MyUserName and MyUserPassword are the appropriate values for your Oracle database setup.

    Please note the following guideline when specifying the JDBC settings:

    • When setting DBMS Name for DB2, SQL Server, and Sybase databases, specify the name of the database instance that has already been created by the database administrator.

    Repeat this step to update any additional existing JDBC connection pools or to add additional new pools.

  10. Click Next to save your changes and go to the Configure JDBC MultiPools window.
  11. Click Next to skip configuring JDBC MultiPools and go to the Configure JDBC Data Sources window.
  12. (Optional) If your application requires an additional JDBC data source, select Add and enter the following settings:
    • Name: myDataSource
    • JNDI name: myDataSource
    • Pool name: myDBPool
    • Honor global transaction: check the box to be transactional; otherwise, leave the box unchecked

    Here myDBPool is the connection pool for the new data source, myDataSource.

  13. Click Next to save your changes and go to the Test JDBC Connection Pools and Setup JDBC Database window.
  14. Click Test Connection to test the connection to your Oracle database for each JDBC connection pool. Verify that "Test Successful!" is displayed in the Results pane.
  15. Note: Make sure to first start your target database and ensure that the database is accessible; otherwise, the driver configuration test will fail.

  16. If SQL files are available in the template, in the Available SQL Files and Database Loading Options pane, click Load Database to create database objects. Verify that "Database Load Successful!" is displayed in the Results pane before proceeding to the next step.
  17. Note: Optionally, select the Log File option to write the results of your database load to the specified log file.

  18. Click Next to save your changes and go to the Messaging (JMS) Options window.
  19. In the Messaging (JMS) Options window, do one of the following:
    • Select Yes and click Next to go through the JMS configuration setup, as required. For more information, see Configuring JMS When Creating a New Domain.
    • Select No and click Next to keep the default template settings for JMS and go to the Applications and Services Targeting Options window.
  20. In the Applications and Services Targeting Options window, select Yes and click Next to configure targeting.
  21. If applications are available in your template, the Target Applications to Servers or Clusters window is displayed. Make sure all applications are targeted. For more information, see Targeting Servers and Clusters When Creating a New Domain. Click Next to go to the Target Services to Servers and Clusters window.
  22. If you added a JDBC connection pool and JDBC data source, in the left pane of the Target Services to Servers and Clusters window, make sure that myDBPool under the JDBC Connection Pool source listing and myDataSource under the JDBC Tx Data Source source listing are checked and target your server. If not, check them.
  23. Click Next to save your changes and go to the Configure Administrative Username and Password window.
  24. In the Configure Administrative Username and Password window, complete the configuration for the administrative user. For more information, see Configuring Security When Creating a New Domain. Click Next to save your changes and go to the Configure Windows Options window (Windows only).
  25. Click Next in the following windows to accept the default settings (or change as required):
    • Configure Windows Options (Windows only)
    • Build Start Menu Entries (Windows only)
    • Configure Server Start Mode and Java SDK
  26. In the Create WebLogic Configuration window, review the summary and modify the configuration location and name, as required. For more information, see Creating the WebLogic Configuration. Click Create to create the domain.
  27. In the Creating Configuration window, once the domain configuration has been created, click Done to close the Configuration Wizard.

 


How Do I: Create a Domain Using a Database with an XA Driver?

When you create a domain with a default domain template using the Configuration Wizard, it creates a non-XA configuration. To create a new domain using a database with an XA driver, you must perform setup tasks in both the Configuration Wizard and the WebLogic Server Administration Console.

Before You Start

Before starting this procedure, we recommend that you review the following topics:

Extending a Domain

You can also use the Configuration Wizard to extend an existing domain. While the JDBC changes in an XA configuration are the same, the steps to extend a domain are slightly different from creating a new domain.

Step 1: Use the Configuration Wizard to Create a Domain

To create a domain that uses a database with an XA driver, follow the procedure in How Do I: Create a Domain Using a Different Database?.

In step 8, when setting or changing values in the Configure JDBC Connection Pools window:

  1. Set the Driver value to an XA driver.
  2. If you selected the Basic WebLogic Platform Domain or Basic WebLogic Portal Domain template, select the portalPool JDBC connection pool tab and deselect the Supports local transaction option. (This option is enabled by default.)

The following provides example settings for configuring an Oracle database with an XA driver:

Here MyOracleDB, MyOracleMachineName, MyOraclePortNumber, MyUserName, and MyUserPassword are the appropriate values for your Oracle database setup.

Repeat step 8 to create or update any additional JDBC connection pools.

Note: JMS must use a JDBC connection pool that uses a non-XA resource driver (you cannot use an XA driver or a JTS driver). The cgJMSPool-nonXA JDBC connection pool is provided to support JMS resources.

Once the domain configuration has been created, in the Creating Configuration window, check Start Admin Server and click Done to start the Administration Server and close the Configuration Wizard.

Step 2: Use the WebLogic Server Administration Console to verify the JDBC configuration for the domain

Once the Administration Server is running, you log in to the domain's Administration Console to verify the JDBC configuration for your domain.

  1. Open a Web browser to the following URL:
  2. http://hostname:port/console

    Replace hostname with the DNS name or IP address of the Administration Server, and replace port with the address of the port on which the Administration Server is listening for requests (7001 by default). For example:

    http://localhost:7001/console

  3. When the login page is displayed, enter the username and password required to start the Administration Server. Then click Sign In.
  4. For each connection pool using an XA driver, perform the following steps:
    1. In the left pane of the Administration Console, navigate to Services—>JDBC—>Connection Pools.
    2. Select the JDBC connection pool name on the list.
    3. On the Connections tab in the Configuration section, click Show to show the Advanced Options section.
    4. Verify that the Supports Local Transaction option is enabled (except for portalPool, if defined, which requires this option to be disabled).
    5. Note the value of the Maximum Capacity option for the JDBC connection pool. Make sure that this value is greater than or equal to the value of the Thread Count option for the execute queue.
    6. To display the execute queues, right-click the server name in the left pane and select View Execute Queues. Click an execute queue name on the list and view the Thread Count option value. (Note that the Thread Count option may also appear in the summary table on the Execute Queue page.)

  5. For Oracle databases only, to configure JTA, perform the following steps:
  6. Note: This step is not applicable to WebLogic Portal domains. If you are creating a WebLogic Portal domain or are not using an Oracle database, skip to step 5.

    1. In the left pane, navigate to Services—>JTA.
    2. Make sure that the value of the Timeout Seconds option for JTA is less than or equal to the value of the XA Transaction Timeout option in the JDBC connection pool if the Enable XA Transaction Timeout option is enabled.
    3. To view the XA Transaction Timeout and Enable XA Transaction Timeout option settings, navigate to Services—>JDBC—>Connection Pools and select the JDBC Connection Pool. On the Connections tab in the Configuration section, click Show to show the Advanced Options section.

      For WebLogic Integration domains, it is recommended that you set the value of the XA Transaction Timeout option to 60 seconds, and the value of the Timeout Seconds option for JTA to 50 for normal size messages, and increase these values proportionately as the size of your message increases.

    4. Click Apply.
  7. For WebLogic Portal domains only, if you have configured the portalPool to use an XA driver and you are using the optional commerce functionality:
    1. In the left pane of the Administration Console, navigate to Services—>JDBC—>Data Sources.
    2. Select the portalFrameworkPool data source on the list.
    3. Remove weblogic.jdbc.jts.commercePool from the list of JNDI names.
    4. Click Apply.
    5. Select the cgDataSource-nonXA data source on the list.
    6. Add weblogic.jdbc.jts.commercePool to the list of JNDI names.
    7. Click Apply.

    For information about using commerce functionality, see "Adding Commerce Services to an Application" in the WebLogic Workshop Help at the following URL: http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/portal/buildportals/commerce.html

  8. In the left pane of the Administration Console, navigate to Servers—>cgServer. On the Start/Stop tab in the Control section, select Force shutdown of this server to shut down the server and then restart it.
  9. The domain is now set up to use a database with an XA Driver.

 


How Do I: Create XA Domains with MultiPools and an Oracle RAC Database?

WebLogic Platform 8.1 SP5 supports the use of JDBC MultiPools with an Oracle RAC database. A MultiPool is a group of connection pools, but to an application, the characteristics of a MultiPool appear identical to those of a single basic connection pool. Each connection pool in a MultiPool is assigned to a different instance of the same database. If an application cannot obtain a connection from a particular connection pool because database connectivity from the pool is down, WebLogic Platform attempts to obtain a connection from the next connection pool in the MultiPool. Optionally, a MultiPool can be configured to provide load balancing, too.

Note: WebLogic Platform 8.1 SP5 is certified to support Multipools with XA only on Oracle RAC.

This section presents procedures for:

Note: For complete information about creating an XA domain that uses Oracle RAC, see Using WebLogic Platform with Oracle RAC in Managing WebLogic Platform Database Resources.

Updating Existing XA Domains to Use Oracle RAC

If you already have a domain that was created with the Basic WebLogic Platform Domain template, then you have a domain that is capable of using XA resources. (For more information, see Guidelines for Changing to an XA Configuration.) As a result, you have the option of reconfiguring your domain so it uses Oracle RAC. How do you perform such a reconfiguration? The Configuration Wizard GUI does not completely support the configuration of domains that include Oracle RAC, so you cannot use the GUI for this task.

Instead, this type of reconfiguration must be executed through a script produced with WebLogic Server Scripting Tool (WLST) Offline. WLST Offline is a command-line scripting interface for configuring a domain. For more information about using it to update a domain, specifically for the purpose of accommodating Oracle RAC, see Updating an Existing XA Domain to Use Oracle RAC in "Using WebLogic Platform with Oracle RAC" in Managing WebLogic Platform Database Resources.

For a sample script that you can use to update an existing Platform domain, see Appendix B, WebLogic Scripting Tool (WLST) Offline Update File, in Managing WebLogic Platform Database Resources.

Creating XA Domains that Use Oracle RAC

The process of creating an XA domain that is set up for Oracle RAC to be used consists of two main tasks:

This section presents a procedure for each task, and then offers a sample config.xml file (see Sample config.xml Code) so you can understand how your file should look when you finish editing it.

Task 1: Use the Configuration Wizard to Create a Domain

To create a domain that uses an Oracle RAC database, see the procedure in How Do I: Create a Domain Using a Different Database?. Complete all the steps as specified in that procedure with the following exceptions:

  1. In the Configure JDBC Connection Pools window, remove the following predefined connection pools by highlighting each pool name and clicking Delete:
    • portalPool
    • cgPool
    • bpmArchPool
    • Note: Do not delete cgJMSPool-nonXA.

  2. In the Configure JDBC Connection Pools window, create the following six connection pools:
    • portalPool1
    • portalPool2
    • cgPool1
    • cgPool2
    • bpmArchPool1
    • bpmArchPool2

    To create a connection pool, click Add. Enter the values appropriate for your Oracle database setup. Table 14-6 shows some sample values. To make sure the values you specify for dbname1, dbname2, dbhost1, dbhost2, user_name, and user_password are appropriate for your Oracle database setup, ask your database administrator to supply them. Here dbname1 and dbhost1 represent the name of instance 1 of the database and the name of its host machine, respectively. dbname2 and dbhost2 represent the name of instance 2 of the database and the name of its host machine.

    Table 14-6 Sample Values for Connection Pools

    Name

    Vendor

    Driver Name

    DBMS

    Name

    DBMS

    Host

    DBMS

    Port

    User name

    User password

    portalPool1

    Oracle

    Oracle's Driver (Thin XA)

    dbname1

    dbhost1

    1521

    user_name

    user_password

    portalPool2

    Oracle

    Oracle's Driver (Thin XA)

    dbname2

    dbhost2

    1521

    user_name

    user_password

    cgPool1

    Oracle

    Oracle's Driver (Thin XA)

    dbname1

    dbhost1

    1521

    user_name

    user_password

    cgPool2

    Oracle

    Oracle's Driver (Thin XA)

    dbname2

    dbhost2

    1521

    user_name

    user_password

    bpmArchPool1

    Oracle

    Oracle's Driver (Thin XA)

    dbname1

    dbhost1

    1521

    user_name

    user_password

    bpmArchPool2

    Oracle

    Oracle's Driver (Thin XA)

    dbname2

    dbhost2

    1521

    user_name

    user_password

    cgJMSPool-nonXA

    Oracle

    Oracle's Driver (Thin) Versions: 9.0.1, 9.2.0, 10

    dbname1

    dbhost1

    1521

    user_name

    user_password


     
  3. Click Next to save your changes, and go to the Configure JDBC MultiPools window.
  4. In the Configure JDBC MultiPools window, create the following JDBC MultiPools:
    • cgMultiPool
    • portalMultiPool
    • bpmArchMultiPool

    To create a MultiPool, click Add, and enter the appropriate MultiPool name.

  5. Select an algorithm type:
    • High-Availability
    • With the High-Availability option set, connection requests are served by the first available pool in the list. When a connection pool becomes defunct, connection requests are served by the next connection pool in the list.

    • Load-Balancing
    • With the Load-Balancing option, connection requests are distributed among available connection pools.

  6. Click Next to save your changes and go to the Assign JDBC Connection Pools to MultiPools window.
  7. In the JDBC MultiPool pane, select the JDBC MultiPool to which you want to assign JDBC connection pools.
  8. In the left pane, click the check box beside each JDBC connection pool that you want to assign to the selected multipool. Table 14-7 shows which connection pools to assign to each MultiPool.
  9. Table 14-7 Assignments of Connection Pools to MultiPools

    Connection Pools

    MultiPool

    portalPool1, portalPool2

    portalMultiPool

    cgPool1, cgPool2

    cgMultiPool

    bpmArchPool1, bpmArchPool2

    bpmArchMultiPool


     

Note: Do not assign the connection pool called cgJMSPool-nonXA to a MultiPool. WebLogic Platform does not support the use of MultiPools with JMS JDBC Stores. If your application makes use of JMS JDBC Stores, you must configure them to use Oracle RAC with connect-time failover. For instructions, see step 6 in Task 2: Edit the config.xml File.

  1. Click Next to save your changes and go to the Configure JDBC Data Sources window.
  2. In the Configure JDBC Data Sources window, assign each JDBC data source to the appropriate JDBC connection pool or MultiPool, as shown in Table 14-8. From the drop-down list of Pool names, select the JDBC MultiPool to be associated with each data source.
  3. Table 14-8 Assignment of Data Sources

    Data Source

    Pool Name

    p13n_trackingDataSource

    cgJMSPool-nonXA

    p13nDataSource

    cgJMSPool-nonXA

    portalFrameworkPool

    portalMultiPool

    cgDataSource

    cgMultiPool

    cgDataSource-nonXA

    cgJMSPool-nonXA

    bpmArchDataSource

    bpmArchMultiPool


     

You have now finished configuring connection pools, MultiPools, and JDBC data sources. Return to the procedure you started earlier, How Do I: Create a Domain Using a Different Database?. Complete steps 12 through 24 of that procedure before proceeding to Task 2: Edit the config.xml File.

Task 2: Edit the config.xml File

To enable your domain to use MultiPool failover or load balancing, as well as connect-time failover, you must manually edit your config.xml file:

  1. Go to the \BEA_HOME\user_projects\domains\platform directory, where BEA_HOME represents the pathname of the directory in which WebLogic Platform is installed. Open the config.xml file.
  2. Find each instance of the following definition:
  3. <JDBCConnectionPool Name="connectionpool"

    where the value of connectionpool is one of the following: cgPool1, cgPool2, portalPool1, portalPool2, bpmArchPool1, or bpmArchPool2. For each such JDBC connection pool, the following section of code is provided:

    <JDBCConnectionPool Name="connectionpool"

    DriverName="oracle.jdbc.xa.client.OracleXADataSource"
    Password="{3DES}q7oBrwmN89U="
    Properties="user=
    user_name"
    TestConnectionsOnReserve="true"
    TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:oracle:thin:@lcqlnxas10:1521:lnrac2"/>

  4. Verify the following default attributes:
    • TestConnectionsOnReserve="true"
    • The value should be set to "true".When this parameter is set to true, WebLogic Platform tests a connection before giving it to a client. The test adds a small delay in serving the client's request for a connection from the pool, but it ensures that the client receives a working connection, as long as the DBMS is available and accessible.

    • TestTableName="SQL SELECT 1 FROM DUAL"
    • Specifies the table used to test a physical database connection. For more details about this attribute, see TestTableName in "JDBCConnection Pool -->—>Configuration --> Connections" in the WebLogic Server Administration Console Online Help.

  5. Add the following required attributes for XA to each connection pool (that is, cgPool1, cgPool2, portalPool1, portalPool2, bpmArchPool1, and bpmArchPool2):
    • RefreshMinutes="1"
    • The interval, specified in minutes, between database connection tests. After every such interval, unused database connections are tested using TestTableName. Connections that fail are closed and reopened to re-establish a valid physical database connection. If TestTableName is not set, the test is not performed.

    • CountOfTestFailuresTillFlush="1"
    • Specifies the number of test failures allowed before WebLogic Platform closes all connections in the connection pool to minimize the delay caused by further database testing. For more information about this attribute, see JDBC Connection Pool Testing Enhancements in "Configuring and Using WebLogic JDBC" in Programming WebLogic JDBC.

      Minimizes the time allowed for failover when an Oracle RAC node fails.

    • CountOfRefreshFailuresTillDisable="1"
    • Specifies the number of test failures allowed before the connection pool is disabled. By limiting the amount of time allowed for repeated tests, you can minimize the delay in handling the connection request after a database failure.

    • InitialCapacity="5"
    • Specifies the number of physical database connections established when you create a connection pool.

    • KeepXAConnTillTxComplete="true"
    • Forces the connection pool to reserve a physical connection to the database, and to maintain a connection to an application throughout the processing of each transaction, that is, until the distributed transaction is complete.

    • MaxCapacity="100"
    • Specifies the maximum number of physical database connections that this connection pool can contain. Different JDBC Drivers and database servers may limit the number of possible physical connections.

    • SupportsLocalTransaction="true"
    • When this attribute is set to true, the XA driver used to create physical database connections supports SQL without global transactions. This attribute applies to connection pools that use an XA driver only; it is ignored for connection pools that use non-XA drivers.

    • XARetryDurationSeconds="300"
    • Specifies the amount of time that the WebLogic Platform transaction manager can retry XA recover, commit, and rollback calls.

    • XASetTransactionTimeout="true"
    • When this attribute is set to true, the global transaction timeout, XATransactionTimeout, is enabled. This attribute applies to XA connection pools only; it is ignored for connection pools that use non-XA drivers.

    • XATransactionTimeout="302"
    • Determines the number of seconds for a global transaction to time out. This attribute applies to XA connection pools only; it is ignored for connection pools that use non-XA drivers.

      Note: Attributes must be set to the same values for each XA connection pool.

  6. Add the following required attributes to each MultiPool (that is, cgMultiPool, portalMultiPool, and bpmArchMultiPool):
    • FailoverRequestIfBusy="true"
    • For MultiPools configured for High Availability, this attribute enables failover when all connections in a connection pool are in use.

    • HealthCheckFrequencySeconds="300"
    • Controls how often WebLogic Platform checks automatically disabled connection pools in a MultiPool to determine whether connections can be recreated and whether the connection pool can be re-enabled. The default value is 300 seconds.

  7. Configure your JMS JDBC Store to use connect-time failover. In the config.xml file, find the following section:

    <JDBCConnectionPool
  8. Name="cgJMSPool-nonXA"
    Targets="cgServer"
    CapacityIncrement="1"
    DriverName="oracle.jdbc.OracleDriver"
    InitialCapacity="5" MaxCapacity="20"
    Password="{3DES}q7oBrwmN89U="
    Properties="user=user_name"
    RefreshMinutes="0"
    ShrinkPeriodMinutes="15"
    ShrinkingEnabled="true"
    SupportsLocalTransaction="true"
    TestConnectionsOnRelease="false"
    TestConnectionsOnReserve="false"
    TestTableName="SQL SELECT 1 FROM DUAL"
    URL="jdbc:oracle:thin:@lcqlnxas9:1521:lnrac1"/>

Note: Line breaks are included only for readability.

  1. Make the following changes to the default attributes:
    • RefreshMinutes="0"
    • Change the value to "1". This attribute defines the interval, specified in minutes, allowed between database connection tests. After every such interval, unused database connections are tested using TestTableName. Connections that fail are closed and reopened to re-establish a valid physical database connection.

    • TestConnectionsOnReserve="false"
    • Change the value to "true". When the value of this attribute is set to true, WebLogic Platform tests a connection before giving it to a client. The test adds a small delay in serving the client's request for a connection from the pool, but it ensures that the client receives a working connection, as long as the DBMS is available and accessible.

  2. Add the following attribute:
  3. CountOfTestFailuresTillFlush="1" 

    Specifies the number of test failures allowed before WebLogic Platform closes all connections in the connection pool to minimize the delay caused by further database testing. For more information about this attribute, see JDBC Connection Pool Testing Enhancements in "Configuring and Using WebLogic JDBC" in Programming WebLogic JDBC.

    Minimizes the time allowed for failover when an Oracle RAC node fails.

  4. Replace the URL line with the following:
  5. URL="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=TCP)(HOST=dbhost1)(PORT=1521))
    (ADDRESS=(PROTOCOL=TCP)(HOST=dbhost2)(PORT=1521)) (FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA=(SERVER=DEDICATED) (SERVICE_NAME=dbservice)))"

    Note: Line breaks are included only for readability.

    Obtain the values for dbhost1, dbhost2, and dbservice from your database administrator.

    Note: This URL is set to configure the JMS JDBC store for connect-time failover (that is, FAILOVER=on,LOAD_BALANCE=off). Do not set the configuration for load balancing (that is, FAILOVER=off,LOAD_BALANCE=on). Connect-time load balancing is not supported in Release 8.1 SP5.

Sample config.xml Code

The following code provides an example of how connection pools, a WebLogic JDBC MultiPool, and an associated data source are configured [defined?] in the config.xml file. For more information on editing the config.xml file and using the WLST script to configure a domain completely, see Using WebLogic Platform with Oracle RAC in Managing WebLogic Platform Database Resources.

<JDBCConnectionPool 
CapacityIncrement="1"
CountOfRefreshFailuresTillDisable= "1"
CountOfTestFailuresTillFlush="1"
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
InitialCapacity="5"
KeepXAConnTillTxComplete="true"
MaxCapacity="100"
Name="cgPool1"
PasswordEncrypted="{3DES}lBifoTsg8fc="
Properties="user=user_name"
RefreshMinutes="1"
SupportsLocalTransaction="true"
Targets="cgServer"
TestConnectionsOnReserve="true"
TestTableName="dual"
URL="jdbc:oracle:thin:@dbhost1:1521:dbname1"
XARetryDurationSeconds="300"
XASetTransactionTimeout="true"
XATransactionTimeout="302"/>
<JDBCConnectionPool 
CapacityIncrement="1"
CountOfRefreshFailuresTillDisable= "1"
CountOfTestFailuresTillFlush="1"
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
InitialCapacity="5"
KeepXAConnTillTxComplete="true"
MaxCapacity="100"
Name="cgPool2"
PasswordEncrypted="{3DES}lBifoTsg8fc="
Properties="user=user_name"
RefreshMinutes="1"
SupportsLocalTransaction="true"
Targets="cgServer"
TestConnectionsOnReserve="true"
TestTableName="dual"
URL="jdbc:oracle:thin:@dbhost2:1521:dbname2"
XARetryDurationSeconds="300"
XASetTransactionTimeout="true"
XATransactionTimeout="302"/>
<JDBCMultiPool 
Name="cgMultiPool"
PoolList="cgPool1,cgPool2"
#The following attribute is valid only for high availability.
FailoverRequestIfBusy="true"
HealthCheckFrequencySeconds="300"
Targets="cgServer"/>
<JDBCTxDataSource 
JNDIName="cgDataSource"
Name="cgDataSource"
EnableTwoPhaseCommit="true"
PoolName="cgMultiPool"
Targets="cgServer"/>
<JDBCConnectionPool Name="cgJMSPool-nonXA" 
Targets="cgServer"
DriverName="oracle.jdbc.OracleDriver"
URL="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost1)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost2)(PORT=1521))
(FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA=(SERVER=DEDICATED)
(SERVICE_NAME=dbservice)))"
InitialCapacity="5"
MaxCapacity="5"
CapacityIncrement="1"
PasswordEncrypted="{3DES}1rWxb2KuIbI="
RefreshMinutes="1"
ShrinkPeriodMinutes="15"
ShrinkingEnabled="true"
SupportsLocalTransaction="true"
Properties="user=user_name"
TestTableName="dual"
TestConnectionsOnReserve="true"
CountOfTestFailuresTillFlush="1" />
<JDBCDataSource Name="cgDataSource-nonXA" 
Targets="cgServer"
JNDIName="cgDataSource-nonXA"
PoolName="cgJMSPool-nonXA" />

Note: Line breaks are included only for readability.

 

Skip navigation bar  Back to Top Previous Next