docs: SITransaction mapTransaction(final SITransaction transactionParameter)
                      throws SIIncorrectCallException, SIResourceException {
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, "mapTransaction", transactionParameter);
          }
  
          final SITransaction transaction;
  
          if (transactionParameter == null) {
  
              // Not valid if we have an active local transaction
              if (_applicationLocalTransaction != null) {
  
                  final SIIncorrectCallException exception = new SIIncorrectCallException(
                                  NLS.getString("ACTIVE_LOCAL_TRAN_CWSIV0158"));
                  if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                      SibTr.exception(this, TRACE, exception);
                  }
                  throw exception;
  
              }
  
              // Use the current container transaction, if any
              transaction = getContainerTransaction();
  
          } else if (transactionParameter instanceof SIUncoordinatedTransaction) {
  
              // Must be the current local transaction
              if (transactionParameter != _applicationLocalTransaction) {
  
                  final SIIncorrectCallException exception = new SIIncorrectCallException(
                                  NLS.getString("INCORRECT_LOCAL_TRAN_CWSIV0159"));
                  if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                      SibTr.exception(this, TRACE, exception);
                  }
                  throw exception;
  
              }
  
              // Get the real core SPI transaction
              transaction = _applicationLocalTransaction
                              .getUncoordinatedTransaction();
  
          } else if (transactionParameter instanceof SIXAResource) {
  
              // SIXAResource not permitted (and they didn't get it from here in
              // the first place!)
              final SIIncorrectCallException exception = new SIIncorrectCallException(
                              NLS.getString("INVALID_XARESOURCE_CWSIV0160"));
              if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                  SibTr.exception(this, TRACE, exception);
              }
              throw exception;
  
          } else if (transactionParameter instanceof SibRaAutoCommitTransaction) {
  
              // Pass null to get auto-commit behaviour
              transaction = null;
  
          } else {
  
              // They've found some other sort of SITransaction that we don't
              // know about!
              final SIIncorrectCallException exception = new SIIncorrectCallException(
                              NLS.getFormattedMessage("UNRECOGNISED_TRAN_CWSIV0161",
                                                      new Object[] { transactionParameter }, null));
              if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                  SibTr.exception(this, TRACE, exception);
              }
              throw exception;
  
          }
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, "mapTransaction", transaction);
          }
          return transaction;
  
      }