4-6 Oracle Fusion Middleware Configuring and Managing JDBC Data Sources for Oracle WebLogic Server
■
Section 4.2.4, Test Connections
■
Section 4.2.5, Configure an ONS Client Configuration
■
Section 4.2.6, Test ONS Client Configuration
■
Section 4.2.7, Target the Data Source
4.2.1 JDBC Data Source Properties
JDBC Data Source Properties include options that determine the identity of the data
source and the way the data is handled on a database connection.
4.2.1.1 Data Source Names
JDBC data source names are used to identify the data source within the WebLogic domain. For system resource data sources, names must be unique among all other
JDBC system resources, including data sources and multi data sources. To avoid naming conflicts, data source names should also be unique among other configuration
object names, such as servers, clusters, and JMS queues, topics, and servers. For JDBC application modules scoped to an application, data source names must be unique
among JDBC data sources and multi data sources that are similarly scoped.
4.2.1.2 JNDI Names
You can configure a data source so that it binds to the JNDI tree with a single or multiple names. You can use a multi-JNDI-named data source in place of legacy
configurations that included multiple data sources that pointed to a single JDBC connection pool. For more information, see rss
4.2.1.3 Select an XA or Non-XA Driver
Specify how your data source handles global transactions.
4.2.2 Configure Transaction Options
When you configure a JDBC data source using the Administration Console, WebLogic Server automatically selects specific transaction options based on the type of JDBC
driver:
■
For XA drivers , the system automatically selects the Two-Phase Commit protocol
for global transaction processing.
■
For non-XA drivers , local transactions are supported by definition, and WebLogic
Server offers the following options
Supports Global Transactions : selected by default Select this option if you want
to use connections from the data source in global transactions, even though you have not selected an XA driver. See
Section 7.1, Enabling Support for Global Transactions with a Non-XA JDBC Driver
for more information. When you select Supports Global Transactions, you must also select the protocol
for WebLogic Server to use for the transaction branch when processing a global transaction:
– Logging Last Resource
: With this option, the transaction branch in which the connection is used is processed as the last resource in the transaction and is
processed as a local transaction. Commit records for two-phase commit 2PC transactions are inserted in a table on the resource itself, and the result
determines the success or failure of the prepare phase of the global transaction. This option offers some performance benefits and greater data
Using GridLink Data Sources 4-7
safety than Emulate Two-Phase Commit, but it has some limitations. See Section 7.2, Understanding the Logging Last Resource Transaction Option.
– Emulate Two-Phase Commit
: With this option, the transaction branch in which the connection is used always returns success for the prepare phase of
the transaction. It offers performance benefits, but also has risks to data in some failure conditions. Select this option only if your application can tolerate
heuristic conditions. See Section 7.3, Understanding the Emulate Two-Phase
Commit Transaction Option.
– One-Phase Commit
: selected by default With this option, a connection from the data source can be the only participant in the global transaction and the
transaction is completed using a one-phase commit optimization. If more than one resource participates in the transaction, an exception is thrown when the
transaction manager calls XAResource.prepare on the 1PC resource.
For more information on configuring transaction support for a data source, see Section 7, JDBC Data Source Transaction Options.
4.2.3 Configure Connection Properties