3 Replies Latest reply on Mar 21, 2018 4:10 PM by Ivan Brezina

    Oracle Universal Connection Pool (UCP) with JBOSS or Wildfly

    Adam Richards Newbie

      Sirs,

      I have researched the web extensively for solutions on how to implement Oracle Universal Connection Pool (UCP) in the wildfly 10 container.

      I understand that you can use the existing container to created pooled datasources that point to a specific jdbc driver.  An that is what we

      currently use.  However in order to use the fail over RAC features that UCP provides, I believe some other solution is necessary.

      I would like this solution to be visible as a DataSource via JNDI.

      I found only one comprehensive answer on the internet and attempted to implement it.

      Here is the link that I reference: https://bharatraju.wordpress.com/tag/jdbc-fast-connection-failover-with-oracle-and-jboss/

       

      I will also attach the code I use.

       

      The SAR does deploy, but I see no logging and there does not appear to be any 'new' jndi datasource, when I look at the Admin Console.

      To be honest, I am not even sure where a successful implemenation would show up in the Admin Console.

       

      I am NOT  very experience with any advanced features of the EE container and could be making a simple mistake.

       

      Any input recommendations or references to other sources would be greatly appreciated.

       

      Adam

        • 1. Re: Oracle Universal Connection Pool (UCP) with JBOSS or Wildfly
          Anup Dey Expert

          Wildfly/ JBoss EAP 6 and 7 use the JDBC API to access databases using JDBC 4.x compliant drivers supplied by database vendors. These drivers must adhere to the JDBC 4.x specification, although some vendors provide additional proprietary features. Fast Connection Failover (FCF) is one of these features.

           

          To gain access to Oracle's connection caching and FCF with Oracle RAC, you must use Oracle Universal Connection Pool (UCP). However, Oracle's UCP is neither tested nor certified by Red Hat at this point and will not be supported in Wildfly/JBoss EAP 6/7. An RFE (request for enhancement) was logged for possible inclusion in EAP 7 but this has not been scheduled nor committed to by Product Management at this time.

           

          However, JBoss EAP/Wildfly does provide support for load-balancing and failover with Oracle RAC by using vendor-special features that are transparent to the application server to which they are deployed. For example, you can supply a detailed URL to the Oracle JDBC driver and the driver will provide transparent load-balancing and fail-over. The following is an example URL that provides load-balancing and fail-over.

           

          <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=my.host1.org)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=my.host2.org)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=servjboss)(failover_mode=(type=select)(method=basic)))</xa-datasource-property>

           

          See the below Supporting documentation:

           

          Configuring Fast Connection Failover

          Fast Connection Failover

          http://www.drdobbs.com/jvm/jdbc-fast-connection-failover-with-oracl/222700353

          • 2. Re: Oracle Universal Connection Pool (UCP) with JBOSS or Wildfly
            Adam Richards Newbie

            Anup Dey.

            I appreciate your reply.  As your response indicates, jboss does not support using the UCP pooling which as additional features including Oracle ONS.  Your suggestion could be used as a compromise. 

            My original post and the reference to attempting to use UCP as a JBOSS Service or Managed Bean seems like a possible alternative.  Which is what I am hoping for.

            • 3. Re: Oracle Universal Connection Pool (UCP) with JBOSS or Wildfly
              Ivan Brezina Newbie

              andey  wrote:

               

              <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=my.host1.org)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=my.host2.org)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=servjboss)(failover_mode=(type=select)(method=basic)))</xa-datasource-property>

               

              See the below Supporting documentation:

               

              Configuring Fast Connection Failover

              Fast Connection Failover

              http://www.drdobbs.com/jvm/jdbc-fast-connection-failover-with-oracl/222700353

              It is not correct, you mix two mechanisms.

              TAF - failover_mode=(type=select)(method=basic)) this is *only* available when using OCI drivers. Or possibly JDBC/OCI driver. It is *not* supported by JDBC thin drivers.

               

              FCF - is something different. It does not work on "connection" level but on "connection pool" level. FYI FCF section was removed JDBC documentation and was moved into UCP docs.