/** * Initialization code for the repository. Should go into separate class, but being here should be OK for a * prototype * <p> * Called from both the constructor for JUnit and the servlet-based initialization * <p> * Pre-Condition: Environment is loaded */ private void doRepositoryInitialization() throws Exception { RepositoryFactory.reconfigure(); if (RepositoryFactory.getRepository() instanceof GitBasedRepository) { GitWebSocket socket = new GitWebSocket(); ((GitBasedRepository) RepositoryFactory.getRepository()).registerForEvents(socket); } }