1 Reply Latest reply on Oct 18, 2011 9:56 PM by Randall Hauch

    Restarting engine in 2.6.0.Beta2 ?

    lisak Newbie



      I upgraded to 2.6.0.Beta2 version and my tests are failing. I'm using inMemory repository and I was shutting down and starting JcrEngine a lot when testing, but know if I do that I get exception in AbstractServiceAdministrator.start( ) when the state is terminated. What is it about ? Why it is not possible to restart it ?  Cheers, Jakub

        • 1. Re: Restarting engine in 2.6.0.Beta2 ?
          Randall Hauch Master

          The JcrEngine.start() method can only be called once. I understand that it's not ideal, but it's the current limitation of the JcrEngine (as documented in the JavaDoc for the method). I won't go into the reasons why, but changing it would be a fairly significant change.


          You can always create a new engine from the configuration, and start that. In fact, by creating a new engine you're really not losing much at all with respect to performance or startup time. In fact, there are some production benefits to this anyway (e.g., the ability to start a new engine completely before shutting down the old engine).


          We do have plans to change this in 3.0, and make this much more flexible and easy to use. For example, even with the engine running, it should be possible to add, remove, start, stop and alter the configuration of each repository.


          I hope this helps!

          1 of 1 people found this helpful