code: @Override
      public void destroyXAResource(XAResource xa) throws DestroyXAResourceException {
  
          final boolean trace = TraceComponent.isAnyTracingEnabled();
          if (trace && tc.isEntryEnabled())
              Tr.entry(this, tc, "destroyXAResource", xa);
  
          ManagedConnection mc = ((WSXAResource) xa).getManagedConnection();
          try {
              mc.destroy();
          } catch (ResourceException x) {
              if (trace && tc.isEntryEnabled())
                  Tr.exit(tc, "destroyXAResource", x);
              throw new DestroyXAResourceException(x);
          }
  
          if (trace && tc.isEntryEnabled())
              Tr.exit(this, tc, "destroyXAResource");
      }
docs: Destroy the XAResource object. Internally, the XAResource provider
  should cleanup resources used by XAResource object. For example, JTA
  should close XAConnection.
  
  @param xa resource to destroy.
  @throws DestroyXAResourceException if an error occurs.