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

Ron Sigal ron_sigal at yahoo.com
Thu Feb 15 03:48:17 EST 2007


  User: rsigal  
  Date: 07/02/15 03:48:17

  Modified:    src/main/org/jboss/remoting  Tag: remoting_2_x Client.java
  Log:
  JBREM-658: (1) Changed BasicThreadPool blocking strategy to RUN. (2) Synchronized creation of thread pool.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.53.2.20 +44 -37    JBossRemoting/src/main/org/jboss/remoting/Client.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Client.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/Client.java,v
  retrieving revision 1.53.2.19
  retrieving revision 1.53.2.20
  diff -u -b -r1.53.2.19 -r1.53.2.20
  --- Client.java	21 Jan 2007 10:21:23 -0000	1.53.2.19
  +++ Client.java	15 Feb 2007 08:48:17 -0000	1.53.2.20
  @@ -64,7 +64,7 @@
    * @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
    * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
    *
  - * @version $Revision: 1.53.2.19 $
  + * @version $Revision: 1.53.2.20 $
    */
   public class Client implements Externalizable
   {
  @@ -158,6 +158,7 @@
      private ClassLoader classloader;
      private String subsystem;
      private String sessionId;
  +   private Object onewayThreadPoolLock = new Object();
      private ThreadPool onewayThreadPool;
      private InvokerLocator locator;
   
  @@ -526,6 +527,8 @@
       * the thread will be executed on the remote server in a new executing thread and the client
       * thread will return.  This is a little slower, but will know that the call made it to the
       * server.
  +    * 
  +    * NOTE:  false case is not accurate.
       */
      public void invokeOneway(final Object param, final Map sendPayload, boolean clientSide)
         throws Throwable
  @@ -607,10 +610,12 @@
       */
      public ThreadPool getOnewayThreadPool()
      {
  +      synchronized (onewayThreadPoolLock)
  +      {
         if (onewayThreadPool == null)
         {
            BasicThreadPool pool = new BasicThreadPool("JBossRemoting Client Oneway");
  -
  +            log.info("created new thread pool: " + pool);
            Object param = configuration.get(MAX_NUM_ONEWAY_THREADS);
            if (param instanceof String)
            {
  @@ -652,9 +657,10 @@
            {
               pool.setMaximumQueueSize(maxOnewayThreadPoolQueueSize);
            }
  -         pool.setBlockingMode(BlockingMode.WAIT);
  +            pool.setBlockingMode(BlockingMode.RUN);
            onewayThreadPool = pool;
         }
  +      }
         return onewayThreadPool;
      }
   
  @@ -829,6 +835,7 @@
                  {
                     callbackLocator = new InvokerLocator(transport, host, port, null, metadata);
                  }
  +               log.debug("starting callback Connector: " + callbackLocator);
                  Connector callbackServerConnector = new Connector(callbackLocator, configuration);
                  callbackConnectors.put(callbackhandler, callbackServerConnector);
                  callbackServerConnector.start();
  
  
  



More information about the jboss-cvs-commits mailing list