• Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 13.0, 12.2.2, 12.3.1
    • None
    • AdminApi
    • None

      The method getTemplatePropertyDefinitions, in the class AdminFactory.java.
      The datasource name should be "xa-data-source" instead of "data-source" when the datasource is XA. See the code snapshot below:

      // get JDBC properties  
              if (isXA(templateName)) {  
                      cliCall("read-resource-description", new String[] {"subsystem", "datasources", "data-source",   
                              stripXA(templateName)}, null, builder);  
                      addXAProperties(props);  
              } else {  
                  cliCall("read-resource-description", new String[] {"subsystem", "datasources", "data-source",   
                          templateName}, null, builder);  
                  addDriverproperties(props);              
              }  
       

      Another issue, when reading using the method getDataSource in the class AdminFactory.java, it is not getting the properties recursively. and the connection properties are returned as undefined like below:

       
       "xa-datasource-properties" => {  
       "DatabaseName" => undefined,  
       "PortNumber" => undefined,  
       "ServerName" => undefined  
              }  
       

      more details in the following forum discussion link: https://developer.jboss.org/thread/280411?start=15&tstart=0

            [TEIID-5827] XA datasource properties are undefined

            URL has now replaced connection-url for xa as full property. Most other xa-datasource-properties will need to be set through connection-properties though.

            Steven Hawkins added a comment - URL has now replaced connection-url for xa as full property. Most other xa-datasource-properties will need to be set through connection-properties though.

            mtawk with the existing logic it looks like that would need to be set via the connection-properties property as URL=jdbc:oracle:thin:@oraclehost:1521/ORCL - I think this needs some tweaking as the code has special handling only for a handful of xa properties: ServerName, PortNumber, and DatabaseName

            Steven Hawkins added a comment - mtawk with the existing logic it looks like that would need to be set via the connection-properties property as URL=jdbc:oracle:thin:@oraclehost:1521/ORCL - I think this needs some tweaking as the code has special handling only for a handful of xa properties: ServerName, PortNumber, and DatabaseName

            Thank you Steven for the fix.
            We encountered an issue with xa-datasource using Oracle. We are not able to set the xa-datasource-property "URL" for the oracle connection.

            <xa-datasource-property name="URL">
                                    jdbc:oracle:thin:@oraclehost:1521/ORCL
                                </xa-datasource-property>
            

            Mark Tawk (Inactive) added a comment - Thank you Steven for the fix. We encountered an issue with xa-datasource using Oracle. We are not able to set the xa-datasource-property "URL" for the oracle connection. <xa-datasource-property name= "URL" > jdbc:oracle:thin:@oraclehost:1521/ORCL </xa-datasource-property>

            Updated the name and the logic in getDataSource to look at the xa-datasource-properties as well.

            Steven Hawkins added a comment - Updated the name and the logic in getDataSource to look at the xa-datasource-properties as well.

              rhn-engineering-shawkins Steven Hawkins
              mtawk Mark Tawk (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: