use of org.wildfly.clustering.web.session.SessionManagerFactory in project wildfly by wildfly.
the class HotRodSessionManagerFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
this.cacheConfigurator.build(target).install();
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<SessionManagerFactory<SC, LC, TransactionBatch>> factory = this.cache.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(factory, Function.identity(), this, Consumers.close());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.web.session.SessionManagerFactory in project wildfly by wildfly.
the class InfinispanSessionManagerFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
this.configurationConfigurator.build(target).install();
this.cacheConfigurator.build(target).install();
for (ServiceConfigurator configurator : this.configurators) {
configurator.build(target).install();
}
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<SessionManagerFactory<SC, LC, TransactionBatch>> factory = new CompositeDependency(this.group, this.affinityFactory, this.dispatcherFactory).register(builder).provides(this.getServiceName());
this.cache = builder.requires(this.cacheConfigurator.getServiceName());
Service service = new FunctionalService<>(factory, Function.identity(), this, Consumers.close());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations