Databases Reference
In-Depth Information
See also
F Creating a multi data source
Creating a multi data source
The multi data source should be used when connecting to an Oracle RAC database.
The multi data source is a data source abstraction that groups all the individual data
sources that connect to each node of the Oracle RAC database.
Consider that the DBApp application requires an XA connection with a JNDI name
jdbc/ds-XA added to a database.
The database is an Oracle RAC database with two nodes. The first node has an instance name
instance-rac01 and runs in the dbhost-rac01 hostname and listens to the port 1521 .
The listener accepts requests to the service name dbservice-rac01 . The second node is
the instance instance-rac02 , and it runs in the dbhost-rac02 hostname, listens to the
port 1521 , and has a service name dbservice-rac02 .
In this recipe, a new JDBC multi data source will be created and configured for the
DBApp application.
Getting ready
Before creating the multi data source, the individual data sources pointing to each RAC
node must be created. Two data sources will be created with the names ds-XA-rac01 and
ds-XA-rac02 and with the JNDI names jdbc/ds-XA-rac01 and jdbc/ds-XA-rac02 .
The multi data source will be named ds-XA and includes both data sources.
How to do it...
Carry out the following steps to create a multi data source:
1. Access the Administration Console with your web browser at
http://adminhost.domain.local:7001/console .
2. Click on the Lock & Edit button to start a new edit session.
3. Click on the plus sign to open the Services tree on the left, and then
click on Data Sources.
4. Click on the New button and then click on Generic Data Source.
5. Type ds-XA-rac01 in the Name field and jdbc/ds-XA-rac01 in the JNDI Name
field. Leave the Database Type drop-down menu with the Oracle option selected.
Click on the Next button.
 
Search WWH ::




Custom Search