-
Bug
-
Resolution: Done
-
Minor
-
JBossAS-4.0.2 Final
-
None
JBoss 'TomcatDeployer' uses the catalina 'StandardManager' as the session
manager for a not distributed web application, even if an other session
manager (eg. PersistentManager) has been defined.
The 'TomcatDeployer.performDeployInternal()' correctly creates the in the
context.xml defined session Manager at the beginning of the method. At the
end of the method it gets overwritten by the 'StandardManager'.
Therefore any in the context.xml defined Manager has no effect.
Is there a reason why the session manager gets overwritten by the
'StandardManager' and if, how could we use the persistent file store?
configuration:
file: xxx.war/WEB-INF/context.xml:
<Context path="/xxx" docBase="./deploy/clusteredservlet.war">
<Manager className="org.apache.catalina.session.PersistentManager">
<Store className="org.apache.catalina.session.FileStore" debug="5"
checkInterval="5" directory="./mySessions"/>
</Manager>
</Context>
file: xxx.war/WEB-INF/web.xml:
<web-app id="WebApp_ID" version="2.4">
<!-distributable/->
....
quickfix:
original:
class org.jboss.web.tomcat.tc5.TomcatDeployer (Line 320-330)
method performDeployInternal(...)
...
if(metaData.getDistributable())
else
{
StandardManager manager = new StandardManager();
manager.setPathname("");
server.setAttribute(objectName, new Attribute("manager", manager));
}
new:
class org.jboss.web.tomcat.tc5.TomcatDeployer (Line 320-330)
method performDeployInternal(...)
...
if(metaData.getDistributable()) {...}
else {
if(server.getAttribute(objectName, "manager") == null) {
StandardManager manager = new StandardManager();
manager.setPathname("");
server.setAttribute(objectName, new Attribute("manager",
manager));
}
}
(on behalf of thorsten mielke)