DOCUMENT ME!

@param connection DOCUMENT ME!
491700
protected void commitLocalConnection(Connection connection) {
    try {
      if (connection != null ) {
        connection.commit();
      }
    } catch (SQLException e) {
      if (logger.isTraceEnabled()) {
        logger.trace(e.getMessage());
      }
    }
  }
789096
void localTransactionStarted(final SibRaConnection connection) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "localTransactionStarted", connection);
        }

        final ConnectionEvent event = new ConnectionEvent(this,
                ConnectionEvent.LOCAL_TRANSACTION_STARTED);
        event.setConnectionHandle(connection);

        for (Iterator iterator = _eventListeners.iterator(); iterator.hasNext();) {

            final ConnectionEventListener listener = (ConnectionEventListener) iterator
                    .next();
            listener.localTransactionStarted(event);

        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "localTransactionStarted");
        }
    }
1289481
public static String getClientId(Connection connection) {
        String clientId = null;
        
        try {
            clientId = connection == null ? null : connection.getClientID();
        } catch (JMSException e) {}
        
        return clientId;
    }
802105
synchronized void messagingEngineTerminated(
            final SibRaMessagingEngineConnection connection) {

        final String methodName = "messagingEngineTerminated";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, connection);
        }

        if (connection.equals(_remoteConnection)) {

            /*
             * We have lost our remote connection, output a warning to the admin
             * console, close the connection and schedule an attempt to create a
             * new one
             */

            SibTr.warning(TRACE, "ME_TERMINATED_CWSIV0780", new Object[] {
                    connection.getConnection().getMeName(),
                    _endpointConfiguration.getBusName(), this });

            _remoteConnection.close();
            _remoteConnection = null;
            scheduleCreateRemoteListener();

        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
1023065
protected void writeConnectionIdEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) {
        sb.append("Connection:");
        sb.append(execInfo.getConnectionId());
        sb.append(", ");
    }
1362289
public void addConnection(RedisURI redisURI, StatefulRedisConnection<String, String> connection) {

        if (this.closed) { // fastpath
            connection.closeAsync();
            return;
        }

        synchronized (this.connections) {

            if (this.closed) {
                connection.closeAsync();
                return;
            }

            this.connections.put(redisURI, connection);
        }
    }
388074
public void register(K key, T connection) {
        connections.put(key, new Sync<>(key, connection));
    }
1047416
public void setConnection(Connection connection, boolean csv) {
		this.connection = connection;
		this.csv = csv;
        try {
            dialect = DialectUtil.getDialect(connection);
        } catch (Exception e) {
            e.printStackTrace();
        }
        if  (chart != null) {
            if (chart.getReport().getQuery() != null) {
                chart.getReport().getQuery().setDialect(dialect);
            }           
        }
    }
880768
ServerSessionManager registerConnection(String client, Connection connection) {
    ServerSessionContext session = clients.get(client);
    if (session != null) {
      session.setConnection(connection);
    }
    connections.put(client, connection);
    return this;
  }
1314400
private void setupConnection(final Connection connection) throws ConnectionSetupException
   {
      try {
         if (networkTimeout == UNINITIALIZED) {
            networkTimeout = getAndSetNetworkTimeout(connection, validationTimeout);
         }
         else {
            setNetworkTimeout(connection, validationTimeout);
         }

         if (connection.isReadOnly() != isReadOnly) {
            connection.setReadOnly(isReadOnly);
         }

         if (connection.getAutoCommit() != isAutoCommit) {
            connection.setAutoCommit(isAutoCommit);
         }

         checkDriverSupport(connection);

         if (transactionIsolation != defaultTransactionIsolation) {
            connection.setTransactionIsolation(transactionIsolation);
         }

         if (catalog != null) {
            connection.setCatalog(catalog);
         }

         if (schema != null) {
            connection.setSchema(schema);
         }

         executeSql(connection, config.getConnectionInitSql(), true);

         setNetworkTimeout(connection, networkTimeout);
      }
      catch (SQLException e) {
         throw new ConnectionSetupException(e);
      }
   }
234965
def on_connect(self, connection):
        
        self._sock = connection._sock
        self._buffer = SocketBuffer(self._sock, self.socket_read_size)        
        if connection.decode_responses:
            self.encoding = connection.encoding
1071751
void messagingEngineTerminated(
            final SibRaMessagingEngineConnection connection) {

        final String methodName = "messagingEngineTerminated";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, connection);
        }

        /*
         * Close the connection - any future work will attempt to create a new
         * connection
         */

        closeConnection(connection.getConnection().getMeUuid(), true);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
640202
public function setConnection(Connection $connection)
    {
        if (! in_array($connection, $this->_connections, true)) {
            $this->_connections[] = $connection;
        }
    }
825482
protected void removeDestinationListener(SICoreConnection connection)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "removeDestinationListener", new Object[] { connection });

        synchronized (this)
        {
            for (int i = 0; i < destinationListeners.size(); i++)
            {
                DestinationListenerDataObject listenerDataObject = destinationListeners.get(i);
                if (connection.equals(listenerDataObject.getConnection()))
                {
                    destinationListeners.remove(listenerDataObject);
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "removeDestinationListener");
    }
525473
protected void closeConnection(ThriftConnectionHandle<T> connection) {
		if (connection != null) {
			try {
				connection.internalClose();
			} catch (Throwable t) {
				logger.error("Destroy connection exception", t);
			} finally {
				this.thriftConnectionPool.postDestroyConnection(connection);
			}
		}
	}
1255656
public void copy(ConnectionContext source) {
        this.connection = source.connection;
        this.session = source.session;
        this.destination = source.destination;
    }
574274
protected void setSICoreConnection(SICoreConnection connection)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setSICoreConnection", connection);

      //Retrieve Client Conversation State if necessary
      validateConversationState();
      cConState.setSICoreConnection(connection);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setSICoreConnection");
   }