code: public void connectionClosed(ConnectionEvent event)
     {
        Object connection = event.getConnectionHandle();
  
        removeConnection(connection);
  
        if (cm.getCachedConnectionManager() != null)
        {
           cm.getCachedConnectionManager().unregisterConnection(cm, this, connection);
        }
  
        if (connectionHandles.isEmpty() && !isEnlisted())
           cm.returnConnectionListener(this, false);
     }
docs: {@inheritDoc}