code: public LocalXAResource createLocalXAResource(ConnectionManager cm,
                                                  String productName, String productVersion,
                                                  String jndiName,
                                                  XAResourceStatistics xastat)
     {
        LocalXAResource result = null;
        if (xastat != null && xastat.isEnabled())
        {
           result = new LocalXAResourceStatImpl(productName, productVersion, jndiName, xastat);
        }
        else
        {
           result = new LocalXAResourceImpl(productName, productVersion, jndiName);
        }
        result.setConnectionManager(cm);
  
        return result;
     }
docs: {@inheritDoc}