[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting ...
Tom Elrod
tom.elrod at jboss.com
Tue Feb 20 23:24:31 EST 2007
User: telrod
Date: 07/02/20 23:24:31
Modified: src/main/org/jboss/remoting Tag: remoting_2_x Client.java
Log:
JBREM-614 - changed connection checking for remoting client
Revision Changes Path
No revision
No revision
1.53.2.22 +29 -24 JBossRemoting/src/main/org/jboss/remoting/Client.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Client.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/Client.java,v
retrieving revision 1.53.2.21
retrieving revision 1.53.2.22
diff -u -b -r1.53.2.21 -r1.53.2.22
--- Client.java 16 Feb 2007 04:11:18 -0000 1.53.2.21
+++ Client.java 21 Feb 2007 04:24:31 -0000 1.53.2.22
@@ -64,7 +64,7 @@
* @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
*
- * @version $Revision: 1.53.2.21 $
+ * @version $Revision: 1.53.2.22 $
*/
public class Client implements Externalizable
{
@@ -172,6 +172,8 @@
private SocketFactory socketFactory;
+ private boolean connected = false;
+
// Constructors ---------------------------------------------------------------------------------
/**
@@ -400,7 +402,7 @@
*/
public boolean isConnected()
{
- return (this.invoker != null && this.invoker.isConnected());
+ return connected;
}
/**
@@ -410,9 +412,8 @@
*/
public void connect() throws Exception
{
-// @TODO See JBREM-614.
-// if (isConnected())
-// return;
+ if (isConnected())
+ return;
if (locator == null)
{
@@ -430,6 +431,8 @@
}
connect(invoker);
+
+ connected = true;
}
/**
@@ -457,6 +460,8 @@
InvokerRegistry.destroyClientInvoker(invoker.getLocator(), configuration);
invoker = null;
}
+
+ connected = false;
}
/**
More information about the jboss-cvs-commits
mailing list