5 Replies Latest reply on Dec 21, 2004 8:11 PM by ryan.campbell

    server bindings

    Adrian Brock Master


      Yet again I want to test some clustering and use the server bindings to create
      two instances.
      But it is broken - address already in use errors, stale references (e.g. JBoss5
      contains tomcat55 but the references are to tomcat50).
      I'm not even sure how you use the binding manager to override
      Tomcat's server.xml anyway?

      There really needs to be regression test for this basic feature, once I've figured out
      how to fix the current configuration.


        • 1. Re: server bindings
          François Duchatelet Newbie


          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">
           <xslt-config configName="ConfigFile"><![CDATA[
           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"/>
           <xslt-param name="jvmRoute">LB1</xslt-param>
           <binding port="8080"/>

          And Here is the imported stylesheet:
           xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
           <xsl:output method="xml" />
           <xsl:template match="/">
           <xsl:template match = "Engine[@name='MainEngine']">
           <xsl:attribute name="jvmRoute"><xsl:value-of select="$jvmRoute" /></xsl:attribute>
           <xsl:apply-templates select="@*|node()"/>
           <xsl:template match = "Connector">
           <xsl:for-each select="@*">
           <!-- fdu, turn dns lookups off -->
           <xsl:when test="name() = 'enableLookups'">
           <xsl:attribute name="enableLookups">false</xsl:attribute>
           <!-- end of add -->
           <xsl:when test="(name() = 'port' and . = '8080')">
           <xsl:attribute name="port"><xsl:value-of select="$port" /></xsl:attribute>
           <xsl:when test="(name() = 'port' and . = '8009')">
           <xsl:attribute name="port"><xsl:value-of select="$portAJP" /></xsl:attribute>
           <xsl:when test="(name() = 'redirectPort')">
           <xsl:attribute name="redirectPort"><xsl:value-of select="$portHttps" /></xsl:attribute>
           <xsl:when test="(name() = 'port' and . = '8443')">
           <xsl:attribute name="port"><xsl:value-of select="$portHttps" /></xsl:attribute>
           <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>
           <xsl:template match="*|@*">
           <xsl:apply-templates select="@*|node()"/>

          • 2. Re: server bindings
            Adrian Brock Master

            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
              François Duchatelet Newbie

              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'. ;)


              • 4. Re: server bindings
                Adrian Brock Master

                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 Expert

                  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.