code: public void registerConnection(org.ironjacamar.core.api.connectionmanager.ConnectionManager cm,
                                    org.ironjacamar.core.api.connectionmanager.listener.ConnectionListener cl,
                                    Object connection)
     {
        if (debug)
        {
           synchronized (connectionStackTraces)
           {
              connectionStackTraces.put(connection, new Throwable("STACKTRACE"));
           }
        }
  
        Context context = currentContext();
  
        log.tracef("registering connection from connection manager: %s, connection : %s, context: %s",
                   cm, connection, context);
  
        if (context != null)
        {
           // 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 (Tracer.isEnabled())
           {
              Tracer.registerCCMConnection(iCl.getManagedConnectionPool().getPool()
                                           .getConfiguration().getId(),
                                           iCl.getManagedConnectionPool(),
                                           iCl, connection, context.toString());
           }
  
           context.registerConnection(iCm, iCl, connection);
        }
     }
docs: {@inheritDoc}