Author: rareddy
Date: 2009-03-30 15:46:21 -0400 (Mon, 30 Mar 2009)
New Revision: 662
Modified:
trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java
Log:
TEIID-101
Modified: trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java 2009-03-30
17:54:19 UTC (rev 661)
+++ trunk/server/src/main/java/com/metamatrix/server/JGroupsProvider.java 2009-03-30
19:46:21 UTC (rev 662)
@@ -141,9 +141,14 @@
String udpMulticastAddress = configProps.getProperty(UDP_MCAST_ADDR_PROPERTY);
if (udpMulticastAddress == null || udpMulticastAddress.length() == 0) {
- String currentAddr = VMNaming.getBindAddress();
- String lastNode = currentAddr.substring(0, currentAddr.indexOf('.'));
- udpMulticastAddress = DEFAULT_UDP_MCAST_ADDR_PREFIX + lastNode;
+ String currentAddr = VMNaming.getBindAddress();
+ if (currentAddr.indexOf('.') != -1) {
+ String lastNode = currentAddr.substring(currentAddr.indexOf('.')+1);
+ udpMulticastAddress = DEFAULT_UDP_MCAST_ADDR_PREFIX + lastNode;
+ }
+ else {
+ throw new ConfigurationException("Failed to set default multicast
address"); //$NON-NLS-1$
+ }
}
if (udpMulticastSupported.equalsIgnoreCase("true")) { //$NON-NLS-1$
Show replies by date