-
1. Re: System property to determine server ip address
jaikiran Oct 15, 2010 9:56 AM (in response to crazybugs)Look at the methods available on InetAddress class http://download.oracle.com/javase/6/docs/api/java/net/InetAddress.html
-
2. Re: System property to determine server ip address
peterj Oct 15, 2010 11:53 AM (in response to crazybugs)1 of 1 people found this helpfulYou do know that you can view all of the system properties using the jmx-console, right?
http://localhost:8080/jmx-console, select the name=Properties,type=Service MBean under 'jboss' and click Invoke next the the showAll operation.
Now here is a quiz for you: which system property gives you the IP address that you bound the app server to (the -b value)? There is also another property that gives you the host name.
-
3. Re: System property to determine server ip address
crazybugs Oct 18, 2010 4:44 AM (in response to peterj)I think the jboss.bind.address gives the IP address to which it has to be bound. In my case I have specified it to be 0.0.0.0. In jmx- console I was able to find the value of server host name from property "java.rmi.server.hostname". However I was not able to find the value of the server IP Address.
-
4. Re: System property to determine server ip address
crazybugs Oct 19, 2010 8:04 AM (in response to crazybugs)Is there any system property that gives the server IP address
-
5. Re: System property to determine server ip address
peterj Oct 19, 2010 10:23 AM (in response to crazybugs)>>Is there any system property that gives the server IP address
I showed you how to get a listing of all of the system properties. So looking in that list, did you see it? Perhaps it is time to try Jaikiran's suggestion.
-
6. Re: System property to determine server ip address
crazybugs Oct 19, 2010 10:49 AM (in response to peterj)Yes I tried the suggestion.
The jboss.bind.address gives the IP address to which it has to be bound. In my case I have specified it to be 0.0.0.0 . In jmx- console I was able to find the value of server host name from property "java.rmi.server.hostname". However I was not able to find the value of the server IP Address.
I need to specify the server IP Address in "ClientAddress" property in uil2-service.xml file for jms connection. However I don't want to hardcode the value.
-
7. Re: System property to determine server ip address
shonkylogic Oct 27, 2010 3:29 AM (in response to crazybugs)crazybugs b wrote:
Is there any system property that gives the server IP address
There does not appear to be a system property showing server IP address. But
InetAddress.getLocalHost().getHostAddress()
will give it to you, as per jaikiran_pai's original reply
-
8. Re: System property to determine server ip address
spangaer Mar 22, 2012 6:18 AM (in response to crazybugs)