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/remotenode/network NodeServerImpl.java RemoteNodeJoinerConnection.java
Date Sat, 17 Jul 2004 03:45:41 GMT
gdamour     2004/07/16 20:45:41

  Modified:    sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/network
                        NodeServerImpl.java RemoteNodeJoinerConnection.java
  Log:
  One does not need a BufferProtocol in the Protocol stack.This is required as we want the
Join requests to
  be synchronous.
  
  Revision  Changes    Path
  1.5       +3 -12     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NodeServerImpl.java	8 Jul 2004 05:13:29 -0000	1.4
  +++ NodeServerImpl.java	17 Jul 2004 03:45:41 -0000	1.5
  @@ -35,8 +35,6 @@
   import org.apache.geronimo.messaging.remotenode.admin.JoinReply;
   import org.apache.geronimo.network.SelectorManager;
   import org.apache.geronimo.network.protocol.AcceptableProtocol;
  -import org.apache.geronimo.network.protocol.AcceptableProtocolStack;
  -import org.apache.geronimo.network.protocol.BufferProtocol;
   import org.apache.geronimo.network.protocol.ProtocolException;
   import org.apache.geronimo.network.protocol.ProtocolFactory;
   import org.apache.geronimo.network.protocol.ServerSocketAcceptor;
  @@ -89,26 +87,19 @@
       }
   
       public void start() throws IOException, CommunicationException {
  -        log.info("Starting NodeServer.");
  -        AcceptableProtocolStack stack = new AcceptableProtocolStack();
  -        
  +        log.debug("Starting NodeServer.");
           SocketProtocol spt = new SocketProtocol();
           // TODO configurable.
           spt.setTimeout(10 * 1000);
           spt.setSelectorManager(selectorManager);
  -        stack.push(spt);
   
  -        BufferProtocol buffpt = new BufferProtocol();
  -        buffpt.setThreadPool(selectorManager.getThreadPool());
  -        stack.push(buffpt);
  -        
           ProtocolFactory pf = new ProtocolFactory();
           pf.setClockPool(clockPool);
           // TODO configurable.
           pf.setMaxAge(Long.MAX_VALUE);
           pf.setMaxInactivity(1 * 60 * 60 * 1000);
           pf.setReclaimPeriod(10 * 1000);
  -        pf.setTemplate(stack);
  +        pf.setTemplate(spt);
           pf.setAcceptedCallBack(this);
   
           serverSocketAcceptor.setAcceptorListener(pf);
  
  
  
  1.3       +3 -14     incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/network/RemoteNodeJoinerConnection.java
  
  Index: RemoteNodeJoinerConnection.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/remotenode/network/RemoteNodeJoinerConnection.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RemoteNodeJoinerConnection.java	3 Jun 2004 14:39:44 -0000	1.2
  +++ RemoteNodeJoinerConnection.java	17 Jul 2004 03:45:41 -0000	1.3
  @@ -23,10 +23,8 @@
   import org.apache.geronimo.messaging.io.IOContext;
   import org.apache.geronimo.messaging.remotenode.RemoteNodeConnection;
   import org.apache.geronimo.network.SelectorManager;
  -import org.apache.geronimo.network.protocol.BufferProtocol;
   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.network.protocol.SocketProtocol;
   
   /**
  @@ -62,23 +60,14 @@
           String hostName = nodeInfo.getAddress().getHostName();
           int port = nodeInfo.getPort();
   
  -        ProtocolStack stack = new ProtocolStack();
  -        
           SocketProtocol socketProtocol = new SocketProtocol();
           // TODO configurable.
           socketProtocol.setTimeout(10 * 1000);
           socketProtocol.setInterface(new InetSocketAddress(hostName, 0));
           socketProtocol.setAddress(new InetSocketAddress(hostName, port));
           socketProtocol.setSelectorManager(selectorManager);
  -        stack.push(socketProtocol);
  -        
  -        BufferProtocol buffpt = new BufferProtocol();
  -        buffpt.setThreadPool(selectorManager.getThreadPool());
  -        stack.push(buffpt);
  -
  -        stack.setup();
  -        
  -        return stack;
  +        socketProtocol.setup();
  +        return socketProtocol;
       }
   
   }
  
  
  

Mime
View raw message