geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject cvs commit: incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging NodeImpl.java
Date Thu, 08 Jul 2004 05:13:29 GMT
gdamour     2004/07/07 22:13:29

  Modified:    sandbox/messaging project.xml
               modules/network project.xml
               modules/network/src/test/org/apache/geronimo/network/protocol
                        GSSAPIProtocolTest.java
                        SocketProtocolStressTest.java
                        SocketProtocolTest.java ProtocolStackTest.java
                        DatagramProtocolTest.java TestProtocol.java
               sandbox/messaging/src/test/org/apache/geronimo/messaging/remotenode
                        RemoteNodeManagerImplTest.java
               modules/network/src/java/org/apache/geronimo/network/protocol
                        BufferProtocol.java GSSAPIServerProtocol.java
                        GSSAPIClientProtocol.java ProtocolFactory.java
               modules/network/src/java/org/apache/geronimo/network/protocol/control
                        ControlClientProtocolKitchen.java
                        ControlClientProtocolStack.java
                        ControlServerProtocol.java ControlContext.java
               sandbox/webdav project.xml
               sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode
                        RemoteNodeManagerImpl.java RemoteNodeMonitor.java
               sandbox/webdav/src/test/org/apache/geronimo/datastore/impl/remote
                        RemoteUseCaseTest.java
               modules/security/src/test/org/apache/geronimo/security/network/protocol
                        SubjectCarryingProtocolTest.java TestProtocol.java
               modules/security project.xml
               sandbox/messaging/src/test/org/apache/geronimo/messaging
                        NodeImplTest.java
               sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/network
                        NodeServerImpl.java NetworkTransportFactory.java
               modules/network/src/test/org/apache/geronimo/network/protocol/control
                        ControlProtocolTest.java
               modules/network/src/java/org/apache/geronimo/network
                        SelectorManager.java
               sandbox/messaging/src/java/org/apache/geronimo/messaging
                        NodeImpl.java
  Added:       modules/core/src/java/org/apache/geronimo/pool
                        ClockPool.java ThreadPool.java
  Removed:     modules/system/src/java/org/apache/geronimo/system
                        ClockPool.java ThreadPool.java
  Log:
  Move ClockPool and ThreadPool from geronimo-system to geronimo-core.
  
  This change is required in order to be able to deploy these two services without having
to add to the
  "Class-Path" of deployer.jar and server.jar an entry for the concurrent library.
  
  Revision  Changes    Path
  1.4       +4 -4      incubator-geronimo/sandbox/messaging/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	24 Jun 2004 20:59:48 -0000	1.3
  +++ project.xml	8 Jul 2004 05:13:28 -0000	1.4
  @@ -68,7 +68,7 @@
   
           <dependency>
               <groupId>geronimo</groupId>
  -            <artifactId>geronimo-system</artifactId>
  +            <artifactId>geronimo-core</artifactId>
               <version>${pom.currentVersion}</version>
           </dependency>
   
  @@ -78,7 +78,7 @@
               <version>${pom.currentVersion}</version>
           </dependency>
   
  -		<!-- TODO START reverse dependency -->
  +        <!-- TODO START reverse dependency -->
           <dependency>
               <groupId>xmlbeans</groupId>
               <artifactId>xbean-apache</artifactId>
  @@ -94,7 +94,7 @@
               <artifactId>geronimo-spec-j2ee-deployment</artifactId>
               <version>1.1-rc2</version>
           </dependency>
  -		<!-- TODO END reverse dependency -->
  +        <!-- TODO END reverse dependency -->
   
           <dependency>
               <groupId>commons-logging</groupId>
  
  
  
  1.4       +2 -2      incubator-geronimo/modules/network/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	23 Mar 2004 04:03:10 -0000	1.3
  +++ project.xml	8 Jul 2004 05:13:28 -0000	1.4
  @@ -45,7 +45,7 @@
           <!-- Module Dependencies -->
           <dependency>
               <groupId>geronimo</groupId>
  -            <artifactId>geronimo-system</artifactId>
  +            <artifactId>geronimo-core</artifactId>
               <version>${pom.currentVersion}</version>
           </dependency>
   
  
  
  
  1.6       +3 -3      incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/GSSAPIProtocolTest.java
  
  Index: GSSAPIProtocolTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/GSSAPIProtocolTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- GSSAPIProtocolTest.java	17 Mar 2004 03:12:00 -0000	1.5
  +++ GSSAPIProtocolTest.java	8 Jul 2004 05:13:28 -0000	1.6
  @@ -43,8 +43,8 @@
   import org.apache.geronimo.network.protocol.control.ControlServerProtocol;
   import org.apache.geronimo.network.protocol.control.ControlServerProtocolStack;
   import org.apache.geronimo.network.protocol.control.ControlServerProtocolWaiter;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.9       +3 -3      incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/SocketProtocolStressTest.java
  
  Index: SocketProtocolStressTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/SocketProtocolStressTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SocketProtocolStressTest.java	3 Apr 2004 22:57:41 -0000	1.8
  +++ SocketProtocolStressTest.java	8 Jul 2004 05:13:28 -0000	1.9
  @@ -27,8 +27,8 @@
   import junit.framework.TestCase;
   
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.7       +3 -3      incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/SocketProtocolTest.java
  
  Index: SocketProtocolTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/SocketProtocolTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SocketProtocolTest.java	3 Apr 2004 22:57:41 -0000	1.6
  +++ SocketProtocolTest.java	8 Jul 2004 05:13:28 -0000	1.7
  @@ -26,8 +26,8 @@
   import junit.framework.TestCase;
   
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.7       +3 -3      incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/ProtocolStackTest.java
  
  Index: ProtocolStackTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/ProtocolStackTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProtocolStackTest.java	3 Apr 2004 22:57:41 -0000	1.6
  +++ ProtocolStackTest.java	8 Jul 2004 05:13:28 -0000	1.7
  @@ -26,8 +26,8 @@
   import junit.framework.TestCase;
   
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.5       +2 -2      incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/DatagramProtocolTest.java
  
  Index: DatagramProtocolTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/DatagramProtocolTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DatagramProtocolTest.java	17 Mar 2004 03:12:00 -0000	1.4
  +++ DatagramProtocolTest.java	8 Jul 2004 05:13:28 -0000	1.5
  @@ -26,7 +26,7 @@
   import junit.framework.TestCase;
   
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.4       +3 -3      incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/TestProtocol.java
  
  Index: TestProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/TestProtocol.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestProtocol.java	17 Mar 2004 03:12:00 -0000	1.3
  +++ TestProtocol.java	8 Jul 2004 05:13:28 -0000	1.4
  @@ -32,8 +32,8 @@
   import org.apache.geronimo.network.protocol.control.commands.CreateInstanceMenuItem;
   import org.apache.geronimo.network.protocol.control.commands.SetAttributeMenuItem;
   import org.apache.geronimo.network.protocol.control.commands.SetReferenceMenuItem;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.4       +2 -2      incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/remotenode/RemoteNodeManagerImplTest.java
  
  Index: RemoteNodeManagerImplTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/remotenode/RemoteNodeManagerImplTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RemoteNodeManagerImplTest.java	5 Jul 2004 07:03:50 -0000	1.3
  +++ RemoteNodeManagerImplTest.java	8 Jul 2004 05:13:29 -0000	1.4
  @@ -31,7 +31,7 @@
   import org.apache.geronimo.messaging.NodeTopology;
   import org.apache.geronimo.messaging.interceptors.MsgOutInterceptor;
   import org.apache.geronimo.messaging.io.IOContext;
  -import org.apache.geronimo.system.ClockPool;
  +import org.apache.geronimo.pool.ClockPool;
   
   /**
    *
  
  
  
  1.4       +2 -2      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/BufferProtocol.java
  
  Index: BufferProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/BufferProtocol.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BufferProtocol.java	17 Mar 2004 03:11:59 -0000	1.3
  +++ BufferProtocol.java	8 Jul 2004 05:13:29 -0000	1.4
  @@ -28,7 +28,7 @@
   import org.apache.geronimo.network.protocol.control.ControlContext;
   import org.apache.geronimo.network.protocol.control.commands.CreateInstanceMenuItem;
   import org.apache.geronimo.network.protocol.control.commands.SetReferenceMenuItem;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.5       +2 -2      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/GSSAPIServerProtocol.java
  
  Index: GSSAPIServerProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/GSSAPIServerProtocol.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GSSAPIServerProtocol.java	24 Apr 2004 23:17:07 -0000	1.4
  +++ GSSAPIServerProtocol.java	8 Jul 2004 05:13:29 -0000	1.5
  @@ -40,7 +40,7 @@
   import org.apache.geronimo.network.protocol.control.commands.CreateInstanceMenuItem;
   import org.apache.geronimo.network.protocol.control.commands.SetAttributeMenuItem;
   import org.apache.geronimo.network.protocol.control.commands.SetReferenceMenuItem;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.5       +2 -2      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/GSSAPIClientProtocol.java
  
  Index: GSSAPIClientProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/GSSAPIClientProtocol.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GSSAPIClientProtocol.java	24 Apr 2004 23:17:07 -0000	1.4
  +++ GSSAPIClientProtocol.java	8 Jul 2004 05:13:29 -0000	1.5
  @@ -23,6 +23,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.geronimo.pool.ThreadPool;
   import org.ietf.jgss.GSSContext;
   import org.ietf.jgss.GSSException;
   import org.ietf.jgss.GSSManager;
  @@ -30,7 +31,6 @@
   import org.ietf.jgss.MessageProp;
   import org.ietf.jgss.Oid;
   
  -import org.apache.geronimo.system.ThreadPool;
   
   import EDU.oswego.cs.dl.util.concurrent.Latch;
   
  
  
  
  1.7       +2 -2      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/ProtocolFactory.java
  
  Index: ProtocolFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/ProtocolFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProtocolFactory.java	25 Apr 2004 06:37:12 -0000	1.6
  +++ ProtocolFactory.java	8 Jul 2004 05:13:29 -0000	1.7
  @@ -25,8 +25,8 @@
   import EDU.oswego.cs.dl.util.concurrent.ClockDaemon;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.geronimo.pool.ClockPool;
   
  -import org.apache.geronimo.system.ClockPool;
   
   
   /**
  
  
  
  1.5       +3 -3      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlClientProtocolKitchen.java
  
  Index: ControlClientProtocolKitchen.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlClientProtocolKitchen.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ControlClientProtocolKitchen.java	24 Apr 2004 06:29:01 -0000	1.4
  +++ ControlClientProtocolKitchen.java	8 Jul 2004 05:13:29 -0000	1.5
  @@ -30,8 +30,8 @@
   import org.apache.geronimo.network.protocol.ProtocolStack;
   import org.apache.geronimo.network.protocol.UpPacket;
   import org.apache.geronimo.network.protocol.control.commands.MenuItem;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   import EDU.oswego.cs.dl.util.concurrent.Latch;
   
  
  
  
  1.4       +3 -3      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlClientProtocolStack.java
  
  Index: ControlClientProtocolStack.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlClientProtocolStack.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ControlClientProtocolStack.java	17 Mar 2004 03:11:59 -0000	1.3
  +++ ControlClientProtocolStack.java	8 Jul 2004 05:13:29 -0000	1.4
  @@ -26,8 +26,8 @@
   import org.apache.geronimo.network.protocol.Protocol;
   import org.apache.geronimo.network.protocol.ProtocolException;
   import org.apache.geronimo.network.protocol.ProtocolStack;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.7       +3 -3      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ControlServerProtocol.java	24 Apr 2004 22:34:01 -0000	1.6
  +++ ControlServerProtocol.java	8 Jul 2004 05:13:29 -0000	1.7
  @@ -28,8 +28,8 @@
   import org.apache.geronimo.network.protocol.Protocol;
   import org.apache.geronimo.network.protocol.ProtocolException;
   import org.apache.geronimo.network.protocol.UpPacket;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.3       +3 -3      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlContext.java
  
  Index: ControlContext.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/protocol/control/ControlContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ControlContext.java	10 Mar 2004 09:59:14 -0000	1.2
  +++ ControlContext.java	8 Jul 2004 05:13:29 -0000	1.3
  @@ -22,8 +22,8 @@
   import java.util.Map;
   
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/pool/ClockPool.java
  
  Index: ClockPool.java
  ===================================================================
  /**
   *
   * Copyright 2003-2004 The Apache Software Foundation
   *
   *  Licensed under the Apache License, Version 2.0 (the "License");
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an "AS IS" BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  
  package org.apache.geronimo.pool;
  
  import EDU.oswego.cs.dl.util.concurrent.ClockDaemon;
  import EDU.oswego.cs.dl.util.concurrent.ThreadFactory;
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.apache.geronimo.gbean.GBeanInfo;
  import org.apache.geronimo.gbean.GBeanInfoFactory;
  import org.apache.geronimo.gbean.GBeanLifecycle;
  import org.apache.geronimo.gbean.WaitingException;
  
  
  /**
   * @version $Revision: 1.1 $ $Date: 2004/07/08 05:13:29 $
   */
  public class ClockPool implements GBeanLifecycle {
  
      static private final Log log = LogFactory.getLog(ClockPool.class);
  
      private String poolName;
  
      /**
       * Manages the thread that can used to schedule short
       * running tasks in the future.
       */
      protected ClockDaemon clockDaemon;
  
      public String getPoolName() {
          return poolName;
      }
  
      public void setPoolName(String poolName) {
          this.poolName = poolName;
      }
  
      /**
       * @return
       */
      public ClockDaemon getClockDaemon() {
          return clockDaemon;
      }
  
      public void doStart() throws WaitingException, Exception {
          clockDaemon = new ClockDaemon();
          clockDaemon.setThreadFactory(new ThreadFactory() {
              public Thread newThread(Runnable r) {
                  Thread t = new Thread(r, poolName + " ");
                  t.setDaemon(true);
                  return t;
              }
          });
          log.info("Clock pool " + poolName + " started");
      }
  
      public void doStop() throws WaitingException, Exception {
          clockDaemon.shutDown();
          log.info("Clock pool " + poolName + " stopped");
      }
  
      public void doFail() {
      }
  
      private static final GBeanInfo GBEAN_INFO;
  
      static {
          GBeanInfoFactory infoFactory = new GBeanInfoFactory(ClockPool.class);
  
          infoFactory.addAttribute("poolName", String.class, true);
  
          infoFactory.addOperation("getClockDaemon");
  
          GBEAN_INFO = infoFactory.getBeanInfo();
      }
  
      public static GBeanInfo getGBeanInfo() {
          return GBEAN_INFO;
      }
  }
  
  
  
  1.1                  incubator-geronimo/modules/core/src/java/org/apache/geronimo/pool/ThreadPool.java
  
  Index: ThreadPool.java
  ===================================================================
  /**
   *
   * Copyright 2003-2004 The Apache Software Foundation
   *
   *  Licensed under the Apache License, Version 2.0 (the "License");
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an "AS IS" BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  
  package org.apache.geronimo.pool;
  
  import EDU.oswego.cs.dl.util.concurrent.Executor;
  import EDU.oswego.cs.dl.util.concurrent.PooledExecutor;
  import EDU.oswego.cs.dl.util.concurrent.ThreadFactory;
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.apache.geronimo.gbean.GBeanInfo;
  import org.apache.geronimo.gbean.GBeanInfoFactory;
  import org.apache.geronimo.gbean.GBeanLifecycle;
  import org.apache.geronimo.gbean.WaitingException;
  
  
  /**
   * @version $Revision: 1.1 $ $Date: 2004/07/08 05:13:29 $
   */
  public class ThreadPool implements GBeanLifecycle {
  
      static private final Log log = LogFactory.getLog(ThreadPool.class);
  
      private PooledExecutor workManager;
      private long keepAliveTime;
      private int minimumPoolSize;
      private int maximumPoolSize;
      private String poolName;
  
      private int nextWorkerID = 0;
  
      public Executor getWorkManager() {
          return workManager;
      }
  
      public long getKeepAliveTime() {
          return keepAliveTime;
      }
  
      public void setKeepAliveTime(long keepAliveTime) {
          this.keepAliveTime = keepAliveTime;
      }
  
      public int getMinimumPoolSize() {
          return minimumPoolSize;
      }
  
      public void setMinimumPoolSize(int minimumPoolSize) {
          this.minimumPoolSize = minimumPoolSize;
      }
  
      public int getMaximumPoolSize() {
          return maximumPoolSize;
      }
  
      public void setMaximumPoolSize(int maximumPoolSize) {
          this.maximumPoolSize = maximumPoolSize;
      }
  
      public String getPoolName() {
          return poolName;
      }
  
      public void setPoolName(String poolName) {
          this.poolName = poolName;
      }
  
      private int getNextWorkerID() {
          return nextWorkerID++;
      }
  
      public void doStart() throws WaitingException, Exception {
          PooledExecutor p = new PooledExecutor();
          p.setKeepAliveTime(keepAliveTime);
          p.setMinimumPoolSize(minimumPoolSize);
          p.setMaximumPoolSize(maximumPoolSize);
          p.setThreadFactory(new ThreadFactory() {
              public Thread newThread(Runnable arg0) {
                  return new Thread(arg0, poolName + " " + getNextWorkerID());
              }
          });
  
          workManager = p;
  
          log.info("Thread pool " + poolName + " started");
      }
  
      public void doStop() throws WaitingException, Exception {
          workManager.shutdownNow();
          log.info("Thread pool " + poolName + " stopped");
      }
  
      public void doFail() {
          try {
              doStop();
          } catch (Exception e) {
              log.error("Failded to shutdown", e);
          }
      }
  
      private static final GBeanInfo GBEAN_INFO;
  
      static {
          GBeanInfoFactory infoFactory = new GBeanInfoFactory(ThreadPool.class);
  
          infoFactory.addAttribute("keepAliveTime", long.class, true);
          infoFactory.addAttribute("minimumPoolSize", int.class, true);
          infoFactory.addAttribute("maximumPoolSize", int.class, true);
          infoFactory.addAttribute("poolName", String.class, true);
          infoFactory.addOperation("getWorkManager");
  
          GBEAN_INFO = infoFactory.getBeanInfo();
      }
  
      public static GBeanInfo getGBeanInfo() {
          return GBEAN_INFO;
      }
  }
  
  
  
  1.18      +2 -2      incubator-geronimo/sandbox/webdav/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/webdav/project.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- project.xml	24 Jun 2004 20:59:48 -0000	1.17
  +++ project.xml	8 Jul 2004 05:13:29 -0000	1.18
  @@ -58,7 +58,7 @@
   
           <dependency>
               <groupId>geronimo</groupId>
  -            <artifactId>geronimo-system</artifactId>
  +            <artifactId>geronimo-core</artifactId>
               <version>${pom.currentVersion}</version>
           </dependency>
   
  
  
  
  1.6       +5 -5      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/RemoteNodeManagerImpl.java
  
  Index: RemoteNodeManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/RemoteNodeManagerImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RemoteNodeManagerImpl.java	24 Jun 2004 23:39:03 -0000	1.5
  +++ RemoteNodeManagerImpl.java	8 Jul 2004 05:13:29 -0000	1.6
  @@ -39,7 +39,7 @@
   import org.apache.geronimo.messaging.interceptors.MsgOutInterceptor;
   import org.apache.geronimo.messaging.io.IOContext;
   import org.apache.geronimo.messaging.remotenode.admin.JoinRequest;
  -import org.apache.geronimo.system.ClockPool;
  +import org.apache.geronimo.pool.ClockPool;
   
   /**
    * RemoteNode implementation.
  @@ -57,7 +57,7 @@
       private final Collection listeners;
       private final Map remoteNodes;
       private final RemoteNodeRouter router;
  -    private final NodeServer server;
  +    private NodeServer server;
       private final NodeInfo nodeInfo;
       private final RemoteNodeMonitor remoteNodeMonitor;
       
  @@ -86,12 +86,12 @@
           remoteNodes = new HashMap();
           router = new RemoteNodeRouter();
           remoteNodeMonitor = new RemoteNodeMonitor(this, aClockPool);
  -        server = aFactory.factoryServer(aNodeInfo, anIOContext);
  -        server.setRemoteNodeManager(this);
       }
   
       public void start() throws NodeException {
           try {
  +            server = factory.factoryServer(nodeInfo, ioContext);
  +            server.setRemoteNodeManager(this);
               server.start();
           } catch (IOException e) {
               throw new NodeException("Can not start server.", e);
  
  
  
  1.2       +2 -2      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/RemoteNodeMonitor.java
  
  Index: RemoteNodeMonitor.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/RemoteNodeMonitor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RemoteNodeMonitor.java	10 Jun 2004 23:12:25 -0000	1.1
  +++ RemoteNodeMonitor.java	8 Jul 2004 05:13:29 -0000	1.2
  @@ -26,7 +26,7 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.geronimo.messaging.NodeException;
   import org.apache.geronimo.messaging.NodeInfo;
  -import org.apache.geronimo.system.ClockPool;
  +import org.apache.geronimo.pool.ClockPool;
   
   import EDU.oswego.cs.dl.util.concurrent.ClockDaemon;
   
  
  
  
  1.9       +7 -3      incubator-geronimo/sandbox/webdav/src/test/org/apache/geronimo/datastore/impl/remote/RemoteUseCaseTest.java
  
  Index: RemoteUseCaseTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/webdav/src/test/org/apache/geronimo/datastore/impl/remote/RemoteUseCaseTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RemoteUseCaseTest.java	10 Jun 2004 23:12:25 -0000	1.8
  +++ RemoteUseCaseTest.java	8 Jul 2004 05:13:29 -0000	1.9
  @@ -35,8 +35,8 @@
   import org.apache.geronimo.messaging.remotenode.network.NetworkTransportFactory;
   import org.apache.geronimo.messaging.proxy.EndPointProxyInfo;
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   /**
    * This is a remote use-case.
  @@ -147,6 +147,10 @@
           private final NodeInfo nodeInfo1;
           private final NodeInfo nodeInfo2;
   
  +        public int getVersion() {
  +            return 0;
  +        }
  +        
           private MockTopology(NodeInfo aNodeInfo1, NodeInfo aNodeInfo2) {
               nodeInfo1 = aNodeInfo1;
               nodeInfo2 = aNodeInfo2;
  
  
  
  1.12      +3 -3      incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol/SubjectCarryingProtocolTest.java
  
  Index: SubjectCarryingProtocolTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol/SubjectCarryingProtocolTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SubjectCarryingProtocolTest.java	31 May 2004 11:57:21 -0000	1.11
  +++ SubjectCarryingProtocolTest.java	8 Jul 2004 05:13:29 -0000	1.12
  @@ -49,11 +49,11 @@
   import org.apache.geronimo.network.protocol.control.ControlServerProtocol;
   import org.apache.geronimo.network.protocol.control.ControlServerProtocolStack;
   import org.apache.geronimo.network.protocol.control.ControlServerProtocolWaiter;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   import org.apache.geronimo.security.AbstractTest;
   import org.apache.geronimo.security.jaas.GeronimoLoginConfiguration;
   import org.apache.geronimo.security.jaas.LoginModuleControlFlag;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
   import org.apache.geronimo.system.serverinfo.ServerInfo;
   
   
  
  
  
  1.4       +3 -3      incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol/TestProtocol.java
  
  Index: TestProtocol.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/test/org/apache/geronimo/security/network/protocol/TestProtocol.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestProtocol.java	17 Mar 2004 03:16:10 -0000	1.3
  +++ TestProtocol.java	8 Jul 2004 05:13:29 -0000	1.4
  @@ -37,8 +37,8 @@
   import org.apache.geronimo.network.protocol.control.commands.CreateInstanceMenuItem;
   import org.apache.geronimo.network.protocol.control.commands.SetAttributeMenuItem;
   import org.apache.geronimo.network.protocol.control.commands.SetReferenceMenuItem;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.20      +7 -1      incubator-geronimo/modules/security/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/project.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- project.xml	24 Jun 2004 20:59:51 -0000	1.19
  +++ project.xml	8 Jul 2004 05:13:29 -0000	1.20
  @@ -99,6 +99,12 @@
           </dependency>
   
           <dependency>
  +            <groupId>geronimo</groupId>
  +            <artifactId>geronimo-core</artifactId>
  +            <version>${pom.currentVersion}</version>
  +        </dependency>
  +
  +        <dependency>
               <groupId>geronimo-spec</groupId>
               <artifactId>geronimo-spec-j2ee-jacc</artifactId>
               <version>1.0-rc2</version>
  
  
  
  1.5       +3 -3      incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/NodeImplTest.java
  
  Index: NodeImplTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/NodeImplTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NodeImplTest.java	5 Jul 2004 07:03:50 -0000	1.4
  +++ NodeImplTest.java	8 Jul 2004 05:13:29 -0000	1.5
  @@ -29,8 +29,8 @@
   import org.apache.geronimo.messaging.remotenode.MessagingTransportFactory;
   import org.apache.geronimo.messaging.remotenode.network.NetworkTransportFactory;
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   /**
    *
  
  
  
  1.4       +2 -2      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/network/NodeServerImpl.java
  
  Index: NodeServerImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/network/NodeServerImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NodeServerImpl.java	3 Jun 2004 14:39:44 -0000	1.3
  +++ NodeServerImpl.java	8 Jul 2004 05:13:29 -0000	1.4
  @@ -42,7 +42,7 @@
   import org.apache.geronimo.network.protocol.ServerSocketAcceptor;
   import org.apache.geronimo.network.protocol.SocketProtocol;
   import org.apache.geronimo.network.protocol.ProtocolFactory.AcceptedCallBack;
  -import org.apache.geronimo.system.ClockPool;
  +import org.apache.geronimo.pool.ClockPool;
   
   /**
    * NodeServer implementation.
  
  
  
  1.4       +20 -2     incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/network/NetworkTransportFactory.java
  
  Index: NetworkTransportFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/network/NetworkTransportFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NetworkTransportFactory.java	24 Jun 2004 23:39:03 -0000	1.3
  +++ NetworkTransportFactory.java	8 Jul 2004 05:13:29 -0000	1.4
  @@ -17,6 +17,8 @@
   
   package org.apache.geronimo.messaging.remotenode.network;
   
  +import org.apache.geronimo.gbean.GBeanInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GBeanLifecycle;
   import org.apache.geronimo.gbean.WaitingException;
   import org.apache.geronimo.messaging.NodeInfo;
  @@ -26,7 +28,7 @@
   import org.apache.geronimo.messaging.remotenode.RemoteNode;
   import org.apache.geronimo.messaging.remotenode.RemoteNodeConnection;
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.system.ClockPool;
  +import org.apache.geronimo.pool.ClockPool;
   
   /**
    * MessagingTransportFactory using Geronimo network as the transport layer.
  @@ -70,5 +72,21 @@
           NodeInfo aNodeInfo, IOContext anIOContext) {
           return new RemoteNodeJoinerConnection(aNodeInfo, anIOContext, sm);
       }
  +    
  +    public static final GBeanInfo GBEAN_INFO;
  +
  +    static {
  +        GBeanInfoFactory factory = new GBeanInfoFactory(NetworkTransportFactory.class);
  +        factory.setConstructor(new String[] {"SelectorManager", "ClockPool"});
  +        factory.addInterface(MessagingTransportFactory.class);
  +        factory.addReference("SelectorManager", SelectorManager.class);
  +        factory.addReference("ClockPool", ClockPool.class);
  +        GBEAN_INFO = factory.getBeanInfo();
  +    }
  +
  +    public static GBeanInfo getGBeanInfo() {
  +        return GBEAN_INFO;
  +    }
  +    
       
   }
  
  
  
  1.8       +3 -3      incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/control/ControlProtocolTest.java
  
  Index: ControlProtocolTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/test/org/apache/geronimo/network/protocol/control/ControlProtocolTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ControlProtocolTest.java	8 Apr 2004 05:22:15 -0000	1.7
  +++ ControlProtocolTest.java	8 Jul 2004 05:13:29 -0000	1.8
  @@ -33,8 +33,8 @@
   import org.apache.geronimo.network.protocol.ServerSocketAcceptor;
   import org.apache.geronimo.network.protocol.SocketProtocol;
   import org.apache.geronimo.network.protocol.TestProtocol;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  
  
  
  1.12      +6 -5      incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/SelectorManager.java
  
  Index: SelectorManager.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/network/src/java/org/apache/geronimo/network/SelectorManager.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SelectorManager.java	5 Jun 2004 07:53:22 -0000	1.11
  +++ SelectorManager.java	8 Jul 2004 05:13:29 -0000	1.12
  @@ -33,7 +33,7 @@
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GBeanLifecycle;
   import org.apache.geronimo.gbean.WaitingException;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   
   /**
  @@ -261,12 +261,13 @@
           GBeanInfoFactory infoFactory = new GBeanInfoFactory(SelectorManager.class);
   
           infoFactory.addAttribute("Timeout", long.class, true);
  -        infoFactory.addAttribute("ThreadPool", ThreadPool.class, true);
  +        infoFactory.addReference("ThreadPool", ThreadPool.class);
  +        infoFactory.addAttribute("ThreadPool", ThreadPool.class, false);
           infoFactory.addAttribute("ThreadName", String.class, true);
   
           infoFactory.addOperation("getSelector");
  -        infoFactory.addOperation("getStartCounter");
  -
  +        infoFactory.addOperation("register", new Class[] {SelectableChannel.class, int.class,
SelectionEventListner.class});
  +        
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  
  
  
  1.7       +10 -9     incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/NodeImpl.java
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/NodeImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NodeImpl.java	5 Jul 2004 07:03:50 -0000	1.6
  +++ NodeImpl.java	8 Jul 2004 05:13:29 -0000	1.7
  @@ -47,8 +47,8 @@
   import org.apache.geronimo.messaging.remotenode.RemoteNodeEventListener;
   import org.apache.geronimo.messaging.remotenode.RemoteNodeManager;
   import org.apache.geronimo.messaging.remotenode.RemoteNodeManagerImpl;
  -import org.apache.geronimo.system.ClockPool;
  -import org.apache.geronimo.system.ThreadPool;
  +import org.apache.geronimo.pool.ClockPool;
  +import org.apache.geronimo.pool.ThreadPool;
   
   /**
    * Node implementation.
  @@ -460,12 +460,13 @@
   
       static {
           GBeanInfoFactory factory = new GBeanInfoFactory(NodeImpl.class);
  -        factory.setConstructor(new String[] {"NodeInfo", "MessagingTransportFactory"});
  -        factory.addAttribute("NodeInfo", NodeInfo.class, true);
  -        factory.addAttribute("MessagingTransportFactory", MessagingTransportFactory.class,
true);
  -        factory.addAttribute("Topology", NodeTopology.class, true);
  -        factory.addOperation("addEndPoint", new Class[]{EndPoint.class});
  -        factory.addOperation("removeEndPoint", new Class[]{EndPoint.class});
  +        factory.setConstructor(new String[] {"NodeInfo", "ThreadPool",
  +            "ClockPool", "MessagingTransportFactory"});
  +        factory.addInterface(Node.class, new String[] {"NodeInfo"});
  +        factory.addReference("ThreadPool", ThreadPool.class);
  +        factory.addReference("ClockPool", ClockPool.class);
  +        factory.addReference("MessagingTransportFactory",
  +            MessagingTransportFactory.class);
           GBEAN_INFO = factory.getBeanInfo();
       }
   
  
  
  

Mime
View raw message