code: public void associateConnection(final Object connection)
              throws ResourceAdapterInternalException {
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, "associateConnection", connection);
          }
  
          if (connection instanceof SibRaConnection) {
  
              final SibRaConnection sibRaConnection = (SibRaConnection) connection;
  
              // Dissociate it from its old managed connection
              final SibRaManagedConnection oldManagedConnection = sibRaConnection
                      .getManagedConnection();
              if (oldManagedConnection != null) {
                  oldManagedConnection._connections.remove(connection);
              }
  
              // Associate it with this managed connection
              sibRaConnection.setManagedConnection(this);
              _connections.add(sibRaConnection);
  
          } else {
  
              final ResourceAdapterInternalException exception = new ResourceAdapterInternalException(
                      NLS.getFormattedMessage(
                              "UNRECOGNISED_CONNECTION_CWSIV0403", new Object[] {
                                      connection, SibRaConnection.class }, null));
              if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                  SibTr.exception(this, TRACE, exception);
              }
              throw exception;
  
          }
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, "associateConnection");
          }
  
      }
docs: Associates an existing connection handle with this managed connection.
  The connection handle may still be associated with another managed
  connection or may be dissociated.
  
  @param connection
  the connection handle
  @throws ResourceAdapterInternalException
  if the connection does not belong to this resource adapter