[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/multiplex ...

Ron Sigal ron_sigal at yahoo.com
Mon Jul 31 15:47:11 EDT 2006


  User: rsigal  
  Date: 06/07/31 15:47:11

  Modified:    src/main/org/jboss/remoting/transport/multiplex 
                        MultiplexServerInvoker.java
  Log:
  JBREM-560, JBREM-551, JBREM-534:  Changed run() so that, in case of unrecoverable error, terminates thread but calls stop() only if invoker is part of an invoker farm.  Otherwise, let Connector call stop().
  
  Revision  Changes    Path
  1.54      +24 -11    JBossRemoting/src/main/org/jboss/remoting/transport/multiplex/MultiplexServerInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MultiplexServerInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/multiplex/MultiplexServerInvoker.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -b -r1.53 -r1.54
  --- MultiplexServerInvoker.java	23 Jul 2006 03:35:01 -0000	1.53
  +++ MultiplexServerInvoker.java	31 Jul 2006 19:47:11 -0000	1.54
  @@ -295,13 +295,17 @@
               if ("Socket is closed".equals(e.getMessage())
                     || "Socket closed".equals(e.getMessage()))
               {
  -               log.debug("socket is closed: stopping");
  +               log.debug("socket is closed: stopping thread");
  +               // If this invoker was started by a Connector, let the Connector stop it.
  +               if (hasMaster) 
                  stop();
                  return;
               }
               else if (++errorCount > maxAcceptErrors)
               {
  -               log.error("maximum accept errors exceeded: stopping");
  +               log.error("maximum accept errors exceeded: stopping thread");
  +               // If this invoker was started by a Connector, let the Connector stop it.
  +               if (hasMaster)
                  stop();
                  return;
               }
  @@ -316,7 +320,9 @@
                  // have shutdown, it's safe to stop.
                  if (connectPrimingSocket != null && ((VirtualSocket)connectPrimingSocket).hasReceivedDisconnectMessage())
                  {
  -                  log.debug("Client has closed: shutting down");
  +                  log.debug("Client has closed: stopping thread");
  +                  // If this invoker was started by a Connector, let the Connector stop it.
  +                  if (hasMaster)
                     stop();
                     return;
                  }
  @@ -324,7 +330,9 @@
            }
            catch (EOFException e)
            {
  -            log.info("end of file exception: stopping");
  +            log.info("end of file exception: stopping thread");
  +            // If this invoker was started by a Connector, let the Connector stop it.
  +            if (hasMaster)
               stop();
               return;
            }
  @@ -340,6 +348,8 @@
                  if (++errorCount > maxAcceptErrors)
                  {
                     log.error("maximum accept errors exceeded: stopping");
  +                  // If this invoker was started by a Connector, let the Connector stop it.
  +                  if (hasMaster)
                     stop();
                     return;
                  }
  @@ -644,6 +654,7 @@
            ServerSocket ss = new VirtualServerSocket((VirtualSocket) socket, configuration);
            ss.setSoTimeout(getTimeout());
            MultiplexServerInvoker si = new MultiplexServerInvoker(locator, configuration, ss, socket, virtualServerInvokers);
  +         si.hasMaster = true;
            si.clientCallbackListener = clientCallbackListener;
            si.handlers = handlers;
            si.setMBeanServer(this.getMBeanServer());
  @@ -750,7 +761,7 @@
                  if ((ps = socketGroupInfo.getPrimingSocket()) != null)
                  {
                     // When the remote virtual MultiplexServerInvoker learns that the
  -                  // priming socket has closed, it will class its VirtualServerSocket,
  +                  // priming socket has closed, it will close its VirtualServerSocket,
                     // rendering unshareable the MultiplexingManager that underlies this
                     // socket group.  We mark it as unshareable immediately so that it will
                     // not be reused by any other socket group.
  @@ -768,10 +779,12 @@
                  }
                  
                  serverMultiplexId = socketGroupInfo.getSocketGroupId();
  -               
  +               log.info("serverMultiplexId: " + serverMultiplexId);
                  if (serverMultiplexId != null)
                  {
                     getSocketGroupMap().remove(serverMultiplexId);
  +                  log.info("removed serverMultiplexId: " + serverMultiplexId);
  +                  log.info("socketGroupInfo: " + getSocketGroupMap().get(serverMultiplexId));
                  }
                  
                  // addressPair is set in finishStart().
  
  
  



More information about the jboss-cvs-commits mailing list