[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/detection ...
Tom Elrod
tom.elrod at jboss.com
Mon Jul 24 01:23:53 EDT 2006
User: telrod
Date: 06/07/24 01:23:53
Modified: src/main/org/jboss/remoting/detection AbstractDetector.java
Log:
JBREM-530 - corrected connection validator behavior to not spawn new thread to make invocation on old client invoker, but instead create a new client invoker for the ping invocation.
Revision Changes Path
1.25 +6 -18 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.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- AbstractDetector.java 24 Jul 2006 02:07:56 -0000 1.24
+++ AbstractDetector.java 24 Jul 2006 05:23:53 -0000 1.25
@@ -31,7 +31,6 @@
import org.jboss.remoting.network.NetworkInstance;
import org.jboss.remoting.network.NetworkRegistryFinder;
import org.jboss.remoting.network.NetworkRegistryMBean;
-import org.jboss.remoting.transport.ClientInvoker;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -55,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.24 $
+ * @version $Revision: 1.25 $
*/
public abstract class AbstractDetector implements AbstractDetectorMBean
{
@@ -517,23 +516,12 @@
for(int c = 0; c < invokerMetadataArray.length; c++)
{
InvokerLocator locator = null;
- Map configMap = new HashMap();
- configMap.put("detector", "true");
- configMap.put("timeout", "1000");
- configMap.put("NumberOfRetries", "1");
try
{
ServerInvokerMetadata invokerMetadata = invokerMetadataArray[c];
locator = invokerMetadata.getInvokerLocator();
- ClientInvoker ci = InvokerRegistry.createClientInvoker(locator, configMap);
-
- if(ci.isConnected() == false)
- {
- ci.connect();
- }
-
- boolean isValid = ConnectionValidator.checkConnection(ci);
+ boolean isValid = ConnectionValidator.checkConnection(locator, null);
if(isValid)
{
// the transport was successful
@@ -553,15 +541,15 @@
{
log.trace(ig);
}
- // remove the client invoker, it's not any good anymore
- InvokerRegistry.destroyClientInvoker(locator, configMap);
- // will be aggressive with removal. if any fail, remove it.
- // if still good, will pick up detection again next go around.
}
}
if(ok == false)
{
// the server is down!
+ // would be nice to also remove from the invoker registry as well, but since
+ // don't know all the possible entries for the config map passed when was created,
+ // won't be able to identify it. This means that clients currently using that invoker
+ // for the server will have to find out the hard way (by getting exception calling on it).
try
{
if(networkRegistry != null)
More information about the jboss-cvs-commits
mailing list