[infinispan-commits] Infinispan SVN: r130 - trunk/core/src/main/java/org/infinispan/remoting/transport/jgroups.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Thu Apr 16 10:02:44 EDT 2009
Author: mircea.markus
Date: 2009-04-16 10:02:43 -0400 (Thu, 16 Apr 2009)
New Revision: 130
Modified:
trunk/core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java
Log:
fail-fast on jgroups wrong configuration
Modified: trunk/core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java 2009-04-15 16:07:05 UTC (rev 129)
+++ trunk/core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java 2009-04-16 14:02:43 UTC (rev 130)
@@ -152,28 +152,28 @@
try {
channel = new JChannel(new FileLookup().lookupFileLocation(cfg));
} catch (Exception e) {
- // move on to next method to configure the channel
- channel = null;
+ log.error("Error while trying to create a channel using config files: " + cfg);
+ throw new CacheException(e);
}
}
- if (channel == null && p.containsKey(CONFIGURATION_XML)) {
+ if (p.containsKey(CONFIGURATION_XML)) {
cfg = p.getProperty(CONFIGURATION_XML);
try {
channel = new JChannel(XmlConfigHelper.stringToElement(cfg));
} catch (Exception e) {
- // move on to next method to configure the channel
- channel = null;
+ log.error("Error while trying to create a channel using config XML: " + cfg);
+ throw new CacheException(e);
}
}
- if (channel == null && p.containsKey(CONFIGURATION_STRING)) {
+ if (p.containsKey(CONFIGURATION_STRING)) {
cfg = p.getProperty(CONFIGURATION_STRING);
try {
channel = new JChannel(cfg);
} catch (Exception e) {
- // move on to next method to configure the channel
- channel = null;
+ log.error("Error while trying to create a channel using config string: " + cfg);
+ throw new CacheException(e);
}
}
}
More information about the infinispan-commits
mailing list