geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control ControlClientProtocol.java ControlServerProtocol.java
Date Sat, 10 Apr 2004 17:14:01 GMT
adc         2004/04/10 10:14:01

  Modified:    modules/network/src/java/org/apache/geronimo/network/protocol/control
                        ControlClientProtocol.java
                        ControlServerProtocol.java
  Log:
  Better logging.
  
  Revision  Changes    Path
  1.5       +10 -1     incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlClientProtocol.java
  
  Index: ControlClientProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlClientProtocol.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ControlClientProtocol.java	8 Apr 2004 05:22:15 -0000	1.4
  +++ ControlClientProtocol.java	10 Apr 2004 17:14:01 -0000	1.5
  @@ -74,7 +74,9 @@
   
               getDownProtocol().sendDown(new BootRequestDownPacket()); //todo: this is probably
dangerous, put in thread pool
   
  +            log.trace("AQUIRING " + sendMutex);
               sendMutex.acquire();
  +            log.trace("AQUIRED " + sendMutex);
   
               state = STARTED;
           } catch (InterruptedException e) {
  @@ -108,7 +110,9 @@
                   log.trace("BOOT RESPONSE");
                   listener.serveUp(((BootResponseUpPacket) p).getMenu());
                   getDownProtocol().sendDown(new BootSuccessDownPacket());
  +                log.trace("RELEASING " + sendMutex);
                   sendMutex.release();
  +                log.trace("RELEASED " + sendMutex);
               } catch (ControlException e) {
                   throw new ProtocolException(e);
               }
  @@ -131,13 +135,18 @@
   
       public void sendDown(DownPacket packet) throws ProtocolException {
           try {
  +            log.trace("AQUIRING " + sendMutex);
               if (!sendMutex.attempt(timeout)) throw new ProtocolException("Send timeout");
  +            log.trace("AQUIRED " + sendMutex);
  +
               PassthroughDownPacket passthtough = new PassthroughDownPacket();
               passthtough.setBuffers(packet.getBuffers());
   
               getDownProtocol().sendDown(passthtough);
   
  +            log.trace("RELEASING " + sendMutex);
               sendMutex.release();
  +            log.trace("RELEASED " + sendMutex);
           } catch (InterruptedException e) {
               throw new ProtocolException(e);
           }
  
  
  
  1.4       +7 -1      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlServerProtocol.java
  
  Index: ControlServerProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlServerProtocol.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ControlServerProtocol.java	17 Mar 2004 03:11:59 -0000	1.3
  +++ ControlServerProtocol.java	10 Apr 2004 17:14:01 -0000	1.4
  @@ -129,7 +129,9 @@
               getDownProtocol().sendDown(constructBootPacket());
           } else if (p instanceof BootSuccessUpPacket) {
               log.trace("BOOT SUCCESS");
  +            log.trace("RELEASING " + sendMutex);
               sendMutex.release();
  +            log.trace("RELEASED " + sendMutex);
           } else if (p instanceof ShutdownRequestUpPacket) {
               log.trace("SHUTDOWN_REQ");
               getDownProtocol().sendDown(new ShutdownAcknowledgeDownPacket());
  @@ -140,14 +142,18 @@
   
       public void sendDown(DownPacket packet) throws ProtocolException {
           try {
  +            log.trace("AQUIRING " + sendMutex);
               if (!sendMutex.attempt(timeout)) throw new ProtocolException("Send timeout.");
  +            log.trace("AQUIRED " + sendMutex);
   
               PassthroughDownPacket passthtough = new PassthroughDownPacket();
               passthtough.setBuffers(packet.getBuffers());
   
               getDownProtocol().sendDown(passthtough);
   
  +            log.trace("RELEASING " + sendMutex);
               sendMutex.release();
  +            log.trace("RELEASED " + sendMutex);
           } catch (InterruptedException e) {
               throw new ProtocolException(e);
           }
  
  
  

Mime
View raw message