Configuration to use Oracle Database RAC with JBoss ON
Environment
- Red Hat JBoss Operations Network (ON) 2.x, 3.x
- Oracle Database Real Application Clusters (RAC)
Issue
- Configuration for RAC instead of single database
Resolution
You should consult with your Database Administrator (DBA) for the correct JDBC URL for your environment. An example RAC URL might look like:
jdbc:oracle:thin:@(description=(address_list=(load_balance=on)(failover=on)(address=(protocol=tcp)(host=my-oracle-db-01)(port=1521))(address=(protocol=tcp)(host=my-oracle-db-02)(port=1521)))(connect_data=(service_name=rhq)(failover_mode=(type=select)(method=basic))))
The URL should be defined in the rhq-server.properties and be appropriate for your Oracle Database RAC configuration. As of JBoss Operations Network 3.3 Update 11 a comment has been added to rhq-server.properties to remind that the default URL is an example only and is not expected to work in a production environment.
Root Cause
The URL provided for database connection in rhq-server.properites is an example only. It does not include the necessary configuration for database clustering, network load balancing, fault tolerance, legacy configuration and schema definitions. Although it may work for most development scenarios it is expected that the URL be customized to the customer's environment and use-case for the supported features of the target database.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.