3 Replies Latest reply on Oct 11, 2006 11:44 AM by Peter Johnson

    jboss-3.2.6 Problem w/ConfiguringMultipleJBossInstancesOnOne

    Andrew Boyd Novice

      Hi All,
      I believe I followed directions at http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfiguringMultipleJBossInstancesOnOneMachine

      But I'm still getting the following error when I start the second instance:

      -------------------------------------------------------
      GMS: address is 172.16.74.58:2610 (additional data: 17 bytes)
      -------------------------------------------------------
      16:47:33,312 INFO [DefaultPartition] Number of cluster members: 2
      16:47:33,312 INFO [DefaultPartition] Other members: 1
      16:47:33,312 INFO [DefaultPartition] New cluster view for partition DefaultPartition: 9 ([17.16.74.58:1099, 172.16.74.58:1199] delta: 0)
      16:47:33,312 INFO [DefaultPartition] Fetching state (will wait for 60000 milliseconds):
      16:47:33,328 INFO [DefaultPartition] I am (null) received membershipChanged event:
      16:47:33,328 INFO [DefaultPartition] Dead members: 0 ([])
      16:47:33,328 INFO [DefaultPartition] New Members : 0 ([])
      16:47:33,328 INFO [DefaultPartition] All Members : 2 ([172.16.74.58:1099, 172.16.74.58:1199])
      16:47:34,046 INFO [HANamingService] Listening on /0.0.0.0:1200
      16:47:34,046 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /0.0.0.0:1102, group=230.0.0.4, HA-JNDI address=172.16.74.58:1200
      16:47:34,765 INFO [MailService] Mail Service bound to java:/Mail
      16:47:34,921 INFO [SystemPropertiesService] Loaded system properties from: file:/C:/work/Projects/MyProject/jboss-3.2.6/server/mercury-02/conf/mercury.properties
      16:47:35,281 INFO [TreeCache] setClusterConfig(): setting cluster properties from xml to: UDP(ip_mcast=true;ip_ttl=64;loopback=false;mcast_addr=230.1.2.3;mcast_port=45577;mcast_recv_buf_size=80000;mc
      ast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):
      FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_
      thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pb
      cast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true)
      16:47:35,312 INFO [TreeCache] interceptor chain is:
      class org.jboss.cache.interceptors.CallInterceptor
      class org.jboss.cache.interceptors.ReplicationInterceptor
      class org.jboss.cache.interceptors.TransactionInterceptor
      16:47:35,312 INFO [TreeCache] cache mode is REPL_ASYNC
      16:47:35,343 INFO [UDP] unicast sockets will use interface 172.16.74.58
      16:47:35,343 INFO [UDP] socket information:
      local_addr=172.16.74.58:2617, mcast_addr=230.1.2.3:45577, bind_addr=/172.16.74.58, ttl=64
      sock: bound to 172.16.74.58:2617, receive buffer size=80000, send buffer size=150000
      mcast_recv_sock: bound to 172.16.74.58:45577, send buffer size=150000, receive buffer size=80000
      mcast_send_sock: bound to 172.16.74.58:2618, send buffer size=150000, receive buffer size=80000
      16:47:35,343 INFO [STDOUT]
      -------------------------------------------------------
      GMS: address is 172.16.74.58:2617
      -------------------------------------------------------
      16:47:37,656 INFO [TreeCache] viewAccepted(): new members: [172.16.74.58:2584, 172.16.74.58:2617]
      16:47:37,671 INFO [TreeCache] received the state (size=269 bytes)
      16:47:37,671 INFO [TreeCache] transient state: 217 bytes
      16:47:37,671 INFO [TreeCache] setting transient state
      16:47:37,671 INFO [TreeCache] locking the old tree
      16:47:37,671 INFO [TreeCache] setState(): locking the old tree was successful
      16:47:37,671 INFO [TreeCache] setting the transient state was successful
      16:47:37,671 INFO [TreeCache] forcing release of all locks in old tree
      16:47:37,671 INFO [TreeCache] state was retrieved successfully (in 15 milliseconds
      16:47:37,937 INFO [Embedded] Catalina naming disabled
      16:47:38,359 ERROR [Http11Protocol] Error initializing endpoint
      java.net.BindException: Address already in use: JVM_Bind:8000
       at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:264)
       at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:137)



      The change in the port number:
      New cluster view for partition DefaultPartition: 9 ([17.16.74.58:1099, 172.16.74.58:1199] delta: 0)
      

      Would make me think that some of the changes I made are working. It looks like it is not working for the 8000 port which is the first appserver.

      here is my conf/jboss-service.xml from my 1st node:
      <!--
       | Binding service manager for port/host mapping. This is a sample
       | config that demonstrates a JBoss instances with a server name 'jboss1'
       | loading its bindings from an XML file using the ServicesStoreFactory
       | implementation returned by the XMLServicesStoreFactory.
       |
       | ServerName: The unique name assigned to a JBoss server instance for
       | lookup purposes. This allows a single ServicesStore to handle mulitiple
       | JBoss servers.
       |
       | StoreURL: The URL string passed to org.jboss.services.binding.ServicesStore
       | during initialization that specifies how to connect to the bindings store.
       | StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface
       | implementation to create to obtain the ServicesStore instance.
       -->
       <mbean code="org.jboss.services.binding.ServiceBindingManager"
       name="jboss.system:service=ServiceBindingManager">
       <attribute name="ServerName">mercury-01</attribute>
       <attribute name="StoreURL">../server/mercury-bindings/mercury-bindings.xml</attribute>
       <attribute name="StoreFactoryClassName">
       org.jboss.services.binding.XMLServicesStoreFactory
       </attribute>
       </mbean>
      
      


      Here is is from my 2nd node:
      <!--
       | Binding service manager for port/host mapping. This is a sample
       | config that demonstrates a JBoss instances with a server name 'jboss1'
       | loading its bindings from an XML file using the ServicesStoreFactory
       | implementation returned by the XMLServicesStoreFactory.
       |
       | ServerName: The unique name assigned to a JBoss server instance for
       | lookup purposes. This allows a single ServicesStore to handle mulitiple
       | JBoss servers.
       |
       | StoreURL: The URL string passed to org.jboss.services.binding.ServicesStore
       | during initialization that specifies how to connect to the bindings store.
       | StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface
       | implementation to create to obtain the ServicesStore instance.
       -->
       <mbean code="org.jboss.services.binding.ServiceBindingManager"
       name="jboss.system:service=ServiceBindingManager">
       <attribute name="ServerName">mercury-02</attribute>
       <attribute name="StoreURL">../server/mercury-bindings/mercury-bindings.xml</attribute>
       <attribute name="StoreFactoryClassName">
       org.jboss.services.binding.XMLServicesStoreFactory
       </attribute>
       </mbean>
      
      


      Do I need a "ports-default" and a "node-1" and a "node-2"?
      I didn't do it that way. I just removed ports-default and replaced it with mercury-01 and changed ports-01 to mercury-02.

      Here is the StoreUrl file:
      <!-- A sample configuration for the binding service which defines different
      port configurations (ports-default, ports-01, ports-02, ports-03) for
      running multiple JBoss instances in parallel on the same machine.
      
      The actual port configuration can be selected within the jboss-
      service.xml file via ServiceBindingManager attribute ServerName.
      
      The following sample e.g. selects the jboss-default port configuration
      
      <mbean code="org.jboss.services.binding.ServiceBindingManager"
       name="jboss.system:service=ServiceBindingManager">
       <attribute name="ServerName">ports-default</attribute>
       <attribute name="StoreURL">file:../server/port-bindings.xml</attribute>
       <attribute name="StoreFactoryClassName">
       org.jboss.services.binding.XMLServicesStoreFactory
       </attribute>
      </mbean>
      
      For running a second server instance you have to change the port
      bindings of that instance by specifing an alternative port binding
      configuration in the jboss-service.xml of the second server, e.g.
      
      <attribute name="ServerName">ports-01</attribute>
      
      REMARK: Additional documentation for running multiple JBoss instances
      on the same machine can be found in the offical JBoss3.x book
      in chapter "MBean Service Miscellany - Services Binding Management" !
       -->
      
      <service-bindings>
      
       <!-- ********************************************************** -->
       <!-- * ports-default * -->
       <!-- ********************************************************** -->
       <server name="mercury-01">
      
       <!-- ********************* jboss-service.xml ****************** -->
      
       <service-config name="jboss:service=Naming"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
       <delegate-config portName="Port" hostName="BindAddress">
       <attribute name="RmiPort">1098</attribute>
       </delegate-config>
       <binding port="1099" host="${jboss.bind.address}"/>
       </service-config>
      
      
       <service-config name="jboss:service=WebService"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
       <delegate-config portName="Port"/>
       <binding port="8083"/>
       </service-config>
      
      
       <service-config name="jboss:service=invoker,type=jrmp"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
       <delegate-config portName="RMIObjectPort"/>
       <binding port="4444"/>
       </service-config>
      
       <service-config name="jboss:service=invoker,type=pooled"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
       <delegate-config portName="ServerBindPort"/>
       <!-- don't care for now -->
       <binding port="0"/>
       </service-config>
      
      
       <!-- ********************* cluster-service.xml **************** -->
      
       <service-config name="jboss:service=HAJNDI"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="1100"/>
       </service-config>
      
       <service-config name="jboss:service=invoker,type=jrmpha"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="4445"/>
       </service-config>
      
      
       <!-- ********************* iiop-service.xml ****************** -->
      
       <service-config name="jboss:service=CorbaORB"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="3528"/>
       </service-config>
      
      
       <!-- ********************* jmx-rmi-adaptor.sar **************** -->
      
       <service-config name="jboss.jmx:type=Connector,name=RMI"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="19001"/>
       </service-config>
      
      
       <!-- ********************* snmp-adaptor.sar ****************** -->
      
       <service-config name="jboss.jmx:name=SnmpAgent,service=trapd,type=logger"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="1162"/>
       </service-config>
      
       <!-- ********************* jbossmq-service.xml **************** -->
      
       <!-- JMS related services -->
       <service-config name="jboss.mq:service=InvocationLayer,type=UIL2"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="ServerBindPort"/>
       <binding port="8093"/>
       </service-config>
      
      
       <!-- ********************* hsqldb-ds.xml ********************** -->
      
       <!-- Hypersonic related services when using the tcp/ip access
       <service-config name="jboss.jca:service=ManagedConnectionFactory,name=DefaultDS"
       delegateClass="org.jboss.services.binding.XSLTConfigDelegate"
       >
       <delegate-config>
       <xslt-config configName="ManagedConnectionFactoryProperties"><![CDATA[
      <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="host"/>
       <xsl:param name="port"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match="config-property[@name='ConnectionURL']">
       <config-property type="java.lang.String" name="ConnectionURL">jdbc:hsqldb:hsql://<xsl:value-of select='$host'/>:<xsl:value-of select='$port'/></config-property>
       </xsl:template>
      
       <xsl:template match="*|@*">
       <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
       </xsl:copy>
       </xsl:template>
      </xsl:stylesheet>
      ]]>
       </xslt-config>
       </delegate-config>
       <binding host="localhost" port="1701" />
       </service-config>
      
       <service-config name="jboss:service=Hypersonic"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port" />
       <binding port="1701" />
       </service-config>
       -->
      
       <!-- 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:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <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>
       ]]>
       </xslt-config>
       </delegate-config>
       <binding port="8080"/>
       </service-config>
      
       <!-- ********************* jbossweb-tomcat.sar *****************
       <service-config name="jboss.web:service=WebServer"
       delegateClass="org.jboss.services.binding.XSLTConfigDelegate"
       >
       <delegate-config>
       <xslt-config configName="Config"><![CDATA[
       <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <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>
       ]]>
       </xslt-config>
       </delegate-config>
       <binding port="8080"/>
       </service-config>
      -->
      
       </server>
      
      
       <!-- ********************************************************** -->
       <!-- * ports-01 * -->
       <!-- ********************************************************** -->
       <server name="mercury-02">
      
       <!-- ********************* jboss-service.xml ****************** -->
      
       <service-config name="jboss:service=Naming"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port" hostName="BindAddress">
       <attribute name="RmiPort">1198</attribute>
       </delegate-config>
       <binding port="1199" host="${jboss.bind.address}"/>
       </service-config>
      
      
       <service-config name="jboss:service=WebService"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="8183"/>
       </service-config>
      
      
       <service-config name="jboss:service=invoker,type=jrmp"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="4544"/>
       </service-config>
      
      
       <service-config name="jboss:service=invoker,type=pooled"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="ServerBindPort"/>
       <!-- don't care for now -->
       <binding port="0"/>
       </service-config>
      
       <!-- ********************* cluster-service.xml **************** -->
      
       <service-config name="jboss:service=HAJNDI"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="1200"/>
       </service-config>
      
       <service-config name="jboss:service=invoker,type=jrmpha"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="4545"/>
       </service-config>
      
      
       <!-- ********************* iiop-service.xml ****************** -->
      
       <service-config name="jboss:service=CorbaORB"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="3628"/>
       </service-config>
      
      
       <!-- ********************* jmx-rmi-adaptor.sar **************** -->
      
       <service-config name="jboss.jmx:type=Connector,name=RMI"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="19101"/>
       </service-config>
      
      
       <!-- ********************* snmp-adaptor.sar ****************** -->
      
       <service-config name="jboss.jmx:name=SnmpAgent,service=trapd,type=logger"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="1262"/>
       </service-config>
      
      
       <!-- ********************* jbossmq-service.xml **************** -->
      
       <!-- JMS related services -->
       <service-config name="jboss.mq:service=InvocationLayer,type=UIL2"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="ServerBindPort"/>
       <binding port="8193"/>
       </service-config>
      
      
       <!-- ********************* hsqldb-ds.xml ********************** -->
      
       <!-- Hypersonic related services
      
       Only if using TCP setup (local file setup by default)
      
       <service-config name="jboss.jca:service=ManagedConnectionFactory,name=DefaultDS"
       delegateClass="org.jboss.services.binding.XSLTConfigDelegate"
       >
       <delegate-config>
       <xslt-config configName="ManagedConnectionFactoryProperties"><![CDATA[
      <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="host"/>
       <xsl:param name="port"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match="config-property[@name='ConnectionURL']">
       <config-property type="java.lang.String" name="ConnectionURL">jdbc:hsqldb:hsql://<xsl:value-of select='$host'/>:<xsl:value-of select='$port'/></config-property>
       </xsl:template>
      
       <xsl:template match="*|@*">
       <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
       </xsl:copy>
       </xsl:template>
      </xsl:stylesheet>
      ]]>
       </xslt-config>
       </delegate-config>
       <binding host="localhost" port="1801" />
       </service-config>
      
       <service-config name="jboss:service=Hypersonic"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port" />
       <binding port="1801" />
       </service-config>
      
       -->
      
       <!-- 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:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <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>
       ]]>
       </xslt-config>
       </delegate-config>
       <binding port="8180"/>
       </service-config>
      
       <!-- ********************* jbossweb-tomcat41.sar *****************
      
       <service-config name="jboss.web:service=WebServer"
       delegateClass="org.jboss.services.binding.XSLTConfigDelegate"
       >
       <delegate-config>
       <xslt-config configName="Config"><![CDATA[
       <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <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>
       ]]>
       </xslt-config>
       </delegate-config>
       <binding port="8180" />
       </service-config>
       -->
      
       </server>
      
      
       <!-- ********************************************************** -->
       <!-- * ports-02 * -->
       <!-- ********************************************************** -->
       <server name="ports-02">
      
       <!-- ********************* jboss-service.xml ****************** -->
      
       <service-config name="jboss:service=Naming"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port" hostName="BindAddress">
       <attribute name="RmiPort">1298</attribute>
       </delegate-config>
       <binding port="1299" host="${jboss.bind.address}"/>
       </service-config>
      
      
       <service-config name="jboss:service=WebService"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="8283"/>
       </service-config>
      
      
       <service-config name="jboss:service=invoker,type=jrmp"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="4644"/>
       </service-config>
      
      
       <service-config name="jboss:service=invoker,type=pooled"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="ServerBindPort"/>
       <!-- don't care for now -->
       <binding port="0"/>
       </service-config>
      
       <!-- ********************* cluster-service.xml **************** -->
      
       <service-config name="jboss:service=HAJNDI"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="1300"/>
       </service-config>
      
       <service-config name="jboss:service=invoker,type=jrmpha"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="4645"/>
       </service-config>
      
      
       <!-- ********************* iiop-service.xml ****************** -->
      
       <service-config name="jboss:service=CorbaORB"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="3728"/>
       </service-config>
      
      
       <!-- ********************* jmx-rmi-adaptor.sar **************** -->
      
       <service-config name="jboss.jmx:type=Connector,name=RMI"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="19201"/>
       </service-config>
      
      
       <!-- ********************* snmp-adaptor.sar ****************** -->
      
       <service-config name="jboss.jmx:name=SnmpAgent,service=trapd,type=logger"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="1362"/>
       </service-config>
      
       <!-- ********************* jbossmq-service.xml **************** -->
      
       <!-- JMS related services -->
       <service-config name="jboss.mq:service=InvocationLayer,type=UIL2"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="ServerBindPort"/>
       <binding port="8293"/>
       </service-config>
      
      
       <!-- ********************* hsqldb-ds.xml ********************** -->
      
       <!-- Hypersonic related services
      
       Only if using TCP setup (local file setup by default)
      
       <service-config name="jboss.jca:service=ManagedConnectionFactory,name=DefaultDS"
       delegateClass="org.jboss.services.binding.XSLTConfigDelegate"
       >
       <delegate-config>
       <xslt-config configName="ManagedConnectionFactoryProperties"><![CDATA[
      <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="host"/>
       <xsl:param name="port"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match="config-property[@name='ConnectionURL']">
       <config-property type="java.lang.String" name="ConnectionURL">jdbc:hsqldb:hsql://<xsl:value-of select='$host'/>:<xsl:value-of select='$port'/></config-property>
       </xsl:template>
      
       <xsl:template match="*|@*">
       <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
       </xsl:copy>
       </xsl:template>
      </xsl:stylesheet>
      ]]>
       </xslt-config>
       </delegate-config>
       <binding host="localhost" port="1901" />
       </service-config>
      
       <service-config name="jboss:service=Hypersonic"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port" />
       <binding port="1901" />
       </service-config>
      
       -->
      
       <!-- 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:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <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>
       ]]>
       </xslt-config>
       </delegate-config>
       <binding port="8280"/>
       </service-config>
      
       <!-- ********************* jbossweb-tomcat.sar *****************
      
       <service-config name="jboss.web:service=WebServer"
       delegateClass="org.jboss.services.binding.XSLTConfigDelegate"
       >
       <delegate-config>
       <xslt-config configName="Config"><![CDATA[
       <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <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>
       ]]>
       </xslt-config>
       </delegate-config>
       <binding port="8280" />
       </service-config>
       -->
      
       </server>
      
       <!-- ********************************************************** -->
       <!-- * ports-03 * -->
       <!-- ********************************************************** -->
       <server name="ports-03">
      
       <!-- ********************* jboss-service.xml ****************** -->
      
       <service-config name="jboss:service=Naming"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port" hostName="BindAddress">
       <attribute name="RmiPort">1398</attribute>
       </delegate-config>
       <binding port="1399" host="${jboss.bind.address}"/>
       </service-config>
      
      
       <service-config name="jboss:service=WebService"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="8383"/>
       </service-config>
      
      
       <service-config name="jboss:service=invoker,type=jrmp"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="4744"/>
       </service-config>
      
      
       <service-config name="jboss:service=invoker,type=pooled"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="ServerBindPort"/>
       <!-- don't care for now -->
       <binding port="0"/>
       </service-config>
      
       <!-- ********************* cluster-service.xml **************** -->
      
       <service-config name="jboss:service=HAJNDI"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="1400"/>
       </service-config>
      
       <service-config name="jboss:service=invoker,type=jrmpha"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="4745"/>
       </service-config>
      
      
       <!-- ********************* iiop-service.xml ****************** -->
      
       <service-config name="jboss:service=CorbaORB"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="3828"/>
       </service-config>
      
      
       <!-- ********************* jmx-rmi-adaptor.sar **************** -->
      
       <service-config name="jboss.jmx:type=Connector,name=RMI"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="RMIObjectPort"/>
       <binding port="19301"/>
       </service-config>
      
      
       <!-- ********************* snmp-adaptor.sar ****************** -->
      
       <service-config name="jboss.jmx:name=SnmpAgent,service=trapd,type=logger"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port"/>
       <binding port="1462"/>
       </service-config>
      
       <!-- ********************* jbossmq-service.xml **************** -->
      
       <!-- JMS related services -->
       <service-config name="jboss.mq:service=InvocationLayer,type=UIL2"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="ServerBindPort"/>
       <binding port="8393"/>
       </service-config>
      
      
       <!-- ********************* hsqldb-ds.xml ********************** -->
      
       <!-- Hypersonic related services
      
       Only if using TCP setup (local file setup by default)
      
       <service-config name="jboss.jca:service=ManagedConnectionFactory,name=DefaultDS"
       delegateClass="org.jboss.services.binding.XSLTConfigDelegate"
       >
       <delegate-config>
       <xslt-config configName="ManagedConnectionFactoryProperties"><![CDATA[
      <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="host"/>
       <xsl:param name="port"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match="config-property[@name='ConnectionURL']">
       <config-property type="java.lang.String" name="ConnectionURL">jdbc:hsqldb:hsql://<xsl:value-of select='$host'/>:<xsl:value-of select='$port'/></config-property>
       </xsl:template>
      
       <xsl:template match="*|@*">
       <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
       </xsl:copy>
       </xsl:template>
      </xsl:stylesheet>
      ]]>
       </xslt-config>
       </delegate-config>
       <binding host="localhost" port="1901" />
       </service-config>
      
       <service-config name="jboss:service=Hypersonic"
       delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
       >
       <delegate-config portName="Port" />
       <binding port="1901" />
       </service-config>
      
       -->
      
       <!-- 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:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <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>
       ]]>
       </xslt-config>
       </delegate-config>
       <binding port="8380"/>
       </service-config>
      
       <!-- ********************* jbossweb-tomcat.sar *****************
      
       <service-config name="jboss.web:service=WebServer"
       delegateClass="org.jboss.services.binding.XSLTConfigDelegate"
       >
       <delegate-config>
       <xslt-config configName="Config"><![CDATA[
       <xsl:stylesheet
       xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
      
       <xsl:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <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>
       ]]>
       </xslt-config>
       </delegate-config>
       <binding port="8280" />
       </service-config>
       -->
      
       </server>
      
      </service-bindings>