Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TomcatEmbeddedServletContainerFactory should not create a StandardManager object unconditionally #4543

Closed
zeodtr opened this issue Nov 19, 2015 · 1 comment
Milestone

Comments

@zeodtr
Copy link

zeodtr commented Nov 19, 2015

In TomcatEmbeddedServletContainerFactory.configureSession(), a StandardManager object is created if this.manager is null. But it is not needed if isPersistSession() is false.

This superfluous creation has somewhat bad effect when another manager is needed for the context. For example, when configuring tomcat session clustering, a DeltaManager is needed instead of StandardManager. an application programmer can replace the manager by adding a TomcatContextCustomizer that's called later, but it was not needed on previous versions of Spring Boot (since the manager would be created automatically later) thus breaking compatibility.

On the first commit that's related this issue, it had been properly done - that is, a StandardManager is created only when isPersistSession() is true. But on a commit later, it was changed to current form. I think the first commit's code is better.

@philwebb philwebb added this to the 1.3.1 milestone Nov 24, 2015
@philwebb
Copy link
Member

We need to ensure that StandardManager is set so that the disablePersistSession code works. Perhaps we can shift this to a later point.

@philwebb philwebb modified the milestones: 1.3.2, 1.3.1 Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants