hammant     2003/01/11 08:10:09

  Modified:    altrmi/src/java/org/apache/excalibur/altrmi/server
                        ServerException.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl
                        AbstractServer.java ServerStreamReadWriter.java
                        StreamServerConnection.java
               
altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/socket
                        PartialCallbackEnabledSocketCustomStreamServer.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/direct
                        DirectMarshalledServer.java DirectServer.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/http
                        CustomHttpServer.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped
                        AbstractPipedServer.java
                        PipedCustomStreamServer.java
                        PipedObjectStreamServer.java
                        PipedStreamServerConnection.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/rmi
                        RmiServer.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket
                        AbstractCompleteSocketStreamServer.java
                        AbstractPartialSocketStreamServer.java
                        SocketStreamServerConnection.java
  Log:
  Improvements to logging and exception throwing.
  
  Revision  Changes    Path
  1.2       +18 -2     
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/ServerException.java
  
  Index: ServerException.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/ServerException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServerException.java      5 Jan 2003 23:24:57 -0000       1.1
  +++ ServerException.java      11 Jan 2003 16:10:08 -0000      1.2
  @@ -7,6 +7,8 @@
    */
   package org.apache.excalibur.altrmi.server;
   
  +import org.apache.avalon.framework.CascadingException;
  +
   /**
    * Class ServerException
    *
  @@ -14,7 +16,7 @@
    * @author Paul Hammant <a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>
    * @version $Revision$
    */
  -public class ServerException extends Exception
  +public class ServerException extends CascadingException
   {
   
       /**
  @@ -28,5 +30,19 @@
       {
           super( message );
       }
  +
  +    /**
  +     * Construct an ServerException with a message
  +     *
  +     *
  +     * @param message the message
  +     * @param throwable the exception
  +     *
  +     */
  +    public ServerException(String message, Throwable throwable)
  +    {
  +        super(message, throwable);
  +    }
  +
   
   }
  
  
  
  1.12      +18 -27    
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/AbstractServer.java
  
  Index: AbstractServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/AbstractServer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractServer.java       6 Jan 2003 23:42:11 -0000       1.11
  +++ AbstractServer.java       11 Jan 2003 16:10:08 -0000      1.12
  @@ -43,7 +43,7 @@
       /**
        * The invocation handler
        */
  -    private InvocationHandlerAdapter m_inovcationHandlerAdapter;
  +    private InvocationHandlerAdapter m_invocationHandlerAdapter;
   
       /**
        * The logger
  @@ -56,24 +56,15 @@
       private int m_state = UNSTARTED;
   
       /**
  -     * Construct an AbstractServer
  -     *
  -     */
  -    public AbstractServer()
  -    {
  -        m_inovcationHandlerAdapter = new InvocationHandlerAdapter();
  -    }
  -
  -    /**
        * Construct a AbstractServer
        *
        *
  -     * @param inovcationHandlerAdapter The invocation handler adapter to use.
  +     * @param invocationHandlerAdapter The invocation handler adapter to use.
        *
        */
  -    public AbstractServer( InvocationHandlerAdapter inovcationHandlerAdapter 
)
  +    public AbstractServer( InvocationHandlerAdapter invocationHandlerAdapter 
)
       {
  -        m_inovcationHandlerAdapter = inovcationHandlerAdapter;
  +        m_invocationHandlerAdapter = invocationHandlerAdapter;
       }
   
       /**
  @@ -117,7 +108,7 @@
        */
       public final void setClassRetriever( ClassRetriever classRetriever )
       {
  -        m_inovcationHandlerAdapter.setClassRetriever( classRetriever );
  +        m_invocationHandlerAdapter.setClassRetriever( classRetriever );
       }
   
       /**
  @@ -130,7 +121,7 @@
        */
       public final void setAuthenticator( Authenticator altrmiAuthenticator )
       {
  -        m_inovcationHandlerAdapter.setAuthenticator( altrmiAuthenticator );
  +        m_invocationHandlerAdapter.setAuthenticator( altrmiAuthenticator );
       }
   
       /**
  @@ -144,7 +135,7 @@
        */
       public Reply handleInvocation( Request request )
       {
  -        return m_inovcationHandlerAdapter.handleInvocation( request );
  +        return m_invocationHandlerAdapter.handleInvocation( request );
       }
   
       /**
  @@ -153,7 +144,7 @@
        */
       public void suspend()
       {
  -        m_inovcationHandlerAdapter.suspend();
  +        m_invocationHandlerAdapter.suspend();
       }
   
       /**
  @@ -162,7 +153,7 @@
        */
       public void resume()
       {
  -        m_inovcationHandlerAdapter.resume();
  +        m_invocationHandlerAdapter.resume();
       }
   
       /**
  @@ -213,7 +204,7 @@
       public void publish( Object impl, String asName, Class interfaceToExpose 
)
           throws PublicationException
       {
  -        m_inovcationHandlerAdapter.publish( impl, asName, interfaceToExpose 
);
  +        m_invocationHandlerAdapter.publish( impl, asName, interfaceToExpose 
);
       }
   
       /**
  @@ -229,7 +220,7 @@
       public void publish( Object impl, String asName, PublicationDescription 
publicationDescription )
           throws PublicationException
       {
  -        m_inovcationHandlerAdapter.publish( impl, asName, 
publicationDescription );
  +        m_invocationHandlerAdapter.publish( impl, asName, 
publicationDescription );
       }
   
       /**
  @@ -243,7 +234,7 @@
        */
       public void unPublish( Object impl, String asName ) throws 
PublicationException
       {
  -        m_inovcationHandlerAdapter.unPublish( impl, asName );
  +        m_invocationHandlerAdapter.unPublish( impl, asName );
       }
   
       /**
  @@ -259,7 +250,7 @@
       public void replacePublished( Object oldImpl, String publishedName, 
Object withImpl )
           throws PublicationException
       {
  -        m_inovcationHandlerAdapter.replacePublished( oldImpl, publishedName, 
withImpl );
  +        m_invocationHandlerAdapter.replacePublished( oldImpl, publishedName, 
withImpl );
       }
   
       /**
  @@ -275,11 +266,11 @@
       public MethodInvocationHandler getMethodInvocationHandler( MethodRequest 
methodRequest,
                                                                  String 
objectName )
       {
  -        return m_inovcationHandlerAdapter.getMethodInvocationHandler( 
methodRequest, objectName );
  +        return m_invocationHandlerAdapter.getMethodInvocationHandler( 
methodRequest, objectName );
       }
   
       /**
  -     * Get the MethodInvocationHandler for a prticular published name.
  +     * Get the MethodInvocationHandler for a particular published name.
        *
        *
        * @param publishedName The published name.
  @@ -289,7 +280,7 @@
        */
       public MethodInvocationHandler getMethodInvocationHandler( String 
publishedName )
       {
  -        return m_inovcationHandlerAdapter.getMethodInvocationHandler( 
publishedName );
  +        return m_invocationHandlerAdapter.getMethodInvocationHandler( 
publishedName );
       }
   
       /**
  @@ -298,7 +289,7 @@
        */
       public InvocationHandlerAdapter getInovcationHandlerAdapter()
       {
  -        return m_inovcationHandlerAdapter;
  +        return m_invocationHandlerAdapter;
       }
   
   
  
  
  
  1.9       +3 -3      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/ServerStreamReadWriter.java
  
  Index: ServerStreamReadWriter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/ServerStreamReadWriter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ServerStreamReadWriter.java       9 Jan 2003 22:55:11 -0000       1.8
  +++ ServerStreamReadWriter.java       11 Jan 2003 16:10:08 -0000      1.9
  @@ -77,7 +77,7 @@
           }
           catch ( IOException e )
           {
  -            getLogger().error( "Failed closing an AltRMI connection input 
stream: ", e);
  +            getLogger().error( "ServerStreamReadWriter.close(): Failed 
closing an AltRMI connection input stream: ", e);
           }
           
           try
  @@ -86,7 +86,7 @@
           }
           catch ( IOException e )
           {
  -            getLogger().error( "Failed closing an AltRMI connection output 
stream: ", e);
  +            getLogger().error( "ServerStreamReadWriter.close(): Failed 
closing an AltRMI connection output stream: ", e);
           }
       }
   
  
  
  
  1.12      +7 -8      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/StreamServerConnection.java
  
  Index: StreamServerConnection.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/StreamServerConnection.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StreamServerConnection.java       5 Jan 2003 23:24:44 -0000       1.11
  +++ StreamServerConnection.java       11 Jan 2003 16:10:08 -0000      1.12
  @@ -27,7 +27,7 @@
    * @author Paul Hammant <a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>
    * @version $Revision$
    */
  -public abstract class StreamServerConnection extends AbstractLogEnabled
  +public abstract class StreamServerConnection  extends AbstractLogEnabled
           implements Runnable, ServerConnection
   {
   
  @@ -102,14 +102,13 @@
                   catch (BadConnectionException bce)
                   {
                       more = false;
  -                    getLogger().error("Bad connection in 
StreamServerConnection #0", bce);
  +                    getLogger().error("StreamServerConnection.run(): Bad 
connection #0", bce);
                       m_readWriter.close();
                   }
                   catch (ConnectionException ace)
                   {
                       more = false;
  -                    getLogger().error("Unexpected ConnectionException "
  -                            + "in StreamServerConnection #0", ace);
  +                    getLogger().error("StreamServerConnection.run(): 
Unexpected ConnectionException #0", ace);
                       m_readWriter.close();
                   }
                   catch (IOException ioe)
  @@ -128,7 +127,7 @@
                       }
                       else
                       {
  -                        getLogger().error("Unexpected IOE in 
StreamServerConnection #1", ioe);
  +                        getLogger().error("StreamServerConnection.run(): 
Unexpected IOE #1", ioe);
                           m_readWriter.close();
                       }
                   }
  @@ -136,11 +135,11 @@
           }
           catch (IOException e)
           {
  -            getLogger().error("Unexpected IOE in StreamServerConnection #2", 
e);
  +            getLogger().error("StreamServerConnection.run(): Unexpected IOE 
#2", e);
           }
           catch (ClassNotFoundException e)
           {
  -            getLogger().error("Unexpected ClassNotFoundException in 
StreamServerConnection", e);
  +            getLogger().error("StreamServerConnection.run(): Unexpected 
ClassNotFoundException", e);
           }
   
           m_abstractServer.connectionCompleted(this);
  
  
  
  1.4       +4 -4      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/socket/PartialCallbackEnabledSocketCustomStreamServer.java
  
  Index: PartialCallbackEnabledSocketCustomStreamServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/socket/PartialCallbackEnabledSocketCustomStreamServer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PartialCallbackEnabledSocketCustomStreamServer.java       24 Apr 2002 
12:43:01 -0000      1.3
  +++ PartialCallbackEnabledSocketCustomStreamServer.java       11 Jan 2003 
16:10:08 -0000      1.4
  @@ -35,13 +35,13 @@
        * Constructor PartialCallbackEnabledSocketCustomStreamServer
        *
        *
  -     * @param inovcationHandlerAdapter
  +     * @param invocationHandlerAdapter
        *
        */
       public PartialCallbackEnabledSocketCustomStreamServer(
  -        InvocationHandlerAdapter inovcationHandlerAdapter )
  +        InvocationHandlerAdapter invocationHandlerAdapter )
       {
  -        super( inovcationHandlerAdapter );
  +        super( invocationHandlerAdapter );
       }
   
       /*
  
  
  
  1.6       +8 -10     
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/direct/DirectMarshalledServer.java
  
  Index: DirectMarshalledServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/direct/DirectMarshalledServer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DirectMarshalledServer.java       5 Jan 2003 23:24:45 -0000       1.5
  +++ DirectMarshalledServer.java       11 Jan 2003 16:10:08 -0000      1.6
  @@ -35,6 +35,7 @@
        */
       public DirectMarshalledServer()
       {
  +        super(new InvocationHandlerAdapter());
           m_marshalledInovcationHandlerAdapter = new 
MarshalledInvocationHandlerAdapter( this );
       }
   
  @@ -42,14 +43,12 @@
        * Constructor DirectMarshalledServer for use with pre-exiting 
InvocationHandlerAdapter.
        *
        *
  -     * @param inovcationHandlerAdapter
  +     * @param invocationHandlerAdapter
        *
        */
  -    public DirectMarshalledServer( InvocationHandlerAdapter 
inovcationHandlerAdapter )
  +    public DirectMarshalledServer( InvocationHandlerAdapter 
invocationHandlerAdapter )
       {
  -
  -        super( inovcationHandlerAdapter );
  -
  +        super(invocationHandlerAdapter);
           m_marshalledInovcationHandlerAdapter = new 
MarshalledInvocationHandlerAdapter( this );
       }
   
  @@ -57,17 +56,16 @@
        * Constructor DirectMarshalledServer for use with pre-exiting 
InvocationHandlerAdapter and MarshalledInvocationHandler
        *
        *
  -     * @param inovcationHandlerAdapter
  +     * @param invocationHandlerAdapter
        * @param marshalledInovcationHandlerAdapter
        *
        */
       public DirectMarshalledServer(
  -        InvocationHandlerAdapter inovcationHandlerAdapter,
  +        InvocationHandlerAdapter invocationHandlerAdapter,
           MarshalledInvocationHandlerAdapter 
marshalledInovcationHandlerAdapter )
       {
   
  -        super( inovcationHandlerAdapter );
  -
  +        super( invocationHandlerAdapter );
           m_marshalledInovcationHandlerAdapter = 
marshalledInovcationHandlerAdapter;
       }
   
  
  
  
  1.5       +5 -4      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/direct/DirectServer.java
  
  Index: DirectServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/direct/DirectServer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DirectServer.java 5 Jan 2003 23:24:45 -0000       1.4
  +++ DirectServer.java 11 Jan 2003 16:10:08 -0000      1.5
  @@ -30,18 +30,19 @@
        */
       public DirectServer()
       {
  +        this(new InvocationHandlerAdapter());
       }
   
       /**
        * Constructor DirectServer for use with pre-exiting 
InvocationHandlerAdapter.
        *
        *
  -     * @param inovcationHandlerAdapter
  +     * @param invocationHandlerAdapter
        *
        */
  -    public DirectServer( InvocationHandlerAdapter inovcationHandlerAdapter )
  +    public DirectServer( InvocationHandlerAdapter invocationHandlerAdapter )
       {
  -        super( inovcationHandlerAdapter );
  +        super( invocationHandlerAdapter );
       }
   
       /**
  
  
  
  1.3       +2 -2      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/http/CustomHttpServer.java
  
  Index: CustomHttpServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/http/CustomHttpServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CustomHttpServer.java     5 Jan 2003 23:24:46 -0000       1.2
  +++ CustomHttpServer.java     11 Jan 2003 16:10:09 -0000      1.3
  @@ -38,7 +38,7 @@
        */
       public CustomHttpServer() throws ServerException
       {
  -        super();
  +        this(new InvocationHandlerAdapter());
   //        new RegistryHelper().put("/.altrmi/optimizations/port=" + port,
   //                new 
CompleteSocketCustomStreamPipedBinder(super.getInovcationHandlerAdapter()));
       }
  
  
  
  1.7       +5 -4      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped/AbstractPipedServer.java
  
  Index: AbstractPipedServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped/AbstractPipedServer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractPipedServer.java  5 Jan 2003 23:24:46 -0000       1.6
  +++ AbstractPipedServer.java  11 Jan 2003 16:10:09 -0000      1.7
  @@ -29,14 +29,15 @@
        * Construct a Piped Server with no prexisting InvocationHandlerAdapter.
        */
       public AbstractPipedServer() {
  +        this (new InvocationHandlerAdapter());
       }
   
       /**
        * Construct a Piped Server with a prexisting InvocationHandlerAdapter.
  -     * @param inovcationHandlerAdapter the invocation handler adapter.
  +     * @param invocationHandlerAdapter the invocation handler adapter.
        */
  -    public AbstractPipedServer(InvocationHandlerAdapter 
inovcationHandlerAdapter) {
  -        super(inovcationHandlerAdapter);
  +    public AbstractPipedServer(InvocationHandlerAdapter 
invocationHandlerAdapter) {
  +        super(invocationHandlerAdapter);
       }
   
       /**
  
  
  
  1.3       +4 -4      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped/PipedCustomStreamServer.java
  
  Index: PipedCustomStreamServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped/PipedCustomStreamServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PipedCustomStreamServer.java      13 Oct 2002 11:54:27 -0000      1.2
  +++ PipedCustomStreamServer.java      11 Jan 2003 16:10:09 -0000      1.3
  @@ -29,10 +29,10 @@
   
       /**
        * Construct a Piped Custom Server with a prexisting 
InvocationHandlerAdapter.
  -     * @param inovcationHandlerAdapter the invocation handler adapter.
  +     * @param invocationHandlerAdapter the invocation handler adapter.
        */
  -    public PipedCustomStreamServer(InvocationHandlerAdapter 
inovcationHandlerAdapter) {
  -        super(inovcationHandlerAdapter);
  +    public PipedCustomStreamServer(InvocationHandlerAdapter 
invocationHandlerAdapter) {
  +        super(invocationHandlerAdapter);
       }
   
       protected ServerStreamReadWriter createServerStreamReadWriter()
  
  
  
  1.5       +4 -4      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped/PipedObjectStreamServer.java
  
  Index: PipedObjectStreamServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped/PipedObjectStreamServer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PipedObjectStreamServer.java      13 Oct 2002 11:54:27 -0000      1.4
  +++ PipedObjectStreamServer.java      11 Jan 2003 16:10:09 -0000      1.5
  @@ -29,11 +29,11 @@
   
       /**
        * Construct a Piped Object Server with a prexisting 
InvocationHandlerAdapter.
  -     * @param inovcationHandlerAdapter the invocation handler adapter.
  +     * @param invocationHandlerAdapter the invocation handler adapter.
        */
   
  -    public PipedObjectStreamServer(InvocationHandlerAdapter 
inovcationHandlerAdapter) {
  -        super(inovcationHandlerAdapter);
  +    public PipedObjectStreamServer(InvocationHandlerAdapter 
invocationHandlerAdapter) {
  +        super(invocationHandlerAdapter);
       }
   
       protected ServerStreamReadWriter createServerStreamReadWriter()
  
  
  
  1.5       +3 -3      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped/PipedStreamServerConnection.java
  
  Index: PipedStreamServerConnection.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/piped/PipedStreamServerConnection.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PipedStreamServerConnection.java  4 Jan 2003 22:17:20 -0000       1.4
  +++ PipedStreamServerConnection.java  11 Jan 2003 16:10:09 -0000      1.5
  @@ -67,7 +67,7 @@
           }
           catch( IOException e )
           {
  -            getLogger().error("Some problem during closing of Input Stream", 
e);
  +            getLogger().error("PipedStreamServerConnection.killConnection(): 
Some problem during closing of Input Stream", e);
           }
   
           try
  @@ -76,7 +76,7 @@
           }
           catch( IOException e )
           {
  -            getLogger().error("Some problem during closing of Output 
Stream", e);
  +            getLogger().error("PipedStreamServerConnection.killConnection(): 
Some problem during closing of Output Stream", e);
           }
       }
   }
  
  
  
  1.7       +5 -8      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/rmi/RmiServer.java
  
  Index: RmiServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/rmi/RmiServer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RmiServer.java    9 Jan 2003 22:55:12 -0000       1.6
  +++ RmiServer.java    11 Jan 2003 16:10:09 -0000      1.7
  @@ -54,8 +54,7 @@
        */
       public RmiServer( String host, int port )
       {
  -        m_host = host;
  -        m_port = port;
  +        this (new InvocationHandlerAdapter(), host, port);
       }
   
       /**
  @@ -96,9 +95,7 @@
           }
           catch( RemoteException re )
           {
  -            getLogger().error("Error starting RMI server",re);
  -            throw new ServerException( "Some problem setting up server : "
  -                                             + re.getMessage() );
  +            throw new ServerException( "Some problem setting up RMI server", 
re);
           }
       }
   
  @@ -119,11 +116,11 @@
           }
           catch( RemoteException re )
           {
  -            getLogger().error("Error stopping RMI server",re);
  +            getLogger().error("RmiServer.stop(): Error stopping RMI 
server",re);
           }
           catch( NotBoundException nbe )
           {
  -            getLogger().error("Error stopping RMI server",nbe);
  +            getLogger().error("RmiServer.stop(): Error stopping RMI 
server",nbe);
           }
   
           setState(STOPPED);
  
  
  
  1.10      +7 -18     
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/AbstractCompleteSocketStreamServer.java
  
  Index: AbstractCompleteSocketStreamServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/AbstractCompleteSocketStreamServer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractCompleteSocketStreamServer.java   9 Jan 2003 22:55:12 -0000       
1.9
  +++ AbstractCompleteSocketStreamServer.java   11 Jan 2003 16:10:09 -0000      
1.10
  @@ -14,6 +14,7 @@
   import org.apache.excalibur.altrmi.server.impl.AbstractServer;
   import org.apache.excalibur.altrmi.server.impl.ServerStreamReadWriter;
   import 
org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
  +import org.apache.avalon.framework.CascadingRuntimeException;
   
   
   /**
  @@ -48,17 +49,7 @@
        */
       public AbstractCompleteSocketStreamServer( int port ) throws 
ServerException
       {
  -
  -        try
  -        {
  -            m_serverSocket = new ServerSocket( port );
  -
  -        }
  -        catch( IOException ioe )
  -        {
  -            throw new ServerException( "Some problem setting up server : "
  -                                             + ioe.getMessage() );
  -        }
  +        this (new InvocationHandlerAdapter(), port);
       }
   
       /**
  @@ -84,8 +75,7 @@
           }
           catch( IOException ioe )
           {
  -            throw new ServerException( "Some problem setting up server : "
  -                                             + ioe.getMessage() );
  +            throw new ServerException( "Could not bind to a socket when 
setting up the server", ioe);
           }
       }
   
  @@ -132,7 +122,8 @@
               }
               else
               {
  -                getLogger().error("Some problem connecting client via 
sockets: ", ioe);
  +                getLogger().error("AbstractCompleteSocketStreamServer.run(): 
Some problem connecting client " +
  +                        "via sockets: ", ioe);
               }
           }
       }
  @@ -165,9 +156,7 @@
           }
           catch ( IOException ioe )
           {
  -            getLogger().error("Error stopping Complete Socket server", ioe);
  -            throw new RuntimeException("Error stopping Complete Socket 
server :"
  -                    + ioe.getMessage());
  +            throw new CascadingRuntimeException("Error stopping Complete 
Socket server", ioe);
           }
           killAllConnections();
           getThread().interrupt();
  
  
  
  1.6       +9 -6      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/AbstractPartialSocketStreamServer.java
  
  Index: AbstractPartialSocketStreamServer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/AbstractPartialSocketStreamServer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractPartialSocketStreamServer.java    13 Oct 2002 11:54:27 -0000      
1.5
  +++ AbstractPartialSocketStreamServer.java    11 Jan 2003 16:10:09 -0000      
1.6
  @@ -19,15 +19,16 @@
        */
       public AbstractPartialSocketStreamServer()
       {
  +        this(new InvocationHandlerAdapter());
       }
   
       /**
        * Construct a AbstractPartialSocketStreamServer
  -     * @param inovcationHandlerAdapter Use this invocation handler adapter.
  +     * @param invocationHandlerAdapter Use this invocation handler adapter.
        */
  -    public AbstractPartialSocketStreamServer( InvocationHandlerAdapter 
inovcationHandlerAdapter )
  +    public AbstractPartialSocketStreamServer( InvocationHandlerAdapter 
invocationHandlerAdapter )
       {
  -        super( inovcationHandlerAdapter );
  +        super( invocationHandlerAdapter );
       }
   
       /**
  @@ -46,7 +47,8 @@
           }
           catch( SocketException se )
           {
  -            getLogger().error("Some error during socket handling", se);
  +            
getLogger().info("AbstractPartialSocketStreamServer.handleConnection(): Some 
error during " +
  +                    "socket handling", se);
           }
   
           try
  @@ -65,7 +67,8 @@
           }
           catch( IOException ioe )
           {
  -            getLogger().error("Some problem connecting client via sockets: 
", ioe);
  +            
getLogger().info("AbstractPartialSocketStreamServer.handleConnection(): Some 
problem connecting " +
  +                    "client via sockets: ", ioe);
           }
       }
   
  
  
  
  1.4       +2 -2      
jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/SocketStreamServerConnection.java
  
  Index: SocketStreamServerConnection.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/SocketStreamServerConnection.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SocketStreamServerConnection.java 21 Sep 2002 15:52:57 -0000      1.3
  +++ SocketStreamServerConnection.java 11 Jan 2003 16:10:09 -0000      1.4
  @@ -54,7 +54,7 @@
           }
           catch( IOException e )
           {
  -            getLogger().error("Error closing Connection",e);
  +            getLogger().info("SocketStreamServerConnection.killConnection(): 
Error closing Connection",e);
           }
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to