Creating WebLogic Configurations Using the Configuration Wizard
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
This section provides information and examples for some common domain configuration tasks:
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
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:
To change to an XA configuration:
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.
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:
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.
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. |
||
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: |
||
Keep bound to the Note: Although |
||
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.
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. |
||
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:
|
||
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:
|
||
Keep bound to the Note: Although |
||
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.
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. |
||
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: |
||
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: |
||
Keep bound to the Note: Although Use the WebLogic Server Administration Console to verify that the Enable Two-Phase Commit option is enabled. |
||
Keep bound to the Note: If you are using the optional commerce functionality in a Portal domain configured for XA, then you must move |
||
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.
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. |
||
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:
|
||
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:
|
||
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: |
||
Keep bound to the Note: Although Use the WebLogic Server Administration Console to verify that the Enable Two-Phase Commit option is enabled. |
||
Keep bound to the Note: If you are using the optional commerce functionality in a Portal domain configured for XA, then you must move |
||
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).
myOraclePool
Oracle
OracleDriver
MyOracleDB
MyOracleMachineName
MyOraclePortNumber
MyUserName
MyUserPassword
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:
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.
myDataSource
myDataSource
myDBPool
Note: Make sure to first start your target database and ensure that the database is accessible; otherwise, the driver configuration test will fail.
Note: Optionally, select the Log File option to write the results of your database load to the specified log file.
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.
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 starting this procedure, we recommend that you review the following topics:
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.
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:
The following provides example settings for configuring an Oracle database with an XA driver:
Oracle
Oracle's Driver (Thin XA)
MyOracleDB
MyOracleMachineName
MyOraclePortNumber
MyUserName
MyUserPassword
MyUserPassword
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.
Once the Administration Server is running, you log in to the domain's Administration Console to verify the JDBC configuration for your domain.
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:
portalPool
, if defined, which requires this option to be disabled).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.
To view the XA Transaction Timeout and Enable XA Transaction Timeout option settings, navigate to Services
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.
portalPool
to use an XA driver and you are using the optional commerce functionality: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
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.
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.
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.
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:
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.
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.
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.
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.
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:
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.<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:
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 -->
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"
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
"config.xml
file, find the following section:<JDBCConnectionPool
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.
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.
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.
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)))"
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.
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" />
![]() ![]() |
![]() |
![]() |