Oracle Maximum Availability Architecture (MAA) with JBoss EAP managed connection pools

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7

Issue

  • Can I use connections from Oracle's Universal Connection Pool (UCP) in container managed transactions in JBoss EAP?
  • How do I configure a JBoss EAP datasource to use Oracle's UCP?
  • Using EAP7 with Oracle UCP
  • Oracle Transparent Application Continuity (TAC) with JBoss EAP 7.4

Resolution

Disclaimer: Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.

Scope

This document is limited to discussion of application components which require access to Oracle Maximum Availability Architecture (MAA) features in the context of code which is using JBoss EAP container managed transactions (CMT) or which uses the JBoss EAP implementation of javax.transaction.UserTransaction in bean managed transaction (BMT) scenarios. Application components which do not utilize CMT or BMT code may be coded directly against the Oracle connectivity libraries and, as such, would not be subject to the considerations discussed in this document (since they would not utilize integration between the JBoss EAP container services and Oracle database connectivity code).

Minimum System Requirements

When using the Oracle MAA with JBoss EAP, Red Hat recommends the following:

  • JBoss EAP 7.4 Update 1 (or later) / JBoss EAP 7.3 Update 8 (or later)
  • JDK 111
  • JBoss EAP managed pools using Oracle MMA enabled configuration must be configured as non-XA pools (i.e. use <datasource> rather than <xa-datasource>).
  • For fault tolerance the following should be configured

    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.novendor.JDBC4ValidConnectionChecker"/>
    <validate-on-match>true</validate-on-match>
    <background-validation>false</background-validation>
    <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
    
  • The FailingConnectionOnly flush strategy should be used (i.e. use the EAP pool default).
  • EAP pooled connection statement caching should not be enabled (i.e. use the EAP pool default).

Testing and Support

  • Red Hat does not test Oracle specific failover or application continuity features.
    • Red Hat does test connectivity to Oracle for documented version families of the Oracle database and driver.
    • JBoss EAP has no direct visibility of Oracle-specific database functionality which is not explicitly part of the JDBC 4 specification2.
    • For questions about specific Oracle functionality or specific configuration, consult Oracle documentation or Oracle Support services.
  • Red Hat Support provides assistance with:
    • Analysis of symptoms that indicate incorrect use (originating in JBoss EAP bundled code) of the JDBC 4 API.
    • Guidance in applying JVM level or pool-specific configuration that is explicitly recommended by Oracle3.

References


  1. Or a later version of the JDK which is tested by Red Hat for use with JBoss EAP↩︎

  2. Limited exceptions to this include Oracle specific exception sorters and validation mechanisms utilized in fault tolerance configuration and Oracle specific SQL and behavior related to interaction with the database through the Hibernate API. ↩︎

  3. Note that Oracle will provide specific recommendations for properties that need to be set to configure the Oracle driver but the manner in which these are exposed to the Oracle driver may be JBoss EAP specific (e.g. properties may need to be set in JBoss configuration using JBoss CLI commands). ↩︎

Root Cause

  • Application code that requires Java Enterprise Edition (EE) features such as container managed transactions (CMT) or bean managed transactions (BMT)1 may only use connections from JBoss EAP managed pools (in any transaction) to ensure transaction ACID properties can be maintained.
  • To access Oracle connection caching and FCF (Fast Connection Failover) with Oracle RAC (Real Application Clusters), it's necessary to use Oracle's UCP (Universal Connection Pool)2.
  • EAP does not delegate requests to the underlying JDBC driver each time a connection is requested by application components. Instead, connections obtained from the underlying driver are pooled within EAP (until they time out or are evicted from the pool due to validation failure).
  • Pooling outside of the Oracle driver is only possible with the JBoss JCA integration with beginRequest/endRequest lifecycle hooks for java.sql.Connection.

  1. Bean managed transactions will use javax.transaction.UserTransaction ↩︎

  2. Oracle UCP ↩︎

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.

Comments