code: @Override
      final public XAResource getXAResource() throws ResourceException {
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, "getXAResource");
          }
  
          if (_coreConnection == null) {
  
              throw new ResourceAdapterInternalException(NLS.getFormattedMessage(
                                                                                 "EXCEPTION_RECEIVED_CWSJR1106",
                                                                                 new Object[] { "getXAResource" }, null));
  
          }
  
          if (_xaResource == null) {
  
              try {
                  _xaResource = _coreConnection.getSIXAResource();
              } catch (final SIException exception) {
  
                  FFDCFilter.processException(exception, CLASS_NAME
                                                         + "getXAResource", "1:649:1.91", this);
  
                  throw new ResourceException(NLS.getFormattedMessage(
                                                                      "EXCEPTION_RECEIVED_CWSJR1111", new Object[] {
                                                                                                                    exception, "getXAResource" }, null), exception);
  
              } catch (final SIErrorException exception) {
  
                  FFDCFilter.processException(exception, CLASS_NAME
                                                         + "getXAResource", "1:658:1.91", this);
  
                  throw new ResourceException(NLS.getFormattedMessage(
                                                                      "EXCEPTION_RECEIVED_CWSJR1111", new Object[] {
                                                                                                                    exception, "getXAResource" }, null), exception);
  
              }
  
          }
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, "getXAResource", _xaResource);
          }
          return _xaResource;
  
      }
docs: Returns an <code>XAResource</code> for this managed connection. When
  running in WebSphere this is an inner class that implements the
  <code>RecoverableXAResource</code> interface and delegates to an
  <code>SIXAResource</code> from the core connection. When running
  outside of WebSphere the <code>SIXAResource</code> is returned
  directly.
  
  @return the <code>XAResource</code>
  @throws NotSupportedException
  if running outside of WebSphere and a messaging engine has
  not been identified on the connection factory
  @throws ResourceException
  generic exception