Community
Participate
Working Groups
The WebAppProvider should allow a tmp directory to be set for all of the webapps it deploys to use.
I can't see a use of a Temp Directory at all in the WebAppProvider. Hard for me to make it configurable until then.
Joakim, I assume this means to set the root temp directory for contexts that are deployed. WebAppContext has a horrid search pattern for where it will put it's temp directory - which in the end comes down to under the tmp dir system property. So perhaps have it settable on the deployer is not a bad thing.
Joakim, Greg is right. I meant that the WebAppProvider should allow a tmp directory to be set which is set on all of the WebAppContexts that it deploys - otherwise there's no way to change the tmp dir for non-context xml based webapps. Its a very small fix to add in. I'm assigning back to you.
Work completed in r2000 on trunk. The nuances of WebAppProvider managing multiple WebAppContext's, meant that a simple TempDirectory setting wouldn't work with more than 1 war file. And setting the WebAppContext.TEMPDIR javax.servlet Attribute suffers from the same end result. Also, using the new WebAppProvider.setTempDir(File) to set the java.io.tmpdir System Property was deemed too dangerous of a solution (reprocussions and potential for regressions were too high). So a new WebAppContext.BASETEMPDIR attribute was created to work with the WebInfConfiguration.resolveTempDirectory(WebAppContext) to gain benefit of the WebInfConfiguration.getCanonicalNameForWebAppTmpDir(WebAppContext) to generate a unique temp directory for each deployed WAR, while treating the WebAppProvider.setTempDir(File) as a base directory for all of the war deployment temp directories.