[Yanel-dev] redeploying WARs fully automatically
Guillaume Déflache
guillaume.deflache at wyona.com
Wed Apr 14 15:15:25 CEST 2010
Michael Wechner schrieb:
> Guillaume Déflache wrote:
>> Hi!
>>
>> At lunch we discussed what still prevent Yanel webapps to be
>> redeployed fully automatically.
>>
>> A few things we could think of:
>> - WEB-INF/classes/log4j.properties file which ATM use absolute paths
>> for the various log files
>> - WEB-INF/classes/realms.xml which must point to at least one custom
>> realm: ATM we do that using an absolute path
>>
>> We thought we could maybe use the servlet context temporary
>> directory[1] to store the realms.xml file itself or even the path
>> under which it may be found.
One argument in favor of storing the path itself: if you have many
custom realms it may get tedious to reconfigure all of them by
recreating the whole XML file: better keep realms.xml in a safe place!
> Btw, the realms.xml path is already configured within
> local/apache-tomcat-5.5.20/webapps/yanel/WEB-INF/classes/yanel.xml
Yes, and that's why as explained during lunch we might even want to use
that for yanel.xml instead of realms.xml! ;)
> re the working/temp dir I guess you mean with
>
> File dir = (File) getServletContext()
>
> .getAttribute(
> "javax.servlet.context.tempdir");
>
>
> right?
Yes.
>> I am not so sure it's a good idea since it looks like this directory
>> may be deleted without notice: the application may be unable to
>> restart automatically if this happens... :/
>
> if the paths of the realms are wrong within classes/realms.xml then it
> doesn't start either ;-)
Yes, but then the adminstrator can only blame himself for that, whereas
we may not want to trust what the servlet engine and/or the operating
system does with the work directory...
BTW I had a look at what a Cocoon 2.1 application stores there and there
are only cache files, no configuration.
> I think the question is what situations is this directory deleted.
>
> Let me give it a try ...
Good luck! :)
> Cheers
>
> Michi
>
>>
>> Ideas?
>>
>> Cheers,
>> Guillaume
>>
>>
>> [1] defined in the servlet specification since v2.2:
>> http://java.sun.com/developer/technicalArticles/Servlets/servletapi/
>> look for "javax.servlet.context.tempdir"
>> Tomcat configuration:
>> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html look for
>> "workDir" there
>
More information about the Yanel-development
mailing list