Fix configuration of session ID generator on Tomcat 7

See gh-6679
pull/6699/head
Andy Wilkinson 8 years ago
parent 984a6da262
commit dd465b7f79

@ -19,6 +19,7 @@ package org.springframework.boot.context.embedded.tomcat;
import org.apache.catalina.Container;
import org.apache.catalina.Manager;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.session.ManagerBase;
import org.springframework.util.ClassUtils;
import org.springframework.util.ReflectionUtils;
@ -52,8 +53,8 @@ class TomcatEmbeddedContext extends StandardContext {
@Override
public void setManager(Manager manager) {
if (manager != null) {
manager.setSessionIdGenerator(new LazySessionIdGenerator());
if (manager instanceof ManagerBase) {
((ManagerBase) manager).setSessionIdGenerator(new LazySessionIdGenerator());
}
super.setManager(manager);
}

Loading…
Cancel
Save