User: chirino 
  Date: 01/10/01 20:52:55

  Modified:    src/main/org/jboss/mq Connection.java
  Log:
  Reordered the way that I was setting up the ClockDeamon
  
  Revision  Changes    Path
  1.9       +14 -12    jbossmq/src/main/org/jboss/mq/Connection.java
  
  Index: Connection.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/Connection.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Connection.java   2001/10/01 23:53:33     1.8
  +++ Connection.java   2001/10/02 03:52:55     1.9
  @@ -38,7 +38,7 @@
    *
    * @author    Norbert Lataille ([EMAIL PROTECTED])
    * @author    Hiram Chirino ([EMAIL PROTECTED])
  - * @version   $Revision: 1.8 $
  + * @version   $Revision: 1.9 $
    * @created   August 16, 2001
    */
   public class Connection implements java.io.Serializable, javax.jms.Connection
  @@ -1020,18 +1020,20 @@
         // ping period is 0.
         if( pingPeriod == 0 )
            return;
  -      
  -      pingTaskId = clockDaemon.executePeriodically(pingPeriod,new PingTask(), true);
  -      clockDaemon.setThreadFactory(
  -         new ThreadFactory () {
  -            public Thread newThread(Runnable r) {
  -               Thread t = new Thread(threadGroup, r, "Connection Monitor Thread");
  -               t.setDaemon(true);
  -               return t;
  +      if( clockDaemon.getThreadFactory() == null ) {
  +         cat.debug("Setting the clockDaemon's thread factory");
  +         clockDaemon.setThreadFactory(
  +            new ThreadFactory () {
  +               public Thread newThread(Runnable r) {
  +                  Thread t = new Thread(threadGroup, r, "Connection Monitor 
Thread");
  +                  t.setDaemon(true);
  +                  return t;
  +               }
               }
  -         }
  -      
  -      );
  +
  +         );
  +      }
  +      pingTaskId = clockDaemon.executePeriodically(pingPeriod,new PingTask(), true);
      }
      
      private void stopPingThread() {
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to