5 Replies Latest reply on Mar 31, 2014 7:42 AM by Efthymis Sarbanis

    embedded server without persistence creates a server.lock file

    Jeff Mesnil Master

      Hi guys,

       

      I am finally doing some stuff with HornetQ in my new job. Get ready for some dumb questions

       

      When I create an embedded HornetQ server with no persistence & INVM acceptor, it still creates the server.lock file in the journal dir.

       

      fwiw this is the setup code:

       

              Configuration configuration = new ConfigurationImpl();
              configuration.setPersistenceEnabled(false);
              configuration.setSecurityEnabled(false);
              configuration.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
      
      
              HornetQServer server = HornetQServers.newHornetQServer(configuration);
              server.start()
      

       

      I am wondering if this is a bug or not? I was expecting to have no file created at all including the lock file when I disable the persistence.

      wdyt? What would happen if I was creating a 2nd embedded server (as unlikely an use case it is)? Would it wait to acquire the lock?

       

      cheers,

      jeff