/** * Performs local runtime recovery operations, such as controller recovery and transaction recovery. * * @param eventService the event service * @throws InitializationException if an error performing recovery is encountered */ private void recover(EventService eventService) throws InitializationException { Domain domain = runtime.getComponent(Domain.class, APPLICATION_DOMAIN_URI); if (domain == null) { state = RuntimeState.ERROR; String name = APPLICATION_DOMAIN_URI.toString(); throw new InitializationException("Domain not found: " + name); } // install user contributions - they will be deployed when the domain recovers List<ContributionSource> contributions = configuration.getUserContributions(); if (!contributions.isEmpty()) { installContributions(contributions); } eventService.publish(new RuntimeRecover()); }