4 Replies Latest reply on Sep 10, 2012 5:40 AM by pjrhalicky

    setting reconnect-attempts using Core API

    pjrhalicky

      In my project I am using the HornetQ core API and I need to set the reconnect-attempts property of ClientSessionFactory. This is what I found in the documentation:

       

      If you're using the core API and instantiating the ClientSessionFactory instance directly you can also specify the parameters using the appropriate setter methods on the ClientSessionFactory immediately after creating it.

       

      I can't find the setter methods on the ClientSessionFactory object - is the documentation out of date, or am I looking at the wrong place?

       

              ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(), map));

              ClientSessionFactory sessionFactory = serverLocator.createSessionFactory();

              session = sessionFactory.createSession(false, false);