Inflation, Investing and Everything
Needed a "proper" way to get the ListenAddress and ListenPort settings that were defined in the WebLogic server's config.xml file (besides opening and parsing the darn file directly, of course, lol). The links above include code for a servlet called InfoCluster which can be adapted to do just that.
This stemmed from a requirement to get the "localhost" address for a multi-homed server. If you just do an InetAddress.getLocalHost(), it appears that, for a multi-homed machine (one with more than one local IP address, due to multiple network cards or virtual adaptors), you will get just one of the available IP addresses, and the order of obtaining that address is implementation-specific to the JDK you're using (!)
On the other hand, obtaining the "ListenAddress" this way now makes the code WebLogic-specific (you know - gain some, lose some). Another way might be to use your system's configuration mechanism (whatever it is) and just do a config.getString() (for example - whatever the API is). And *then* your configuration mechanism will have to take care of deployment onto different machines - which, hopefully, at this point, it is not *your* problem :)
Most popular blog postings on lowem.log :
1. Singapore MRT rail network length to double by 2020
Featured articles on lowem.log :
1. Book review : Shut Down by William Flynn