[Yanel-dev] redeploying WARs fully automatically

Michael Wechner michael.wechner at wyona.com
Fri Apr 16 11:01:13 CEST 2010


Michael Wechner wrote:
> Michael Wechner wrote:
>>>
>>> - 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.
>>
>> Btw, the realms.xml path is already configured within 
>> local/apache-tomcat-5.5.20/webapps/yanel/WEB-INF/classes/yanel.xml
>>
>> re the working/temp dir I guess you mean with
>>
>> File dir = (File) getServletContext()
>>
>>     .getAttribute(
>>     "javax.servlet.context.tempdir");
>>
>>
>> right?
>
> The following java classes would have to be enhanced:
>
> src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java
> src/core/java/org/wyona/yanel/core/Yanel.java#init()
> src/core/java/org/wyona/yanel/core/map/RealmManager.java
>
> whereas I have done some preparations in order to make this work.

btw, there might be some alternative solutions, see

http://discuss.joelonsoftware.com/default.asp?joel.3.145249.13
http://www.brunningonline.net/simon/blog/archives/001235.html

It seems to me these are the possibilities:

1) Look within webapp classspath (which it does now)
2) Look within temporary directory (the problem with this is that it 
might get deleted)
3) Use preference API to find the file somewhere within the user 
directory under which the webapp-server (e.g. Tomcat) is running
4) Use environment variable which is configured under the user the 
webapp-server (e.g. Tomcat) is running or configure it during startup of 
the webapp-server (e.g. Tomcat/bin/catalina.sh)

WDYT?

Cheers

Michi
>
> Cheers
>
> Michi



More information about the Yanel-development mailing list