Hello,
Recently storeConfig has been fixed thanks to
https://github.com/apache/tomcat/commit/010fdb7e458d9d8755e2b67203ac4757d78c2f64
It is very interesting, because it allows to persist across restart
configurations made to tomcat itself and deployed webapp through JMX.
In my case after saving a configuration to my webapp I lost my
cacheMaxSize customization.
I had in my context xml file this:
<Resources cachingAllowed="true" cacheMaxSize="102400" />
and after calling storeConfig It has been changed to this
<Resources className="org.apache.catalina.webresources.StandardRoot"> so
cacheMaxSize has been reverted to default value.
I understand it is because in
/org/apache/catalina/storeconfig/server-registry.xml /
/
/<Description//
// tag="Resources"//
// standard="false"//
// default="false"//
// children="true"//
// tagClass="org.apache.catalina.WebResourceRoot"//
//storeFactoryClass="org.apache.catalina.storeconfig.WebResourceRootSF">//
//<TransientAttribute>allowLinking</TransientAttribute>//
//<TransientAttribute>cachingAllowed</TransientAttribute>//
//<TransientAttribute>cacheTtl</TransientAttribute>//
//<TransientAttribute>cacheMaxSize</TransientAttribute>//
//<TransientAttribute>cacheObjectMaxSize</TransientAttribute>//
//<TransientAttribute>cached</TransientAttribute>//
//<TransientAttribute>caseSensitive</TransientAttribute>//
//<TransientAttribute>domain</TransientAttribute>//
// </Description>/
cacheMaxSize is declared as Transient so not saved in updated context
xml file.
Is it something expected ? or can it be considered as a bug ?
Thanks,
Arnaud