use of uk.gov.ida.shared.dropwizard.infinispan.util.InfinispanBundle in project verify-hub by alphagov.
the class PolicyApplication method initialize.
@Override
public final void initialize(Bootstrap<PolicyConfiguration> bootstrap) {
// Enable variable substitution with environment variables
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
bootstrap.addBundle(new ServiceStatusBundle());
bootstrap.addBundle(new MonitoringBundle());
bootstrap.addBundle(new LoggingBundle());
bootstrap.addBundle(new IdaJsonProcessingExceptionMapperBundle());
final InfinispanBundle infinispanBundle = new InfinispanBundle();
// the infinispan cache manager needs to be lazy loaded because it is not initialized at this point.
bootstrap.addBundle(infinispanBundle);
guiceBundle = GuiceBundle.defaultBuilder(PolicyConfiguration.class).modules(getPolicyModule(), new EventEmitterModule(), bindInfinispan(infinispanBundle.getInfinispanCacheManagerProvider())).build();
bootstrap.addBundle(guiceBundle);
}
use of uk.gov.ida.shared.dropwizard.infinispan.util.InfinispanBundle in project verify-hub by alphagov.
the class SamlEngineApplication method initialize.
@Override
public final void initialize(Bootstrap<SamlEngineConfiguration> bootstrap) {
// Enable variable substitution with environment variables
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
MDC.clear();
bootstrap.addBundle(new ServiceStatusBundle());
bootstrap.addBundle(new MonitoringBundle());
bootstrap.addBundle(new LoggingBundle());
bootstrap.addBundle(new IdaJsonProcessingExceptionMapperBundle());
final InfinispanBundle infinispanBundle = new InfinispanBundle();
bootstrap.addBundle(infinispanBundle);
guiceBundle = defaultBuilder(SamlEngineConfiguration.class).modules(new SamlEngineModule(), new CryptoModule(), bindInfinispan(infinispanBundle.getInfinispanCacheManagerProvider())).build();
bootstrap.addBundle(guiceBundle);
}
Aggregations