[Yanel-dev] Re: [Yanel-commits] rev 42317 - public/yanel/trunk/tools/apache-tomcat

Guillaume Déflache guillaume.deflache at wyona.com
Thu Apr 9 14:11:20 CEST 2009


Michael Wechner schrieb:
> Guillaume Déflache schrieb:
>> michi at wyona.com schrieb:
>>> Author: michi
>>> Date: 2009-04-09 10:58:31 +0200 (Thu, 09 Apr 2009)
>>> New Revision: 42317
>>>
>>> Modified:
>>>    public/yanel/trunk/tools/apache-tomcat/build.xml
>>> Log:
>>> use replace instead xslt
>>
>> I remember you were reluctant to automate Tomcat ports' patching 
>> because the Host/Engine/whatever layout in server.xml files could be 
>> intricate, and rightly so, but it proved solvable to me while reading 
>> the Tomcat docs.
>> So why dismiss the attempt at trying to solve that?
> 
> I just commented it ;-)

Well, any code that is not exercized regularly is as well as dead to 
me... no parallel with muscles intended! :P


>> I reckon the XSLT file is crying for comments, we can sit together 
>> with you asking and me adding them for example.
>>
>> WDYT?
> 
> I am happy to use the XSLT as long as we can patch *all* ports properly, 
> and tried so, but was having problems at some point.

Which problems?
- shutdown: probably
   <xsl:template match="/Server/@port">
     <xsl:value-of select="$shutdown-port"/>
   </xsl:template>
-AJP: do we need it _now_ for CI? From the configuration docs at 
http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html would we need to 
change other port numbers on this connector? Maybe proxyPort? 
redirectPort? We may as well do that as another step as we do for SSL!
Anyway something along these lines should work (does secure would make 
any sense?!?):
   <xsl:template match="Connector[@protocol = 'AJP/1.3']">
     <xsl:copy>
       <xsl:copy-of select="@*"/>
     <xsl:if test="../Engine[1]//Host[@name = $host]">
       <xsl:attribute name="port">
         <xsl:value-of select="$ajp-port"/>
       </xsl:attribute>
     </xsl:if>
       <xsl:copy-of select="node()"/>
     </xsl:copy>
   </xsl:template>


> So I decided to do a quick fix, because it's important that we can patch 
> all ports, because otherwise we cannot use the script within a 
> multi-project environment. So "function over form" (instead the other 
> way around ;-)

Sure.


More information about the Yanel-development mailing list