code: public XAResourceWrapper createConnectableXAResourceWrapper(XAResource xares,
                                                                 boolean pad, Boolean override, 
                                                                 String productName, String productVersion,
                                                                 String jndiName,
                                                                 ConnectableResource cr,
                                                                 XAResourceStatistics xastat)
     {
        if (cr instanceof org.ironjacamar.core.spi.transaction.FirstResource ||
            cr instanceof org.jboss.tm.FirstResource)
        {
           if (xastat != null && xastat.isEnabled())
           {
              return new FirstResourceConnectableXAResourceWrapperStatImpl(xares, pad, override,
                                                                           productName, productVersion, jndiName,
                                                                           cr, xastat);
           }
           else
           {
              return new FirstResourceConnectableXAResourceWrapperImpl(xares, pad, override,
                                                                       productName, productVersion, jndiName,
                                                                       cr);
           }
        }
        else
        {
           if (xastat != null && xastat.isEnabled())
           {
              return new ConnectableXAResourceWrapperStatImpl(xares, pad, override,
                                                              productName, productVersion, jndiName,
                                                              cr, xastat);
           }
           else
           {
              return new ConnectableXAResourceWrapperImpl(xares, pad, override,
                                                          productName, productVersion, jndiName,
                                                          cr);
           }
        }
     }
docs: {@inheritDoc}