appsGroupSpaceDataSource) with multi-data sources pointing to your Oracle RAC.
- For each JDBC data source, create one physical data source pointing to each node in the RAC. For example, for
p13nDataSource, create physical data sourcesp13nDataSource-1top13nDataSource-N, each pointing to one RAC node. Use the WebLogic Server Administration Console to create these data sources.Alternatively, you could create them by copying and updating the sample
jdbc.xmlfiles in theWL_HOME/portal/db/jdbc/oracle_thindirectory following the steps below:1) Copy the
dataSourceName-jdbc.xmlfile toDOMAIN_HOME/config/jdbcdirectory, and name itdataSourceName-n-jdbc.xml, where n is the sequence number of the n-th RAC node.2) Edit the file
dataSourceName-n-jdbc.xml. Replace@DB_USER@,@DB_USER_PASSWD@,@DB_HOST@,@DB_PORT@and@DB_NAME@. For@DB_HOST@and@DB_NAME@, use the hostname and SID of the n-th RAC node.3) Edit
config.xmlto add this newly created JDBC data source as a JDBC system resource. - Create a multi-data source for each of the JDBC data sources, which encompasses the physical data sources created above. For example, create a
p13nDataSourcemulti-data source which includesp13nDataSource-1top13nDataSource-Ncreated above.If you use the WebLogic Server Administration Console, you would need to first remove the existing data source with the same name, and then create the multi-data source. Also, since the WebLogic Server Administration Console does not provide a way to configure the value of global-transaction-protocol attribute for a multi-data source, you need to manually add the attribute into the corresponding
jdbc.xmllater.Alternatively, you could manually edit the corresponding
jdbc.xmlfollowing the steps below:1) Open the corresponding
jdbc.xmlfile, delete thejdbc-driver-paramselement and thejdbc-connection-pool-paramselement, including all their children elements:2) Between the
jndi-nameand theglobal-transactions-protocolelements, add the following two elements. Determine the value of algorithm-type from Table . The value of data-source-list is a comma-separated list of all the underlying physical data sources.<algorithm-type>Load-Balancing</algorithm-type><algorithm-type>Failover</algorithm-type><data-source-list>portalDataSourceAlwaysXA-1,
portalDataSourceAlwaysXA-2 </data-source-list> - An alternative to the manual procedure described above in steps 1 and 2 is WLST scripting. The sample
build.xml,oraracconf.pyandoraracconf.py.propertiesprovide an example of how to configure an existing WebLogic Portal domain to point to an Oracle RAC database. These files are listed in Sample WLST Scripts. To use the sample, follow the steps below:1) Download these files into your
DOMAIN_HOMEdirectory.2) Open the file
oraracconf.py.properties. Edit the values in the "Database usernames and passwords" and the "ORACLE RAC configuration" sections to reflect your Oracle RAC environment.3) Open a command prompt, change current directory to
DOMAIN_HOME/bin. Execute the following script: