1 Reply Latest reply on Jan 28, 2012 8:57 AM by jaikiran

    hornetq and standalone.xml substitution variables (messaging)

    ned233

      Distribution:  jboss-as-7.1.0.Final-SNAPSHOT (as of 1/25/2012)

       

      I am trying to setup 2 JBoss servers on different nodes, and cluster the hornetq instances together.  I did not want to have 2 different versions of standalone.xml, so I structured my cluster section like this:

       

              <subsystem xmlns="urn:jboss:domain:messaging:1.1">

                  <hornetq-server>

                      ...

                      <connectors>

                          ...                   

                          <connector name="server1-connector">

                              <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                              <param key="host" value="${other.jboss.server.node}" />

                              <param key="port" value="5446"/>

                          </connector>

                         

                      </connectors>

       

      On the highlighted line, I have used a substitution variable to specify the name of the "other" server node.  I have verified in the boot.log file that this value is getting set correctly.  However, when I start the server, I get the following error:

       

      ERROR [org.hornetq.core.remoting.impl.netty.NettyConnector] Failed to create netty connection: java.net.UnknownHostException: ${other.jboss.server.node}

       

      It looks like the substitution is not getting set.  Is there some other way to achieve this, so that I can maintain one version of standalone.xml for both servers?