public io.undertow.server.session.SessionManager createSessionManager(Deployment deployment) {
SessionContext context = new UndertowSessionContext(deployment);
IdentifierFactory<String> factory = new IdentifierFactoryAdapter(new SecureRandomSessionIdGenerator());
final SessionManager<LocalSessionContext, Batch> manager = this.factory.createSessionManager(context, factory, new LocalSessionContextFactory());
DeploymentInfo info = deployment.getDeploymentInfo();
ThreadSetupAction action = new ThreadSetupAction() {
@Override
public Handle setup(HttpServerExchange exchange) {
return new Handle() {
@Override
public void tearDown() {