docs: void close(boolean removeFromConnection) throws SIConnectionLostException,
                 SIIncorrectCallException, SIResourceException, SIErrorException {
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, "close", Boolean
  
                      .valueOf(removeFromConnection));
          }
  
          if (_applicationLocalTransaction != null) {
  
              try
              {
                _applicationLocalTransaction.rollback();
              }
              catch (SIIncorrectCallException e)
              {
                //NO FFDC code needed
                
                // transaction has already completed, assume abort
                SibTr.debug(TRACE, "Caught a SIIncorrectCallException which means the operation has already been completed: " + e);
              }
  
              if (_connection.getConnectionFactory().isManaged()) {
                  _managedConnection.localTransactionRolledBack();
              }
  
              _applicationLocalTransaction = null;
          }
  
          if (_managedConnection != null) {
              _managedConnection.sessionClosed(this);
          }
  
          if (removeFromConnection) {
              _connection.removeSession(this);
          }
  
          _sessionClosed = true;
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, "close");
          }
  
      }