commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket AbstractCompleteSocketStreamServer.java CompleteSocketCustomStreamServer.java CompleteSocketObjectStreamServer.java PartialSocketCustomStreamServer.java PartialSocketObjectStreamServer.java SocketStreamServerConnection.java
Date Tue, 12 Mar 2002 17:05:20 GMT
hammant     02/03/12 09:05:20

  Modified:    altrmi   tests.xml
               altrmi/src/java/org/apache/commons/altrmi/client/impl
                        DefaultConnectionListener.java
                        DefaultConnectionPinger.java
               altrmi/src/java/org/apache/commons/altrmi/client/impl/socket
                        AbstractSocketStreamInvocationHandler.java
               altrmi/src/java/org/apache/commons/altrmi/client/impl/stream
                        ClientCustomStreamReadWriter.java
                        StreamInvocationHandler.java
               altrmi/src/java/org/apache/commons/altrmi/server/impl
                        AbstractServer.java StreamServerConnection.java
               altrmi/src/java/org/apache/commons/altrmi/server/impl/beep
                        BEEPServerConnection.java
               altrmi/src/java/org/apache/commons/altrmi/server/impl/piped
                        AbstractPipedServer.java
                        PipedObjectStreamServer.java
               altrmi/src/java/org/apache/commons/altrmi/server/impl/socket
                        AbstractCompleteSocketStreamServer.java
                        CompleteSocketCustomStreamServer.java
                        CompleteSocketObjectStreamServer.java
                        PartialSocketCustomStreamServer.java
                        PartialSocketObjectStreamServer.java
                        SocketStreamServerConnection.java
  Added:       altrmi/lib avalon-framework-4.1.2.jar
  Log:
  Fixed reconnects for failing connections.  Start of logging on server side.
  
  Revision  Changes    Path
  1.10      +2 -1      jakarta-commons-sandbox/altrmi/tests.xml
  
  Index: tests.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/tests.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- tests.xml	11 Mar 2002 10:04:55 -0000	1.9
  +++ tests.xml	12 Mar 2002 17:05:19 -0000	1.10
  @@ -3,7 +3,7 @@
   
   <!--
           "Alt (to) RMI" component of the Jakarta Commons Subproject
  -        $Id: tests.xml,v 1.9 2002/03/11 10:04:55 hammant Exp $
  +        $Id: tests.xml,v 1.10 2002/03/12 17:05:19 hammant Exp $
   -->
   
   
  @@ -44,6 +44,7 @@
       <pathelement location="${build.home}/classes"/>
       <pathelement location="${build.home}/classes2"/>
       <pathelement location="lib/JSX0.9.8.1.jar"/>
  +    <pathelement location="lib/avalon-framework-4.1.2.jar"/>
     </path>  
     
     <path id="testB1.classpath">
  
  
  
  1.1                  jakarta-commons-sandbox/altrmi/lib/avalon-framework-4.1.2.jar
  
  	<<Binary file>>
  
  
  1.2       +4 -4      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/DefaultConnectionListener.java
  
  Index: DefaultConnectionListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/DefaultConnectionListener.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultConnectionListener.java	21 Jan 2002 15:38:20 -0000	1.1
  +++ DefaultConnectionListener.java	12 Mar 2002 17:05:19 -0000	1.2
  @@ -21,7 +21,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version * $Revision: 1.1 $
  + * @version * $Revision: 1.2 $
    */
   public class DefaultConnectionListener implements AltrmiConnectionListener {
   
  @@ -35,7 +35,6 @@
        *
        */
       public void methodCalled(final String methodSignature, final long duration) {
  -
           // do mothing in default impl, could do logging.
       }
   
  @@ -47,7 +46,7 @@
        *
        */
       public boolean methodLogging() {
  -        return false;
  +        return true;
       }
   
       /**
  @@ -75,7 +74,7 @@
           try {
               Thread.sleep(suggestedWaitMillis);
           } catch (InterruptedException ie) {
  -
  +            System.out.println("InterruptedException in Listener " + ie.getMessage());
               // TODO ?
           }
       }
  @@ -102,6 +101,7 @@
           try {
               Thread.sleep((2 ^ attempt) * 500);
           } catch (InterruptedException ie) {
  +            System.out.println("InterruptedException in Listener " + ie.getMessage());
   
               // TODO ?
           }
  
  
  
  1.3       +48 -4     jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/DefaultConnectionPinger.java
  
  Index: DefaultConnectionPinger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/DefaultConnectionPinger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultConnectionPinger.java	21 Jan 2002 20:10:34 -0000	1.2
  +++ DefaultConnectionPinger.java	12 Mar 2002 17:05:19 -0000	1.3
  @@ -22,14 +22,38 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version * $Revision: 1.2 $
  + * @version * $Revision: 1.3 $
    */
   public class DefaultConnectionPinger implements AltrmiConnectionPinger, Runnable {
   
       private AltrmiClientInvocationHandler mAltrmiInvocationHandler;
       private boolean mContinue = true;
       private Thread mThread;
  +    private int mPingInterval;
  +    private int mGiveupInterval;
   
  +    /**
  +     * Constructor DefaultConnectionPinger
  +     *
  +     *
  +     * @param pingIntervalSeconds
  +     * @param giveupIntervalSeconds
  +     *
  +     */
  +    public DefaultConnectionPinger(int pingIntervalSeconds, int giveupIntervalSeconds)
{
  +        mPingInterval = pingIntervalSeconds * 1000;
  +        mGiveupInterval = giveupIntervalSeconds * 1000;
  +    }
  +
  +    /**
  +     * Constructor DefaultConnectionPinger
  +     *
  +     *
  +     */
  +    public DefaultConnectionPinger() {
  +        mPingInterval = 10 * 1000;       // ten seconds
  +        mGiveupInterval = 100 * 1000;    // one hundred seconds.
  +    }
   
       /**
        * Method setAltrmiInvocationHandler
  @@ -37,7 +61,8 @@
        *
        *
        */
  -    public void setAltrmiInvocationHandler(AltrmiClientInvocationHandler altrmiInvocationHandler)
{
  +    public void setAltrmiInvocationHandler(
  +            AltrmiClientInvocationHandler altrmiInvocationHandler) {
           mAltrmiInvocationHandler = altrmiInvocationHandler;
       }
   
  @@ -47,11 +72,19 @@
        *
        */
       public void start() {
  +
           mThread = new Thread(this);
  +
           mThread.start();
       }
   
  +    /**
  +     * Method stop
  +     *
  +     *
  +     */
       public void stop() {
  +
           mContinue = false;
       }
   
  @@ -61,19 +94,30 @@
        *
        */
       public void run() {
  +
           try {
               while (mContinue) {
  -                Thread.sleep(10 * 1000);
  -                if ( mAltrmiInvocationHandler.getLastRealRequest() > (System.currentTimeMillis()
- (100 * 1000))) {
  +                Thread.sleep(mPingInterval);
  +
  +                if (mAltrmiInvocationHandler.getLastRealRequest()
  +                        > (System.currentTimeMillis() - (mGiveupInterval))) {
                       mAltrmiInvocationHandler.ping();
                   } else {
  +
  +                    //TODO should be restartable after reconnect of socket.
  +
  +                    mContinue = false;
  +
                       // if more than 100 seconds since last request, stop pinging
                       // Let the server do a disconnect according to its rules.
                   }
               }
           } catch (AltrmiConnectionClosedException cce) {
  +            System.out.println("Pinger Connection closed");
  +
               // no need to ping anymore.
           } catch (InterruptedException e) {
  +            System.out.println("Pinger Interrupted!");
   
               // do nothing.
           }
  
  
  
  1.8       +17 -5     jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/socket/AbstractSocketStreamInvocationHandler.java
  
  Index: AbstractSocketStreamInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/socket/AbstractSocketStreamInvocationHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractSocketStreamInvocationHandler.java	4 Mar 2002 12:10:49 -0000	1.7
  +++ AbstractSocketStreamInvocationHandler.java	12 Mar 2002 17:05:19 -0000	1.8
  @@ -30,20 +30,20 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public abstract class AbstractSocketStreamInvocationHandler extends StreamInvocationHandler
{
   
       private final String mHost;
       private final int mPort;
   
  -
       /**
        * Constructor SocketCustomStreamInvocationHandler
        *
        *
        * @param host
        * @param port
  +     * @param classLoader
        *
        * @throws AltrmiConnectionException
        *
  @@ -52,11 +52,12 @@
               throws AltrmiConnectionException {
   
           super(classLoader);
  +
           mHost = host;
           mPort = port;
   
           try {
  -            Socket socket = new Socket(host, port);
  +            Socket socket = makeSocket();
   
               setObjectReadWriter(createClientStreamReadWriter(socket.getInputStream(),
                                                                socket.getOutputStream()));
  @@ -74,15 +75,26 @@
       protected boolean tryReconnect() {
   
           try {
  -            Socket socket = new Socket(mHost, mPort);
  +            Socket socket = makeSocket();
   
               setObjectReadWriter(createClientStreamReadWriter(socket.getInputStream(),
  -                                                                 socket.getOutputStream()));
  +                                                             socket.getOutputStream()));
   
               return true;
           } catch (IOException ioe) {
  +
  +            // TODO log ?
               return false;
           }
  +    }
  +
  +    private Socket makeSocket() throws IOException {
  +
  +        Socket socket = new Socket(mHost, mPort);
  +
  +        socket.setSoTimeout(1000);
  +
  +        return socket;
       }
   
       protected abstract ClientStreamReadWriter createClientStreamReadWriter(
  
  
  
  1.5       +3 -4      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/stream/ClientCustomStreamReadWriter.java
  
  Index: ClientCustomStreamReadWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/stream/ClientCustomStreamReadWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClientCustomStreamReadWriter.java	4 Mar 2002 16:08:54 -0000	1.4
  +++ ClientCustomStreamReadWriter.java	12 Mar 2002 17:05:19 -0000	1.5
  @@ -25,7 +25,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   public class ClientCustomStreamReadWriter extends ClientStreamReadWriter {
   
  @@ -52,10 +52,9 @@
   
       protected synchronized AltrmiReply postRequest(AltrmiRequest altrmiRequest)
               throws IOException, ClassNotFoundException {
  -
           writeRequest(altrmiRequest);
  -
  -        return readReply();
  +        AltrmiReply r = readReply();
  +        return r;
       }
   
       private void writeRequest(AltrmiRequest altrmiRequest) throws IOException {
  
  
  
  1.8       +7 -3      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/stream/StreamInvocationHandler.java
  
  Index: StreamInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/stream/StreamInvocationHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StreamInvocationHandler.java	6 Mar 2002 19:34:46 -0000	1.7
  +++ StreamInvocationHandler.java	12 Mar 2002 17:05:19 -0000	1.8
  @@ -28,6 +28,7 @@
   import java.io.ObjectOutputStream;
   import java.io.ObjectInputStream;
   import java.io.EOFException;
  +import java.io.InterruptedIOException;
   
   import java.net.SocketException;
   
  @@ -37,7 +38,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public abstract class StreamInvocationHandler extends AbstractClientInvocationHandler {
   
  @@ -72,7 +73,8 @@
           mObjectReadWriter = objectReadWriter;
       }
   
  -    protected void requestWritten() {}
  +    protected void requestWritten() {
  +    }
   
       /**
        * Method handleInvocation
  @@ -106,7 +108,6 @@
                       again = false;
   
                       try {
  -
                           long t1 = System.currentTimeMillis();
   
                           reply = (AltrmiReply) mObjectReadWriter.postRequest(request);
  @@ -133,9 +134,11 @@
                       } catch (IOException ioe) {
                           if (ioe instanceof SocketException
                                   | ioe instanceof EOFException
  +                                | ioe instanceof InterruptedIOException
                                   | (ioe.getMessage() != null && ioe.getMessage().equals("Read
end dead") )
                                   ) {
                               int retryConnectTries = 0;
  +                            again = true;
   
                               while (!tryReconnect()) {
                                   mAltrmiConnectionListener.serviceAbend(retryConnectTries);
  @@ -168,6 +171,7 @@
               throw new AltrmiInvocationException("Class definition missing on Deserialization:
"
                                                   + e.getMessage());
           }
  +
       }
   
       /**
  
  
  
  1.21      +43 -13    jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/AbstractServer.java
  
  Index: AbstractServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/AbstractServer.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- AbstractServer.java	24 Feb 2002 11:04:33 -0000	1.20
  +++ AbstractServer.java	12 Mar 2002 17:05:19 -0000	1.21
  @@ -8,12 +8,17 @@
    */
   package org.apache.commons.altrmi.server.impl;
   
  +
  +
   import org.apache.commons.altrmi.common.AbstractMethodHandler;
   import org.apache.commons.altrmi.common.AltrmiReply;
   import org.apache.commons.altrmi.common.AltrmiRequest;
   import org.apache.commons.altrmi.common.MethodRequest;
   import org.apache.commons.altrmi.server.*;
   import org.apache.commons.altrmi.server.impl.adapters.InvocationHandlerAdapter;
  +import org.apache.avalon.framework.logger.Logger;
  +import org.apache.avalon.framework.logger.LogEnabled;
  +import org.apache.avalon.framework.logger.ConsoleLogger;
   
   import java.util.Vector;
   import java.util.Iterator;
  @@ -24,28 +29,57 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.20 $
  + * @version $Revision: 1.21 $
    */
  -public abstract class AbstractServer extends AbstractMethodHandler implements AltrmiServer
{
  -
  +public abstract class AbstractServer extends AbstractMethodHandler
  +        implements AltrmiServer, LogEnabled {
   
       private Vector mConnections = new Vector();
       protected InvocationHandlerAdapter mInovcationHandlerAdapter;
  +    private Logger mLogger;
       protected static final int SHUTTINGDOWN = 11;
       protected static final int STARTED = 22;
       protected static final int STOPPED = 33;
       protected static final int UNSTARTED = 44;
       protected int mState = UNSTARTED;
   
  +    /**
  +     * Constructor AbstractServer
  +     *
  +     *
  +     */
       public AbstractServer() {
           mInovcationHandlerAdapter = new InvocationHandlerAdapter();
       }
   
  +    /**
  +     * Constructor AbstractServer
  +     *
  +     *
  +     * @param inovcationHandlerAdapter
  +     *
  +     */
       public AbstractServer(InvocationHandlerAdapter inovcationHandlerAdapter) {
           mInovcationHandlerAdapter = inovcationHandlerAdapter;
       }
   
  +    /**
  +     * Method enableLogging
  +     *
  +     *
  +     * @param logger
  +     *
  +     */
  +    public void enableLogging(Logger logger) {
  +        mLogger = logger;
  +    }
   
  +    public synchronized Logger getLogger() {
  +        if (mLogger == null) {
  +            mLogger = new ConsoleLogger();
  +        }
  +        return mLogger;
  +    }
   
       /**
        * Method setClassRetriever
  @@ -81,13 +115,9 @@
        *
        */
       public AltrmiReply handleInvocation(AltrmiRequest request) {
  -
           return mInovcationHandlerAdapter.handleInvocation(request);
  -
       }
   
  -
  -
       /**
        * Method suspend
        *
  @@ -142,7 +172,7 @@
        */
       public void publish(Object impl, String asName, Class classOrInterfaceToExpose)
               throws PublicationException {
  -        mInovcationHandlerAdapter.publish(impl,asName,classOrInterfaceToExpose);
  +        mInovcationHandlerAdapter.publish(impl, asName, classOrInterfaceToExpose);
       }
   
       /**
  @@ -151,12 +181,10 @@
        *
        * @param impl
        * @param asName
  -     * @param classOrInterfaceToExpose
  -     * @param additionalFacade
  +     * @param publicationDescription
        *
        */
  -    public void publish(
  -            Object impl, String asName, PublicationDescription publicationDescription)
  +    public void publish(Object impl, String asName, PublicationDescription publicationDescription)
               throws PublicationException {
           mInovcationHandlerAdapter.publish(impl, asName, publicationDescription);
       }
  @@ -197,7 +225,9 @@
        * @return
        *
        */
  -    public MethodInvocationHandler getMethodInvocationHandler(MethodRequest mr, String
objectName) {
  +    public MethodInvocationHandler getMethodInvocationHandler(MethodRequest mr,
  +                                                              String objectName) {
           return mInovcationHandlerAdapter.getMethodInvocationHandler(mr, objectName);
       }
  +
   }
  
  
  
  1.8       +18 -10    jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/StreamServerConnection.java
  
  Index: StreamServerConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/StreamServerConnection.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StreamServerConnection.java	28 Jan 2002 14:04:54 -0000	1.7
  +++ StreamServerConnection.java	12 Mar 2002 17:05:19 -0000	1.8
  @@ -14,12 +14,15 @@
   import org.apache.commons.altrmi.common.AltrmiReply;
   import org.apache.commons.altrmi.common.EndConnectionReply;
   import org.apache.commons.altrmi.server.AltrmiServerConnection;
  +import org.apache.avalon.framework.logger.LogEnabled;
  +import org.apache.avalon.framework.logger.Logger;
   
   import java.io.ObjectInputStream;
   import java.io.ObjectOutputStream;
   import java.io.IOException;
   import java.io.OutputStream;
   import java.io.InputStream;
  +import java.io.InterruptedIOException;
   
   import java.net.Socket;
   import java.net.SocketException;
  @@ -30,13 +33,15 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
  -public abstract class StreamServerConnection implements Runnable, AltrmiServerConnection
{
  +public abstract class StreamServerConnection implements Runnable, AltrmiServerConnection,
LogEnabled {
   
       private AbstractServer mAbstractServer;
       private boolean mEndConnection = false;
       private ServerStreamReadWriter mReadWriter;
  +    private Logger mLogger;
  +
   
       /**
        * Constructor StreamServerConnection
  @@ -52,6 +57,10 @@
           mReadWriter = readWriter;
       }
   
  +    public void enableLogging(Logger logger) {
  +        mLogger = logger;
  +    }
  +
       /**
        * Method run
        *
  @@ -87,21 +96,21 @@
                       more = false;
                       if (ioe instanceof SocketException
                               | ioe.getClass().getName().equals("java.net.SocketTimeoutException")
  +                            | ioe instanceof InterruptedIOException
                               | ioe.getMessage().equals("Write end dead")
  -                            | ioe.getMessage().equals("Pipe broken"))
  -                    {
  +                            | ioe.getMessage().equals("Pipe broken")) {
                           // TODO implement implementation indepandant logger
  -                        System.out.println("One Connection closed.");
  +                        System.out.println("--> " + this);
  +                        mLogger.info("One Connection closed.");
                       } else {
  -                        System.out.println("IOE in ObjStream");
  -                        ioe.printStackTrace();
  +                        mLogger.error("Unexpected IOE in StreamServerConnection #1", ioe);
                       }
                   }
               }
           } catch (IOException e) {
  -            e.printStackTrace();
  +            mLogger.error("Unexpected IOE in StreamServerConnection #2", e);
           } catch (ClassNotFoundException e) {
  -            e.printStackTrace();
  +            mLogger.error("Unexpected ClassNotFoundException in StreamServerConnection",
e);
           }
   
           mAbstractServer.connectionCompleted(this);
  @@ -123,5 +132,4 @@
        */
       protected abstract void killConnection();
   
  -    //protected abstract ServerStreamReadWriter createServerStreamReadWriter(InputStream
in, OutputStream out) throws IOException;
   }
  
  
  
  1.2       +0 -1      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/beep/BEEPServerConnection.java
  
  Index: BEEPServerConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/beep/BEEPServerConnection.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BEEPServerConnection.java	27 Feb 2002 14:47:36 -0000	1.1
  +++ BEEPServerConnection.java	12 Mar 2002 17:05:19 -0000	1.2
  @@ -13,7 +13,6 @@
   import org.apache.commons.altrmi.common.AltrmiRequest;
   import org.apache.commons.altrmi.common.AltrmiReply;
   import org.apache.commons.altrmi.common.EndConnectionReply;
  -import org.apache.commons.altrmi.server.AltrmiServerConnection;
   import org.apache.commons.altrmi.server.impl.AbstractServer;
   import org.apache.commons.altrmi.server.impl.StreamServerConnection;
   import org.apache.commons.altrmi.server.impl.ServerStreamReadWriter;
  @@ -33,7 +32,7 @@
    *
    *
    * @author Vinay Chandrasekharan
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class BEEPServerConnection extends StreamServerConnection{
   
  
  
  
  1.2       +2 -4      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/piped/AbstractPipedServer.java
  
  Index: AbstractPipedServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/piped/AbstractPipedServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractPipedServer.java	17 Jan 2002 12:14:30 -0000	1.1
  +++ AbstractPipedServer.java	12 Mar 2002 17:05:19 -0000	1.2
  @@ -11,9 +11,7 @@
   
   
   import org.apache.commons.altrmi.server.impl.AbstractServer;
  -import org.apache.commons.altrmi.server.impl.StreamServerConnection;
   import org.apache.commons.altrmi.server.impl.ServerStreamReadWriter;
  -import org.apache.commons.altrmi.server.impl.socket.SocketStreamServerConnection;
   import org.apache.commons.altrmi.common.AltrmiConnectionException;
   
   import java.io.PipedInputStream;
  @@ -26,7 +24,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public abstract class AbstractPipedServer extends AbstractServer {
   
  @@ -65,7 +63,7 @@
   
               PipedStreamServerConnection pssc = new PipedStreamServerConnection(this, pIS,
pOS,
                                                      ssrw);
  -
  +            pssc.enableLogging(getLogger());
               Thread thread = new Thread(pssc);
   
               thread.start();
  
  
  
  1.2       +1 -2      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/piped/PipedObjectStreamServer.java
  
  Index: PipedObjectStreamServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/piped/PipedObjectStreamServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PipedObjectStreamServer.java	17 Jan 2002 12:14:30 -0000	1.1
  +++ PipedObjectStreamServer.java	12 Mar 2002 17:05:19 -0000	1.2
  @@ -11,7 +11,6 @@
   
   
   import org.apache.commons.altrmi.server.impl.AbstractServer;
  -import org.apache.commons.altrmi.server.impl.StreamServerConnection;
   import org.apache.commons.altrmi.server.impl.ServerStreamReadWriter;
   import org.apache.commons.altrmi.server.impl.ServerObjectStreamReadWriter;
   import org.apache.commons.altrmi.common.AltrmiConnectionException;
  @@ -26,7 +25,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class PipedObjectStreamServer extends AbstractPipedServer {
   
  
  
  
  1.3       +7 -3      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/AbstractCompleteSocketStreamServer.java
  
  Index: AbstractCompleteSocketStreamServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/AbstractCompleteSocketStreamServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractCompleteSocketStreamServer.java	4 Feb 2002 12:29:03 -0000	1.2
  +++ AbstractCompleteSocketStreamServer.java	12 Mar 2002 17:05:19 -0000	1.3
  @@ -13,11 +13,12 @@
   import org.apache.commons.altrmi.server.AltrmiServer;
   import org.apache.commons.altrmi.server.AltrmiServerException;
   import org.apache.commons.altrmi.server.impl.AbstractServer;
  -import org.apache.commons.altrmi.server.impl.StreamServerConnection;
   import org.apache.commons.altrmi.server.impl.ServerStreamReadWriter;
   import org.apache.commons.altrmi.server.impl.adapters.InvocationHandlerAdapter;
   import org.apache.commons.altrmi.common.AltrmiRequest;
   import org.apache.commons.altrmi.common.AltrmiReply;
  +import org.apache.avalon.framework.logger.LogEnabled;
  +import org.apache.avalon.framework.logger.Logger;
   
   import java.net.ServerSocket;
   import java.net.Socket;
  @@ -30,7 +31,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public abstract class AbstractCompleteSocketStreamServer extends AbstractServer
           implements Runnable {
  @@ -38,6 +39,7 @@
       private ServerSocket mServerSocket;
       private Thread mThread;
   
  +
       /**
        * Constructor CompleteSocketObjectStreamServer
        *
  @@ -57,6 +59,7 @@
           }
       }
   
  +
       /**
        * Constructor AbstractCompleteSocketStreamServer
        *
  @@ -93,7 +96,7 @@
                   Socket sock = mServerSocket.accept();
   
                   // see http://developer.java.sun.com/developer/bugParade/bugs/4508149.html
  -                sock.setSoTimeout(360000);
  +                sock.setSoTimeout(36000);
   
                   ServerStreamReadWriter ssrw = createServerStreamReadWriter();
   
  @@ -102,6 +105,7 @@
                   SocketStreamServerConnection sssc = new SocketStreamServerConnection(this,
sock,
                                                           sock.getInputStream(),
                                                           sock.getOutputStream(), ssrw);
  +                sssc.enableLogging(getLogger());
                   Thread thread = new Thread(sssc);
   
                   thread.start();
  
  
  
  1.3       +1 -2      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/CompleteSocketCustomStreamServer.java
  
  Index: CompleteSocketCustomStreamServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/CompleteSocketCustomStreamServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CompleteSocketCustomStreamServer.java	4 Feb 2002 12:29:03 -0000	1.2
  +++ CompleteSocketCustomStreamServer.java	12 Mar 2002 17:05:19 -0000	1.3
  @@ -13,7 +13,6 @@
   import org.apache.commons.altrmi.server.AltrmiServer;
   import org.apache.commons.altrmi.server.AltrmiServerException;
   import org.apache.commons.altrmi.server.impl.AbstractServer;
  -import org.apache.commons.altrmi.server.impl.StreamServerConnection;
   import org.apache.commons.altrmi.server.impl.ServerStreamReadWriter;
   import org.apache.commons.altrmi.server.impl.ServerCustomStreamReadWriter;
   import org.apache.commons.altrmi.server.impl.adapters.InvocationHandlerAdapter;
  @@ -31,7 +30,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class CompleteSocketCustomStreamServer extends AbstractCompleteSocketStreamServer
{
   
  
  
  
  1.6       +1 -2      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/CompleteSocketObjectStreamServer.java
  
  Index: CompleteSocketObjectStreamServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/CompleteSocketObjectStreamServer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CompleteSocketObjectStreamServer.java	18 Jan 2002 17:33:07 -0000	1.5
  +++ CompleteSocketObjectStreamServer.java	12 Mar 2002 17:05:19 -0000	1.6
  @@ -13,7 +13,6 @@
   import org.apache.commons.altrmi.server.AltrmiServer;
   import org.apache.commons.altrmi.server.AltrmiServerException;
   import org.apache.commons.altrmi.server.impl.AbstractServer;
  -import org.apache.commons.altrmi.server.impl.StreamServerConnection;
   import org.apache.commons.altrmi.server.impl.ServerStreamReadWriter;
   import org.apache.commons.altrmi.server.impl.ServerObjectStreamReadWriter;
   import org.apache.commons.altrmi.common.AltrmiRequest;
  @@ -30,7 +29,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public class CompleteSocketObjectStreamServer extends AbstractCompleteSocketStreamServer
{
   
  
  
  
  1.2       +3 -3      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/PartialSocketCustomStreamServer.java
  
  Index: PartialSocketCustomStreamServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/PartialSocketCustomStreamServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PartialSocketCustomStreamServer.java	4 Feb 2002 12:29:03 -0000	1.1
  +++ PartialSocketCustomStreamServer.java	12 Mar 2002 17:05:19 -0000	1.2
  @@ -27,7 +27,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class PartialSocketCustomStreamServer extends AbstractServer {
   
  @@ -64,7 +64,7 @@
   
           // see http://developer.java.sun.com/developer/bugParade/bugs/4508149.html
           try {
  -            sock.setSoTimeout(360000);
  +            sock.setSoTimeout(36000);
           } catch (SocketException se) {
               se.printStackTrace();
           }
  @@ -78,7 +78,7 @@
                   SocketStreamServerConnection sssc = new SocketStreamServerConnection(this,
sock,
                                                           sock.getInputStream(),
                                                           sock.getOutputStream(), ssrw);
  -
  +                sssc.enableLogging(getLogger());
                   sssc.run();
               }
           } catch (IOException ioe) {
  
  
  
  1.4       +3 -3      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/PartialSocketObjectStreamServer.java
  
  Index: PartialSocketObjectStreamServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/PartialSocketObjectStreamServer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PartialSocketObjectStreamServer.java	17 Jan 2002 12:14:30 -0000	1.3
  +++ PartialSocketObjectStreamServer.java	12 Mar 2002 17:05:19 -0000	1.4
  @@ -26,7 +26,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class PartialSocketObjectStreamServer extends AbstractServer {
   
  @@ -49,7 +49,7 @@
   
           // see http://developer.java.sun.com/developer/bugParade/bugs/4508149.html
           try {
  -            sock.setSoTimeout(360000);
  +            sock.setSoTimeout(36000);
           } catch (SocketException se) {
               se.printStackTrace();
           }
  @@ -63,7 +63,7 @@
                   SocketStreamServerConnection sssc = new SocketStreamServerConnection(this,
sock,
                                                           sock.getInputStream(),
                                                           sock.getOutputStream(), ssrw);
  -
  +                sssc.enableLogging(getLogger());
                   sssc.run();
               }
           } catch (IOException ioe) {
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/SocketStreamServerConnection.java
  
  Index: SocketStreamServerConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/socket/SocketStreamServerConnection.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SocketStreamServerConnection.java	17 Jan 2002 12:14:30 -0000	1.1
  +++ SocketStreamServerConnection.java	12 Mar 2002 17:05:19 -0000	1.2
  @@ -22,11 +22,11 @@
   
   
   /**
  - * Class SocketCustomStreamServerConnection
  + * Class SocketStreamServerConnection
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class SocketStreamServerConnection extends StreamServerConnection {
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message