code: public void unregisterConnection(org.ironjacamar.core.api.connectionmanager.ConnectionManager cm,
                                      org.ironjacamar.core.api.connectionmanager.listener.ConnectionListener cl,
                                      Object connection)
     {
        if (debug)
        {
           CloseConnectionSynchronization ccs = getCloseConnectionSynchronization(false);
           if (ccs != null)
           {
              ccs.remove(connection);
           }
  
           synchronized (connectionStackTraces)
           {
              connectionStackTraces.remove(connection);
           }
        }
  
        Context context = currentContext();
  
        log.tracef("unregistering connection from connection manager: %s, connection: %s, context: %s",
                   cm, connection, context);
  
        if (context == null)
           return;
  
        // Use internal API
        org.ironjacamar.core.connectionmanager.ConnectionManager iCm =
           (org.ironjacamar.core.connectionmanager.ConnectionManager)cm;
  
        org.ironjacamar.core.connectionmanager.listener.ConnectionListener iCl =
           (org.ironjacamar.core.connectionmanager.listener.ConnectionListener)cl;
  
        if (context.unregisterConnection(iCm, iCl, connection))
        {
           if (Tracer.isEnabled())
           {
              Tracer.unregisterCCMConnection(iCl.getManagedConnectionPool().getPool()
                                             .getConfiguration().getId(),
                                             iCl.getManagedConnectionPool(),
                                             iCl, connection, context.toString());
           }
        }
        else
        {
           if (Tracer.isEnabled())
           {
              Tracer.unknownCCMConnection(iCl.getManagedConnectionPool().getPool()
                                          .getConfiguration().getId(),
                                          iCl.getManagedConnectionPool(),
                                          iCl, connection, context.toString());
           }
  
           if (!ignoreConnections)
              throw new IllegalStateException(); //bundle.tryingToReturnUnknownConnection(connection.toString()));
        }
     }
docs: {@inheritDoc}