2 Replies Latest reply on Jun 20, 2008 12:47 AM by tvbinh

    How to get IP address of JBoss instances

    tvbinh

      Hi everyone,

      I have a JBoss cluster with 3 nodes in it. Each of the nodes has 3 network interfaces. One is local host, one for intranet and one just for the JBoss clustering.

      In my bean, how can I build a method to get IP address (of the interface for JBoss clustering, not the interface for intranet) of the JBoss instance that the EJB is deployed on.

      Could someone please help me ?

      Thanks a lot in advance,

      Binh

        • 1. Re: How to get IP address of JBoss instances
          brian.stansberry

          From the jboss:service=DefaultPartitionMBean, get the HAPartition attribute. On that, invoke HAPartition.getClusterNodes(). That will return ClusterNode[], with each element representing a member of the current view. ClusterNode.getIpAddress() and getPort() will return the address/port JGroups is using.

          • 2. Re: How to get IP address of JBoss instances
            tvbinh

             

            "bstansberry@jboss.com" wrote:
            From the jboss:service=DefaultPartitionMBean, get the HAPartition attribute. On that, invoke HAPartition.getClusterNodes(). That will return ClusterNode[], with each element representing a member of the current view. ClusterNode.getIpAddress() and getPort() will return the address/port JGroups is using.


            I got it worked. Thank you very much for you help.