Uploaded image for project: 'Agroal'
  1. Agroal
  2. AG-170

Add support of java.util.Properties type in PropertyInjector to allow to set OracleXADatasource.connectionProperties attribute as JDBC property

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 1.12
    • 1.11
    • None
    • None
    • False
    • False
    • Undefined

    Description

      Hi,

      I would like to ask if it would be possible to add a small enhancement to the Agroal pool implementation that we need to set some Oracle JDBC driver specific attributes, that are set using the generic OracleXADatasource.setConnectionProperties(java.util.Properties) method.

      The thing is that PropertyInjector supports type conversions to primitive property types but this method expects a java.util.Properties instance.

      Would it be a way to support a semicolon separated String value like

      String connectionProperties = "oracle.net.authentication_services=(KERBEROS5);oracle.net.kerberos5_mutual_authentication=true;oracle.net.kerberos5_cc_name=test1";

      to be converted to a java.util.Properties object?

      This way I could pass that String to the ConnectionFactoryConfigurationSupplier using the jdbcProperty method:

      AgroalConnectionFactoryConfigurationSupplier supplier;
      //...
      supplier.jdbcProperty("connectionProperties", connectionProperties);

      I already implemented that approach on my fork and that works for us:
      https://github.com/cbue/agroal/commit/58209669b9db9b181b2feb99105b16b5bd06614f

      Other implementations like in OpenLiberty support the same semicolon separated approach to set Oracle specific connectionProperties.

      Would it be possible to create a pull request for that change? Is there a chance to get it into your code base?

      Thank you!

      Regards
      Christian

       

      Attachments

        Activity

          People

            lbarreiro-1 Luis Barreiro
            christian@buerenheide.de Christian Buerenheide (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: