문제

I have to disable session serialization in Tomcat 7 in maven plugin. What is best approach to do it?

  1. Do it expiring sessions on shutdown setting it in server.xml context parameter and providing parameter in maven plugin to custom <serverXml/> file?

    <Manager pathname=""> <expireSessionsOnShutdown>true</expireSessionsOnShutdown> <saveOnRestart>false</saveOnRestart> </Manager>

  2. Do the same as above but defining that in context.xml file and providing path to that file in <contextFile/> parameter?

    <Manager pathname=""> <expireSessionsOnShutdown>true</expireSessionsOnShutdown> <saveOnRestart>false</saveOnRestart> </Manager>

What is the better approach to do it?

도움이 되었습니까?

해결책

Your second option would be the best approach according to Tomcat Documentations

It is NOT recommended to place elements directly in the server.xml file. This is because it makes modifying the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.

Informational link:

Apache Tomcat Configuration Reference (6.0.41) - The Context Container

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top