Tom Mueller wrote:
>
>
> On 7/6/2010 5:56 PM, Ken wrote:
>> Tom Mueller wrote:
>>> Once you have a Server s, call s.getCluster() which returns a
>>> Cluster, or null if the instance is not clustered.
>>>
>>>
>> How to I figure out which Server instance in Servers corresponds to
>> my instance?
> If you inject a Server, you get the one you are on, AFAIK.
OK, that should work for me. I'll need all of the servers in my cluster,
but I can inject the Server, get my cluster, and then get the servers
in my cluster.
>>
>> Also, I need to know the host name of the server. In my test, the
>> attribute node-agent-ref
>> was set to the host name. Can I rely on node-agent-ref to always be
>> the host name?
> Don't assume there is a single host name for a server. There could be
> multiple NICs with multiple IP address and multiple hostname.
>
> Get the hostname from the relevant listener, and if it isn't there
> because that listener is listening on 0.0.0.0, then there is a
> Node.getNodeHost() that can be used. The node-agent-ref is a name for
> the node, not a hostname, although often times people name their nodes
> with a hostname.
OK. Generally the ORB iiop-listeners have port 0.0.0.0, but I don't
want to assume that that is always the case.
But the problem is that (in my example) domain.xml contains the following:
<nodes>
<node name="localhost" />
</nodes>
I cannot use localhost. The actual host name (minas is my case) ONLY
appears in the node-agent-ref
in the server element in domain.xml. So how is this supposed to work?
Is there an error somewhere in the setup
of the cluster? I'm using the Hudson plugin that Harshad and Mahti
created to set up my cluster.
Thanks,
Ken.
>
> Tom
>
>>
>> Thanks,
>>
>> Ken.
>>