[jbosscache-commits] JBoss Cache SVN: r7538 - core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Tue Jan 20 11:59:44 EST 2009
Author: manik.surtani at jboss.com
Date: 2009-01-20 11:59:44 -0500 (Tue, 20 Jan 2009)
New Revision: 7538
Modified:
core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/JGroupsTransport.java
Log:
Modified: core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/JGroupsTransport.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/JGroupsTransport.java 2009-01-20 16:51:26 UTC (rev 7537)
+++ core/branches/flat/src/main/java/org/horizon/remoting/transport/jgroups/JGroupsTransport.java 2009-01-20 16:59:44 UTC (rev 7538)
@@ -134,33 +134,35 @@
// in order of preference - we first look for an external JGroups file, then a set of XML properties, and
// finally the legacy JGroups String properties.
String cfg;
- if (p.containsKey(CONFIGURATION_FILE)) {
- cfg = p.getProperty(CONFIGURATION_FILE);
- try {
- channel = new JChannel(new FileLookup().lookupFileLocation(cfg));
- } catch (Exception e) {
- // move on to next method to configure the channel
- channel = null;
+ if (p != null) {
+ if (p.containsKey(CONFIGURATION_FILE)) {
+ cfg = p.getProperty(CONFIGURATION_FILE);
+ try {
+ channel = new JChannel(new FileLookup().lookupFileLocation(cfg));
+ } catch (Exception e) {
+ // move on to next method to configure the channel
+ channel = null;
+ }
}
- }
- if (channel == null && 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;
+ if (channel == null && 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;
+ }
}
- }
- if (channel == null && 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;
+ if (channel == null && 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;
+ }
}
}
More information about the jbosscache-commits
mailing list