Author: cwiklik Date: Wed Sep 21 17:08:15 2011 New Revision: 1173765 URL: http://svn.apache.org/viewvc?rev=1173765&view=rev Log: UIMA-2227 Optionally, fetch IP address from System environment instead of via InetAddress
Modified: uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java Modified: uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java?rev=1173765&r1=1173764&r2=1173765&view=diff ============================================================================== --- uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java (original) +++ uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java Wed Sep 21 17:08:15 2011 @@ -123,7 +123,11 @@ public class JmsOutputChannel implements public JmsOutputChannel() { try { - hostIP = InetAddress.getLocalHost().getHostAddress(); + if( System.getenv("IP") != null ) { + hostIP = System.getenv("IP"); + } else { + hostIP = InetAddress.getLocalHost().getHostAddress(); + } } catch (Exception e) { /* silently deal with this error */ } // Check the environment for existence of NoTTL tag. If present,