0 Replies Latest reply on Feb 6, 2013 7:02 PM by 879423

    Is registering a custom ConnectionListener possible?


      Does anyone know if it's possible to register a ConnectionListener with a Proxy service without resorting to the following hideous hackery?

      Service proxyService = factory.ensureService(proxyServiceName);
      // get the ConnectionManager used by the Proxy Service
      Service realService = (Service) ClassHelper.invoke(proxyService, "getService", ClassHelper.VOID);
      Class clz = Class.forName("com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ProxyService");
      Method method = clz.getDeclaredMethod("getAcceptor", (Class[]) null);
      Peer manager = (Peer) method.invoke(realService, (Object[]) null);
      // register a ConnectionListener with the ConnectionManager

      To be more precise, I want to be able to do some processing on the UUID's and that's only possible (as far as I can tell) with ConnectionEvent i.e. the getConnection().getId() method.