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

Michael Wechner michael.wechner at wyona.com
Thu Apr 9 15:13:21 CEST 2009


Guillaume Déflache schrieb:
> 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

depends how long it stays commented
>
>
>>> 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>

will try this. I did it differently and then it had a bad influence on 
the rest
> -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!

To be sure I would replace all these "relevant/common" ports: 8080, 
8443, 8005, 8009

> 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>

tried that, but didn't work, but maybe it was the bad influence of 8005 
XSLT code.

Btw, why do we need to check on Engine/Host[@name='localhost'] ? Can the 
default config contain something else than 'localhost'?
>
>
>> 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.

I am nearly there now with Hudson, but not quite yet ...

Thanks for your suggestions from above.

Cheers

Michi



More information about the Yanel-development mailing list