[wildfly-dev] Small Defect in cli xa-data-source command

Marrrrck mmmzzz at gmail.com
Mon Jan 27 10:01:14 EST 2014


Hello everyone,

I think I found a minor defect in the jboss-cli /xa-data-source operation
in Widlfly 8. Can anyone confirm this or correct me if I'm wrong?

Currently the jboss-cli doesn't let you set the jta true/false property on
an XA data source. You can set this property on a regular data source, but
not an XA one. Is this intentional or a defect?

If it is a defect, I think the problem might be in this file:

https://github.com/wildfly/wildfly/blob/master/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/Constants.java

You can see on line 419 that DATASOURCE_ATTRIBUTE includes the JTA
attribute definition:

static final SimpleAttributeDefinition[] DATASOURCE_ATTRIBUTE = new
SimpleAttributeDefinition[]{CONNECTION_URL,
>             DRIVER_CLASS, Constants.DATASOURCE_CLASS, JNDI_NAME,
>             DATASOURCE_DRIVER,
>             NEW_CONNECTION_SQL, URL_DELIMITER,
>             URL_SELECTOR_STRATEGY_CLASS_NAME, USE_JAVA_CONTEXT,
>             *JTA*, org.jboss.as.connector.subsystems.common.pool.Constants.MAX_POOL_SIZE,


But on line 492, the XA_DATASOURCE_ATTRIBUTE doesn't have JTA

    static final SimpleAttributeDefinition[] XA_DATASOURCE_ATTRIBUTE =
new SimpleAttributeDefinition[]{
>             Constants.XA_DATASOURCE_CLASS, JNDI_NAME, DATASOURCE_DRIVER,
>             NEW_CONNECTION_SQL, URL_DELIMITER,
>             URL_SELECTOR_STRATEGY_CLASS_NAME, USE_JAVA_CONTEXT,
>             org.jboss.as.connector.subsystems.common.pool.Constants.MAX_POOL_SIZE,


Would just adding "JTA," after USE_JAVA_CONTEXT on line 492 fix this, or is
there more that needs to be done? I'm happy to submit a pull request to
fix, but it is such a minor change that it might be easier for someone
already working in the code to do it.

Thanks for your help and my apologies if this is already been reported or
previously discussed.

Marc Zbyszynski
Verifi LLC
http://verificoncrete.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20140127/bedee9b1/attachment-0001.html 


More information about the wildfly-dev mailing list