[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/detection ...
Ron Sigal
ron_sigal at yahoo.com
Wed Oct 11 16:18:55 EDT 2006
User: rsigal
Date: 06/10/11 16:18:55
Modified: src/main/org/jboss/remoting/detection AbstractDetector.java
Log:
JBREM-580, JBREM-581, JBREM-603: (1) Added configuration map to be passed to passed to ConnectionValidator. (2) Backed out SSL transport test.
Revision Changes Path
1.27 +19 -26 JBossRemoting/src/main/org/jboss/remoting/detection/AbstractDetector.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractDetector.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/detection/AbstractDetector.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- AbstractDetector.java 15 Aug 2006 16:33:23 -0000 1.26
+++ AbstractDetector.java 11 Oct 2006 20:18:55 -0000 1.27
@@ -54,7 +54,7 @@
*
* @author <a href="mailto:jhaynie at vocalocity.net">Jeff Haynie</a>
* @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
- * @version $Revision: 1.26 $
+ * @version $Revision: 1.27 $
*/
public abstract class AbstractDetector implements AbstractDetectorMBean
{
@@ -74,8 +74,18 @@
private Set domains = new HashSet();
private boolean acceptLocal = false;
+ private Map config;
+
public AbstractDetector()
{
+ this(null);
+ }
+
+ public AbstractDetector(Map config)
+ {
+ this.config = new HashMap();
+ if (config != null)
+ this.config.putAll(config);
}
/**
@@ -437,7 +447,7 @@
if (log.isTraceEnabled())
{
log.trace("Detection message received.");
- log.trace("Id = " + detection.getIdentity() == null ? detection.getIdentity().getInstanceId() : "null");
+ log.trace("Id = " + detection.getIdentity() != null ? detection.getIdentity().getInstanceId() : "null");
log.trace("isRemoteDetection() = " + isRemoteDetection(detection));
}
// we only track detections within our own domain and not ourself
@@ -521,23 +531,7 @@
ServerInvokerMetadata invokerMetadata = invokerMetadataArray[c];
locator = invokerMetadata.getInvokerLocator();
- // added for JBREM-580 (don't use connection listener if is ssl)
- String transport = locator.getProtocol();
- boolean isSSL = false;
- try
- {
- isSSL = InvokerRegistry.isSSLSupported(transport);
- }
- catch(Exception e)
- {
- log.warn("Error when trying to determine if transport (" + transport + ") supports ssl when creating connection listener.");
- log.debug(e.getMessage(), e);
- }
-
- // if is ssl, then assume is dead at this point
- if(!isSSL)
- {
- boolean isValid = ConnectionValidator.checkConnection(locator, null);
+ boolean isValid = ConnectionValidator.checkConnection(locator, config);
if(isValid)
{
// the transport was successful
@@ -548,7 +542,6 @@
log.trace("Successful connection check for " + locator);
}
}
- }
}
catch(Throwable ig)
More information about the jboss-cvs-commits
mailing list