Source:
public void init() { StartupStrategy startupStrategy = StartupStrategyProvider.get().getStrategy(); logger.info("Selected startup strategy {}", startupStrategy); for (KieServerStateRepository repo : serverStateRepos) { if (repo.getClass().getSimpleName().equals(startupStrategy.getRepositoryType())) { this.repository = repo; break; } } logger.info("Configured '{}' server state repository", this.repository.getClass().getSimpleName()); this.context = new KieServerRegistryImpl(); this.context.registerIdentityProvider(new JACCIdentityProvider()); this.context.registerStateRepository(repository); ContainerLocatorProvider.get(); ContainerManager containerManager = getContainerManager(); KieServerState currentState = repository.load(KieServerEnvironment.getServerId()); List<KieServerExtension> extensions = sortKnownExtensions(); for (KieServerExtension extension : extensions) { logger.info("{} processing", extension); if (!extension.isActive()) { continue; } try { extension.init(this, this.context); this.context.registerServerExtension(extension); if (extension.isInitialized()) { logger.info("{} has been successfully registered as server extension", extension); } else { logger.warn("{} has not been registered as server extension", extension); } } catch (Exception e) { serverMessages.add(new Message(Severity.ERROR, "Error when initializing server extension of type " + extension + " due to " + e.getMessage())); logger.error("Error when initializing server extension of type {}", extension, e); } } policyManager = new PolicyManager(); policyManager.start(this, context); kieServerActive.set(true); eventSupport.fireBeforeServerStarted(this); startTimestamp = System.currentTimeMillis(); startupStrategy.startup(this, containerManager, currentState, kieServerActive); eventSupport.fireAfterServerStarted(this); }

Target:
public void init() { StartupStrategy startupStrategy = StartupStrategyProvider.get().getStrategy(); logger.info("Selected startup strategy {}", startupStrategy); for (KieServerStateRepository repo : serverStateRepos) { if (repo.getClass().getSimpleName().equals(startupStrategy.getRepositoryType())) { this.repository = repo; break; } } logger.info("Configured '{}' server state repository", this.repository.getClass().getSimpleName()); this.context = new KieServerRegistryImpl(); this.context.registerIdentityProvider(new JACCIdentityProvider()); this.context.registerStateRepository(repository); ContainerLocatorProvider.get(); ContainerManager containerManager = getContainerManager(); KieServerState currentState = repository.load(KieServerEnvironment.getServerId()); List<KieServerExtension> extensions = sortKnownExtensions(); for (KieServerExtension extension : extensions) { logger.trace("{} processing", extension); if (!extension.isActive()) { continue; } try { extension.init(this, this.context); this.context.registerServerExtension(extension); if (extension.isInitialized()) { logger.info("{} has been successfully registered as server extension", extension); } else { logger.warn("{} has not been registered as server extension", extension); } } catch (Exception e) { serverMessages.add(new Message(Severity.ERROR, "Error when initializing server extension of type " + extension + " due to " + e.getMessage())); logger.error("Error when initializing server extension of type {}", extension, e); } } policyManager = new PolicyManager(); policyManager.start(this, context); kieServerActive.set(true); eventSupport.fireBeforeServerStarted(this); startTimestamp = System.currentTimeMillis(); startupStrategy.startup(this, containerManager, currentState, kieServerActive); eventSupport.fireAfterServerStarted(this); }