Hi all,
I have a XA datasource I would like to set up as a Galleon layer. The problem is how to correctly define properties for the connection? I cannot find any example of it anywhere.
My layer-spec.xml looks like this:
<?xml version="1.0" ?>
<layer-spec xmlns="urn:jboss:galleon:layer-spec:1.0" name="myapp-datasource">
<dependencies>
<layer name="pqsql-driver"/>
</dependencies>
<feature spec="subsystem.datasources.xa-data-source">
<param name="xa-data-source" value="myds"/>
<param name="jndi-name" value="java:/jdbc/myds"/>
<param name="xa-datasource-class" value="org.postgresql.xa.PGXADataSource"/>
<param name="exception-sorter-class-name" value="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>
<param name="valid-connection-checker-class-name" value="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/>
<param name="statistics-enabled" value="true"/>
<param name="validate-on-match" value="false"/>
<param name="xa-resource-timeout" value="60"/>
<param name="min-pool-size" value="0"/>
<param name="max-pool-size" value="64"/>
<param name="flush-strategy" value="EntirePool"/>
<param name="user-name" value="${env.DB_USER}"/>
<param name="password" value="${env.DB_PASSWORD}"/>
<param name="background-validation" value="true"/>
<param name="background-validation-millis" value="30000"/>
<param name="blocking-timeout-wait-millis" value="1000"/>
<param name="idle-timeout-minutes" value="1"/>
<param name="allocation-retry" value="5"/>
<param name="allocation-retry-wait-millis" value="200"/>
</feature>
<feature spec="subsystem.datasources.xa-data-source.xa-datasource-properties">
<param name="xa-data-source" value="myds"/>
<feature spec="xa-data-source-property">
<param name="name" value="ServerName"/>
<param name="value" value="${env.DB_HOST:localhost}"/>
</feature>
<feature spec="xa-data-source-property">
<param name="name" value="DatabaseName"/>
<param name="value" value="${env.DB_NAME:app_db}"/>
</feature>
<feature spec="xa-data-source-property">
<param name="name" value="PortNumber"/>
<param name="value" value="${env.DB_PORT:5432}"/>
</feature>
</feature>
</layer-spec>
Even if I replace xa-data-source-property with subsystem.datasources.xa-data-source.xa-data-source-property or subsystem.datasources.xa-data-source.xa-datasource-properties.xa-data-source-property I get the same exception when building the feature pack:
org.jboss.galleon.ProvisioningDescriptionException: Non-nillable parameter xa-datasource-properties of {wildfly-ee@maven(org.jboss.universe:community-universe)}subsystem.datasources.xa-data-source.xa-datasource-properties has not been initialized
The same happens when those properties are nested in the subsystem.datasources.xa-data-source feature.
Any idea how to properly define them?
Thanks!
Mario