Uploaded image for project: 'KIE Cloud'
  1. KIE Cloud
  2. KIECLOUD-597

XA datasource URL property is set even if no URL is provided

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.12.1.GA
    • 7.11.1.GA
    • RHPAM
    • None
    • 2021 Week 46-48 (from Nov 15), 2021 Week 49-51 (from Dec 6th), 2022 Week 02-04 (from Jan 10)
    • Hide

      docker run -it --env SCRIPT_DEBUG=true \
      --env DATASOURCES=TEST \
      --env TEST_USERNAME=spolti \
      --env TEST_PASSWORD=spolti \
      --env TEST_DRIVER=postgresql \
      --env TEST_XA_CONNECTION_PROPERTY_ServerName=172.17.0.2 \
      --env TEST_XA_CONNECTION_PROPERTY_PortNumber=5432 \
      --env TEST_XA_CONNECTION_PROPERTY_DatabaseName=hello \
      --env TEST_XA_CONNECTION_PROPERTY_Ssl=true \
      --env TEST_XA_CONNECTION_PROPERTY_SslMode=allow \
      --env EJB_TIMER_XA_CONNECTION_PROPERTY_Ssl=true \
      --env EJB_TIMER_XA_CONNECTION_PROPERTY_SslMode=allow \
      --env TEST_NONXA=false \
      --env TEST_TIMER_EXCEPTION_SORTER=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter \
      --env TEST_TIMER_CONNECTION_CHECKER=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker \
      --env TIMER_SERVICE_DATA_STORE_REFRESH_INTERVAL=10000 \
      --env KIE_SERVER_PERSISTENCE_DS=java:/jboss/datasources/rhpam \
      --env TEST_JNDI=java:/jboss/datasources/rhpam \
      --env KIE_SERVER_PERSISTENCE_DIALECT=org.hibernate.dialect.PostgreSQLDialect \
       registry.redhat.io/rhpam-7/rhpam-kieserver-rhel8:7.11.1

       

       

      The check the generated datasource:

       

              <xa-datasource jndi-name="java:/jboss/datasources/JBPM" pool-name="jbpm-JBPM" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
                 <xa-datasource-property name="DatabaseName">postgres</xa-datasource-property>
                <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
                <xa-datasource-property name="ServerName">test-psqlserver.postgres.database.azure.com</xa-datasource-property>
                <xa-datasource-property name="Ssl">true</xa-datasource-property>
                <xa-datasource-property name="SslMode">require</xa-datasource-property>
                <xa-datasource-property name="URL">jdbc:postgresql://:/</xa-datasource-property>_

      Show
      docker run -it --env SCRIPT_DEBUG=true \ --env DATASOURCES=TEST \ --env TEST_USERNAME=spolti \ --env TEST_PASSWORD=spolti \ --env TEST_DRIVER=postgresql \ --env TEST_XA_CONNECTION_PROPERTY_ServerName=172.17.0.2 \ --env TEST_XA_CONNECTION_PROPERTY_PortNumber=5432 \ --env TEST_XA_CONNECTION_PROPERTY_DatabaseName=hello \ --env TEST_XA_CONNECTION_PROPERTY_Ssl=true \ --env TEST_XA_CONNECTION_PROPERTY_SslMode=allow \ --env EJB_TIMER_XA_CONNECTION_PROPERTY_Ssl=true \ --env EJB_TIMER_XA_CONNECTION_PROPERTY_SslMode=allow \ --env TEST_NONXA=false \ --env TEST_TIMER_EXCEPTION_SORTER=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter \ --env TEST_TIMER_CONNECTION_CHECKER=org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker \ --env TIMER_SERVICE_DATA_STORE_REFRESH_INTERVAL=10000 \ --env KIE_SERVER_PERSISTENCE_DS=java:/jboss/datasources/rhpam \ --env TEST_JNDI=java:/jboss/datasources/rhpam \ --env KIE_SERVER_PERSISTENCE_DIALECT=org.hibernate.dialect.PostgreSQLDialect \   registry.redhat.io/rhpam-7/rhpam-kieserver-rhel8:7.11.1     The check the generated datasource:           <xa-datasource jndi-name="java:/jboss/datasources/JBPM" pool-name="jbpm-JBPM" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">            <xa-datasource-property name="DatabaseName">postgres</xa-datasource-property>           <xa-datasource-property name="PortNumber">5432</xa-datasource-property>           <xa-datasource-property name="ServerName"> test-psqlserver.postgres.database.azure.com </xa-datasource-property>           <xa-datasource-property name="Ssl">true</xa-datasource-property>           <xa-datasource-property name="SslMode">require</xa-datasource-property>           <xa-datasource-property name="URL">jdbc:postgresql://:/</xa-datasource-property> _

      When configuring XA datasources using xa-datasource-properties, the URL is added with empty fields, see it on the steps to reproduce.

       

       

              rhn-support-fspolti Filippe Spolti
              rhn-support-fspolti Filippe Spolti
              Jakub Schwan Jakub Schwan
              Jakub Schwan Jakub Schwan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: