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

Ron Sigal ron_sigal at yahoo.com
Sat Jun 2 01:35:13 EDT 2007


  User: rsigal  
  Date: 07/06/02 01:35:13

  Modified:    src/main/org/jboss/remoting/transport/bisocket  Tag:
                        remoting_2_x BisocketClientInvoker.java
  Log:
  JBREM-748:  If attempt to schedule a task on static Timer fails, catches exception and recreates Timer.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.17  +20 -2     JBossRemoting/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BisocketClientInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java,v
  retrieving revision 1.1.2.16
  retrieving revision 1.1.2.17
  diff -u -b -r1.1.2.16 -r1.1.2.17
  --- BisocketClientInvoker.java	19 May 2007 02:35:20 -0000	1.1.2.16
  +++ BisocketClientInvoker.java	2 Jun 2007 05:35:13 -0000	1.1.2.17
  @@ -225,8 +225,17 @@
               {
                  timer = new Timer(true);
               }
  +            try
  +            {
               timer.schedule(pingTimerTask, pingFrequency, pingFrequency);
            }
  +            catch (IllegalStateException e)
  +            {
  +               log.debug("Unable to schedule TimerTask on existing Timer", e);
  +               timer = new Timer(true);
  +               timer.schedule(pingTimerTask, pingFrequency, pingFrequency);
  +            }
  +         }
         }
      }
   
  @@ -408,8 +417,17 @@
         {
            timer = new Timer(true);
         }
  +      try
  +      {
         timer.schedule(pingTimerTask, pingFrequency, pingFrequency);
      }
  +      catch (IllegalStateException e)
  +      {
  +         log.debug("Unable to schedule TimerTask on existing Timer", e);
  +         timer = new Timer(true);
  +         timer.schedule(pingTimerTask, pingFrequency, pingFrequency);
  +      }
  +   }
   
   
      InvokerLocator getSecondaryLocator() throws Throwable
  
  
  



More information about the jboss-cvs-commits mailing list