Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1330

XA Stats not updated when the provided XAResource already implements XAResourceWrapper

    Details

      Description

      Use case: provide XA statistics to WildFly's messaging-activemq pooled-connection-factory leveraging org.jboss.as.connector.dynamicresource.StatisticsResourceDefinition.

      I have a dev branch[1] for this and pool statistics (from org.jboss.jca.core.api.connectionmanager.pool.PoolStatistics) are updated as expected.
      However xa stats (from org.jboss.jca.core.spi.transaction.XAResourceStatistics) are not updated.

      The pooled-connection-factory uses a XAPool and its XAResource implementation extends org.jboss.jca.core.spi.transaction.xa.XAResourceWrapper[2].
      Doing some debugging, the code at [3] does not look correct. The provided xar extends XAResourceWrapper, so txIntegration.createXAResourceWrapper() is not called and the xar is not wrapped by a XAResourceWrapperStatImpl that is the code responsible to update XA stats.

      [1] https://github.com/jmesnil/wildfly/tree/WFLY-3636_pooled-connection-factory-stats
      [2] https://github.com/rh-messaging/artemis-wildfly-integration/blob/master/src/main/java/org/jboss/activemq/artemis/wildfly/integration/WildFlyActiveMQXAResourceWrapper.java
      [3] https://github.com/ironjacamar/ironjacamar/blob/1.3/core/src/main/java/org/jboss/jca/core/connectionmanager/tx/TxConnectionManagerImpl.java#L714

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  maeste Stefano Maestri
                  Reporter:
                  jmesnil Jeff Mesnil
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: