static synchronized String lookupNetworkHost ( String host ) { try { if ( _bundle == null ) { URL url = GemFireJmxClient . class . getResource ( hostPropFileName ) ; String filePath = null ; if ( url == null ) filePath = hostPropFileName ; else filePath = url . toString ( ) ; System . out . println ( new StringBuilder ( "Loading IP addresses from " ) . append ( filePath ) . toString ( ) ) ; _bundle = ResourceBundle . getBundle ( "host" ) ; } System . out . println ( new StringBuilder ( "Looking for host name \"" ) . append ( host ) . append ( "\" IP address in " ) . append ( hostPropFileName ) . toString ( ) ) ; String newHost = _bundle . getString ( host ) ; System . out . println ( new StringBuilder ( host ) . append ( "=" ) . append ( newHost ) . toString ( ) ) ; return newHost ; } catch ( RuntimeException e ) { System . out . println ( "Using host:" + host ) ; return host ; } }
Supports resolving host network lookup issues