Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top