Valsaraj Viswanathan
Valsaraj Viswanathan

Reputation: 1567

How to set node name in WildFly-8.2.0 domain mode

I can set this in standalone mode by using -Djboss.node.name=nodeA. I wonder, how can this be set for each node managed in domain mode?

I found that there is a small change in the node name when it is in domain mode compared to standalone mode. In standalone mode it is nodeA but in domain mode it is master:nodeA. Is there any way to make them the same?

Upvotes: 1

Views: 3173

Answers (2)

Francis
Francis

Reputation: 643

this solution works for me first go to host.xml add this system property under

 <servers>    
  <server name="server-one" group="main-server-group">
        <socket-bindings port-offset="150"/>
        <system-properties>
            <property name="jboss.node.name" value="nodeA" boot-time="true"/>
        </system-properties>
  </server>
  .....
 </servers>

second go to domain.xml and under every profile entry search for

<subsystem xmlns="urn:jboss:domain:transactions:1.5">

and change the core-element tag as shown below

<subsystem xmlns="urn:jboss:domain:transactions:1.5">
    <core-environment node-identifier="${jboss.node.name}">
        ...
    </core-environment>
    ...
</subsystem>

Upvotes: 1

Mike
Mike

Reputation: 4963

What you're seeing in domain mode is the fully qualified name. It is telling you the host name, followed by the node name.

If you look in your host-master.xml, you will see the root tag looks like this:

<host name="master" xmlns="urn:jboss:domain:2.2">

If you change the host name to something like main, you will find that your fully qualified node name is main:nodeA.

You could remove the name attribute from the <host> (the host.xml file doesn't have it), but I wouldn't recommend it, because it can make things a bit more confusing in terms of management if you have a multiple hosts.

Upvotes: 0

Related Questions