-
1. Re: server bindings
gozilla Dec 21, 2004 1:21 PM (in response to adrian.brock)Adrian,
Using the XSLTFileDelegate works for me, at least in 3.2.5
This is my extract of server-bindings for tomcat bindings<!-- jbossweb-tomcat50.sar --> <service-config name="jboss.web:service=WebServer" delegateClass="org.jboss.services.binding.XSLTFileDelegate"> <delegate-config> <xslt-config configName="ConfigFile"><![CDATA[ <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'> <xsl:import href="../server/tomcat-base-bindings.xsl" /> <xsl:output method="xml" /> <xsl:param name="port"/> <xsl:param name="jvmRoute"/> <xsl:variable name="portAJP" select="$port - 71"/> <xsl:variable name="portHttps" select="$port + 8443-8080"/> </xsl:stylesheet> ]]></xslt-config> <xslt-param name="jvmRoute">LB1</xslt-param> </delegate-config> <binding port="8080"/> </service-config> </server>
And Here is the imported stylesheet:<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'> <xsl:output method="xml" /> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match = "Engine[@name='MainEngine']"> <Engine> <xsl:attribute name="jvmRoute"><xsl:value-of select="$jvmRoute" /></xsl:attribute> <xsl:apply-templates select="@*|node()"/> </Engine> </xsl:template> <xsl:template match = "Connector"> <Connector> <xsl:for-each select="@*"> <xsl:choose> <!-- fdu, turn dns lookups off --> <xsl:when test="name() = 'enableLookups'"> <xsl:attribute name="enableLookups">false</xsl:attribute> </xsl:when> <!-- end of add --> <xsl:when test="(name() = 'port' and . = '8080')"> <xsl:attribute name="port"><xsl:value-of select="$port" /></xsl:attribute> </xsl:when> <xsl:when test="(name() = 'port' and . = '8009')"> <xsl:attribute name="port"><xsl:value-of select="$portAJP" /></xsl:attribute> </xsl:when> <xsl:when test="(name() = 'redirectPort')"> <xsl:attribute name="redirectPort"><xsl:value-of select="$portHttps" /></xsl:attribute> </xsl:when> <xsl:when test="(name() = 'port' and . = '8443')"> <xsl:attribute name="port"><xsl:value-of select="$portHttps" /></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:apply-templates/> </Connector> </xsl:template> <xsl:template match="*|@*"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
-
2. Re: server bindings
adrian.brock Dec 21, 2004 1:54 PM (in response to adrian.brock)Thanks Gozilla,
I didn't even know that this feature existed :-)
I now need to investigate why it isn't working against Tomcat55
I don't see an obvious change in the format. -
3. Re: server bindings
gozilla Dec 21, 2004 2:14 PM (in response to adrian.brock)You're welcome, Adrian,
BTW, I realize that the timestamps shown on the forums are 5 hours behind GMT, despite the mention 'All times are GMT'. ;)
Cheers -
4. Re: server bindings
adrian.brock Dec 21, 2004 2:28 PM (in response to adrian.brock)You should post that in the portal forum.
It is probably the server is misconfigured wrt time zone (thinking its location is GMT when it is actually EST). -
5. Re: server bindings
ryan.campbell Dec 21, 2004 8:11 PM (in response to adrian.brock)So we need to add a custom configuration of jboss to the testsuite which uses server bindings and tests that tomcat is listening on the designated ports.
http://jira.jboss.com/jira/browse/JBAS-75