avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/http JettyTestCase.java
Date Sat, 04 Jan 2003 21:31:47 GMT
hammant     2003/01/04 13:31:47

  Modified:    altrmi   build.xml
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl
                        AbstractAltrmiFactory.java
                        AbstractConnectionPinger.java
                        ServerClassAltrmiFactory.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/socket
                        CallbackEnabledSocketCustomStreamInvocationHandler.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http
                        ClientHttpReadWriter.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl/naming
                        DefaultAltrmiContext.java
                        DefaultAltrmiInitialContextFactory.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream
                        ClientCustomStreamReadWriter.java
                        StreamInvocationHandler.java
               altrmi/src/java/org/apache/excalibur/altrmi/common
                        AltrmiConnectionException.java
                        AltrmiInvocationException.java
                        ClassLoaderObjectInputStream.java
               altrmi/src/java/org/apache/excalibur/altrmi/server
                        PublicationDescriptionItem.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl
                        DefaultMethodInvocationHandler.java
                        StreamServerConnection.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters
                        InvocationHandlerAdapter.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers
                        AbstractDynamicGeneratorClassRetriever.java
               altrmi/src/test/org/apache/excalibur/altrmi/test/http
                        JettyTestCase.java
  Log:
  tidy up of sys.out, imports and exception handling.
  
  Revision  Changes    Path
  1.59      +4 -1      jakarta-avalon-excalibur/altrmi/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/build.xml,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- build.xml	4 Jan 2003 19:57:54 -0000	1.58
  +++ build.xml	4 Jan 2003 21:31:45 -0000	1.59
  @@ -137,7 +137,6 @@
           <mkdir dir="${build.testsrc}"/>
   
           <filter token="SPEEDTEST-ITERATIONS" value="${speedtest.iterations}"/>  
            
  -        <echo message="${java.home}" file="build/tests/java_home"/>
   
           <echo>Speed Test Iterations=${speedtest.iterations}</echo>
   
  @@ -287,7 +286,11 @@
   
           <mkdir dir="${build.tests}"/>
   
  +        <echo message="${java.home}" file="build/tests/java_home"/>
  +
           <!-- Plain tests -->
  +        
  +        <echo message="Test For Jetty" file="build/Jetty.txt"/>        
   
           <junit fork="true"
               haltonfailure="${junit.failonerror}"
  
  
  
  1.14      +1 -4      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractAltrmiFactory.java
  
  Index: AbstractAltrmiFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractAltrmiFactory.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- AbstractAltrmiFactory.java	26 Oct 2002 14:10:48 -0000	1.13
  +++ AbstractAltrmiFactory.java	4 Jan 2003 21:31:45 -0000	1.14
  @@ -299,13 +299,10 @@
               return null;
           }
   
  -        //System.out.println("size = " + m_refObjs.size());
           Object obj = wr.get();
   
           if( obj == null )
           {
  -
  -            //System.out.println(" none for " + referenceID);
               m_refObjs.remove( referenceID );
           }
   
  
  
  
  1.8       +1 -3      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractConnectionPinger.java
  
  Index: AbstractConnectionPinger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractConnectionPinger.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractConnectionPinger.java	2 Sep 2002 22:36:23 -0000	1.7
  +++ AbstractConnectionPinger.java	4 Jan 2003 21:31:45 -0000	1.8
  @@ -114,7 +114,6 @@
   
                       // We really need a logger or something to be able to see this
                       //  for debugging.
  -                    //System.out.println( "Pinger Connection closed" );
   
                       // no need to ping anymore.
                   }
  @@ -122,7 +121,6 @@
                   {
                       // We really need a logger or something to be able to see this
                       //  for debugging.
  -                    //System.out.println( "Pinger Connection closed" );
   
                       // no need to ping anymore.
                   }
  
  
  
  1.10      +7 -13     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/ServerClassAltrmiFactory.java
  
  Index: ServerClassAltrmiFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/ServerClassAltrmiFactory.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ServerClassAltrmiFactory.java	13 Oct 2002 11:54:25 -0000	1.9
  +++ ServerClassAltrmiFactory.java	4 Jan 2003 21:31:45 -0000	1.10
  @@ -146,29 +146,23 @@
           }
           catch( InvocationTargetException ite )
           {
  -            throw new AltrmiConnectionException( "Generated class not instantiated : "
  -                                                 + ite.getTargetException().getMessage()
);
  +            throw new AltrmiConnectionException(
  +                "Generated class not instantiated.", ite.getTargetException() );
           }
           catch( ClassNotFoundException cnfe )
           {
  -            System.out.println( "---**" );
  -            cnfe.printStackTrace();
  -            System.out.println( "---**" );
  -            cnfe.getException().printStackTrace();
  -            System.out.println( "---**" );
  -
  -            throw new AltrmiConnectionException( "Generated class not found during lookup
: "
  -                                                 + cnfe.getMessage() );
  +            throw new AltrmiConnectionException(
  +                "Generated class not found during lookup.", cnfe );
           }
           catch( InstantiationException ie )
           {
               throw new AltrmiConnectionException(
  -                "Generated class not instantiable during lookup : " + ie.getMessage() );
  +                "Generated class not instantiable during lookup.", ie );
           }
           catch( IllegalAccessException iae )
           {
               throw new AltrmiConnectionException(
  -                "Illegal access to generated class during lookup : " + iae.getMessage()
);
  +                "Illegal access to generated class during lookup.", iae );
           }
       }
   
  
  
  
  1.10      +2 -2      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/socket/CallbackEnabledSocketCustomStreamInvocationHandler.java
  
  Index: CallbackEnabledSocketCustomStreamInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/socket/CallbackEnabledSocketCustomStreamInvocationHandler.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CallbackEnabledSocketCustomStreamInvocationHandler.java	16 Dec 2002 01:00:01 -0000	1.9
  +++ CallbackEnabledSocketCustomStreamInvocationHandler.java	4 Jan 2003 21:31:45 -0000	1.10
  @@ -81,7 +81,7 @@
           Object inputArgumentInstance)
       {
     
  -        System.out.println("callback class["+inputArgumentClass+"] obj["+inputArgumentInstance+"]");

  +        //System.out.println("callback class["+inputArgumentClass+"] obj["+inputArgumentInstance+"]");
           if( inputArgumentClass != null)
           {
               String publishedName =getPublishedName( inputArgumentInstance );
  
  
  
  1.6       +1 -0      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http/ClientHttpReadWriter.java
  
  Index: ClientHttpReadWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http/ClientHttpReadWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ClientHttpReadWriter.java	27 Dec 2002 00:07:27 -0000	1.5
  +++ ClientHttpReadWriter.java	4 Jan 2003 21:31:46 -0000	1.6
  @@ -50,6 +50,7 @@
           client.executeMethod(postMethod);
   
           byte[] response = postMethod.getResponseBody();
  +
           //Header[] headers = postMethod.getRequestHeaders();
           //for (int i = 0; i < headers.length; i++)
           //{
  
  
  
  1.5       +1 -3      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/naming/DefaultAltrmiContext.java
  
  Index: DefaultAltrmiContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/naming/DefaultAltrmiContext.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultAltrmiContext.java	13 Oct 2002 11:54:25 -0000	1.4
  +++ DefaultAltrmiContext.java	4 Jan 2003 21:31:46 -0000	1.5
  @@ -133,8 +133,6 @@
               try
               {
   
  -                //System.out.println("iurl[" + transportStream + ":" + host + ":" + port
+ ":"
  -                //                   + proxyDetails + ":" + beanDetails + "]");
                   altrmiInterfaceLookup =
                       altrmiInterfaceLookupFactory
                       .getAltrmiInterfaceLookup( transportStream + ":" + host + ":" + port
+ ":"
  
  
  
  1.4       +1 -2      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/naming/DefaultAltrmiInitialContextFactory.java
  
  Index: DefaultAltrmiInitialContextFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/naming/DefaultAltrmiInitialContextFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultAltrmiInitialContextFactory.java	24 Aug 2002 11:39:05 -0000	1.3
  +++ DefaultAltrmiInitialContextFactory.java	4 Jan 2003 21:31:46 -0000	1.4
  @@ -47,7 +47,6 @@
               ? s_url.lastIndexOf( "\\" ) : s_url.lastIndexOf( "/" );
           transportStream = s_url.substring( index + 1 );
   
  -        //System.out.println("transportStream[" + transportStream + "]");
           for( int i = 0; i < DefaultInterfaceLookupFactory.SUPPORTEDSTREAMS.length; i++
)
           {
               if( transportStream
  
  
  
  1.7       +1 -9      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream/ClientCustomStreamReadWriter.java
  
  Index: ClientCustomStreamReadWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream/ClientCustomStreamReadWriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ClientCustomStreamReadWriter.java	16 Dec 2002 01:00:01 -0000	1.6
  +++ ClientCustomStreamReadWriter.java	4 Jan 2003 21:31:46 -0000	1.7
  @@ -91,14 +91,6 @@
               pos += read;
               cnt++;
           }
  -        /*
  -        if (cnt > 1)
  -        {
  -            System.out.println( "ClientCustomStreamWriter.readReply took " + cnt +
  -                " reads to read all, " + byteArraySize + ", required bytes." );
  -        }
  -        */
  -
           return (AltrmiReply)SerializationHelper.getInstanceFromBytes( byteArray,
                                                                         mInterfacesClassLoader
);
       }
  
  
  
  1.11      +1 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream/StreamInvocationHandler.java
  
  Index: StreamInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream/StreamInvocationHandler.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- StreamInvocationHandler.java	21 Dec 2002 21:43:54 -0000	1.10
  +++ StreamInvocationHandler.java	4 Jan 2003 21:31:46 -0000	1.11
  @@ -199,10 +199,6 @@
           }
           catch( ClassNotFoundException e )
           {
  -            System.out.println( "--" );
  -            e.printStackTrace();
  -            System.out.println( "--" );
  -
               throw new AltrmiInvocationException( "Class definition missing on Deserialization:
"
                                                    + e.getMessage() );
           }
  
  
  
  1.4       +21 -1     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiConnectionException.java
  
  Index: AltrmiConnectionException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiConnectionException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AltrmiConnectionException.java	23 May 2002 21:37:19 -0000	1.3
  +++ AltrmiConnectionException.java	4 Jan 2003 21:31:46 -0000	1.4
  @@ -17,6 +17,10 @@
   public class AltrmiConnectionException extends Exception
   {
   
  +    // For the time being, this is backwards compatible with 1.3. It could
  +    // just as easily use the 1.4 constructors for Exception.
  +    private Throwable throwableCause;
  +
       /**
        * Constructor AltrmiConnectionException
        *
  @@ -27,5 +31,21 @@
       public AltrmiConnectionException( String msg )
       {
           super( msg );
  +    }
  +
  +    public AltrmiConnectionException(String message, Throwable cause)
  +    {
  +        super(message);
  +        throwableCause = cause;
  +    }
  +
  +    public Throwable getCause()
  +    {
  +        return throwableCause;
  +    }
  +
  +    public String getMessage()
  +    {
  +        return super.getMessage() + (throwableCause != null ? " : " + throwableCause.getMessage()
: "");
       }
   }
  
  
  
  1.4       +20 -1     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiInvocationException.java
  
  Index: AltrmiInvocationException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiInvocationException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AltrmiInvocationException.java	23 May 2002 21:37:19 -0000	1.3
  +++ AltrmiInvocationException.java	4 Jan 2003 21:31:46 -0000	1.4
  @@ -19,6 +19,8 @@
   public class AltrmiInvocationException extends RuntimeException implements Serializable
   {
   
  +    private Throwable throwableCause;
  +
       /**
        * Constructor AltrmiInvocationException
        *
  @@ -30,4 +32,21 @@
       {
           super( msg );
       }
  +
  +    public AltrmiInvocationException(String message, Throwable cause)
  +    {
  +        super(message);
  +        throwableCause = cause;
  +    }
  +
  +    public Throwable getCause()
  +    {
  +        return throwableCause;
  +    }
  +
  +    public String getMessage()
  +    {
  +        return super.getMessage() + (throwableCause != null ? " : " + throwableCause.getMessage()
: "");
  +    }
  +
   }
  
  
  
  1.6       +0 -16     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ClassLoaderObjectInputStream.java
  
  Index: ClassLoaderObjectInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ClassLoaderObjectInputStream.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ClassLoaderObjectInputStream.java	5 Sep 2002 22:22:36 -0000	1.5
  +++ ClassLoaderObjectInputStream.java	4 Jan 2003 21:31:46 -0000	1.6
  @@ -81,20 +81,4 @@
               return super.resolveClass( objectStreamClass );
           }
       }
  -
  -    // for debugging
  -    private void printCLs()
  -    {
  -
  -        ClassLoader cl = m_classLoader;
  -
  -        System.out.println( "Cl1>" + cl );
  -
  -        while( cl != null )
  -        {
  -            System.out.println( "Cl?>" + cl );
  -
  -            cl = cl.getParent();
  -        }
  -    }
   }
  
  
  
  1.9       +2 -1      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/PublicationDescriptionItem.java
  
  Index: PublicationDescriptionItem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/PublicationDescriptionItem.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PublicationDescriptionItem.java	27 Dec 2002 00:07:27 -0000	1.8
  +++ PublicationDescriptionItem.java	4 Jan 2003 21:31:46 -0000	1.9
  @@ -53,6 +53,7 @@
           }
           catch (NoClassDefFoundError ncdfe)
           {
  +            // TODO a soft check for Atributes / CommonsLogger missing?
               //System.out.println("--> ncdfe " + ncdfe.getMessage());
               //ncdfe.printStackTrace();
               // attribute jars are missing.
  
  
  
  1.10      +1 -21     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/DefaultMethodInvocationHandler.java
  
  Index: DefaultMethodInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/DefaultMethodInvocationHandler.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultMethodInvocationHandler.java	1 Nov 2002 16:35:43 -0000	1.9
  +++ DefaultMethodInvocationHandler.java	4 Jan 2003 21:31:46 -0000	1.10
  @@ -207,8 +207,6 @@
   
               if( wr == null )
               {
  -                System.out.println( "missing weak reference for referenceID - "
  -                                    + request.getReferenceID() + " pub " + m_publishedThing
);
                   return new NoSuchReferenceReply( request.getReferenceID() );
               }
   
  @@ -216,8 +214,6 @@
   
               if( beanImpl == null )
               {
  -                System.out.println( "Missin beanImpl for " + request.getReferenceID() );
  -
                   return new NoSuchReferenceReply( request.getReferenceID() );
               }
   
  @@ -279,22 +275,6 @@
                   args[ i ] = wr.get();
               }
           }
  -    }
  -
  -    private void debug( Object[] args )
  -    {
  -
  -        System.out.println( "*************************" );
  -
  -        for( int i = 0; i < args.length; i++ )
  -        {
  -            Object arg = args[ i ];
  -
  -            System.out.println( "i = " + i + " class= " + args[ i ].getClass().getName()
+ " "
  -                                + args[ i ].toString() );
  -        }
  -
  -        System.out.println( "*************************" );
       }
   
       /**
  
  
  
  1.10      +1 -5      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StreamServerConnection.java	26 Nov 2002 06:09:55 -0000	1.9
  +++ StreamServerConnection.java	4 Jan 2003 21:31:46 -0000	1.10
  @@ -20,8 +20,6 @@
   import org.apache.excalibur.altrmi.common.BadConnectionException;
   import org.apache.excalibur.altrmi.server.AltrmiServerConnection;
   
  -import javax.swing.*;
  -
   /**
    * Class StreamServerConnection
    *
  @@ -120,14 +118,12 @@
   
                       if (ioe instanceof EOFException)
                       {
  -                        getLogger().info("One Connection closed. (EOF)");
                           m_readWriter.close();
                       }
                       else if (isSafeEnd(ioe))
                       {
   
                           // TODO implement implementation indepandant logger
  -                        getLogger().info("One Connection closed.");
                           m_readWriter.close();
                       }
                       else
  
  
  
  1.15      +4 -6      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters/InvocationHandlerAdapter.java
  
  Index: InvocationHandlerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters/InvocationHandlerAdapter.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- InvocationHandlerAdapter.java	26 Nov 2002 06:09:55 -0000	1.14
  +++ InvocationHandlerAdapter.java	4 Jan 2003 21:31:46 -0000	1.15
  @@ -54,8 +54,6 @@
   import org.apache.excalibur.altrmi.server.impl.DefaultMethodInvocationHandler;
   import org.apache.excalibur.altrmi.server.impl.classretrievers.NoClassRetriever;
   
  -import javax.swing.*;
  -
   /**
    * Class InvocationHandlerAdapter
    *
  @@ -498,14 +496,14 @@
                   new AltrmiInvocationException( "TODO - you dirty rat/hacker" ) );
           }
   
  -        AltrmiSession sess = (AltrmiSession)m_sessions.get( gcr.getSession() );
  +        AltrmiSession sess = (AltrmiSession) m_sessions.get( gcr.getSession() );
           if( sess == null )
           {
  -            System.out.println( "DEBUG- GC on missing session -" + gcr.getSession() );
  +            System.err.println( "DEBUG- GC on missing session -" + gcr.getSession() );
           }
           if( gcr.getReferenceID() == null )
           {
  -            System.out.println( "DEBUG- GC on missing referenceID -" + gcr.getReferenceID()
);
  +            System.err.println( "DEBUG- GC on missing referenceID -" + gcr.getReferenceID()
);
           }
           sess.removeBeanInUse( gcr.getReferenceID() );
   
  
  
  
  1.7       +36 -29    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers/AbstractDynamicGeneratorClassRetriever.java
  
  Index: AbstractDynamicGeneratorClassRetriever.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers/AbstractDynamicGeneratorClassRetriever.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractDynamicGeneratorClassRetriever.java	14 Nov 2002 23:49:28 -0000	1.6
  +++ AbstractDynamicGeneratorClassRetriever.java	4 Jan 2003 21:31:46 -0000	1.7
  @@ -12,7 +12,14 @@
   import java.io.FileInputStream;
   import java.io.IOException;
   import org.apache.excalibur.altrmi.common.ProxyGenerator;
  -import org.apache.excalibur.altrmi.server.*;
  +import org.apache.excalibur.altrmi.server.AltrmiProxyGenerator;
  +import org.apache.excalibur.altrmi.server.ClassRetriever;
  +import org.apache.excalibur.altrmi.server.PublicationDescription;
  +import org.apache.excalibur.altrmi.server.ClassRetrievalException;
  +import org.apache.excalibur.altrmi.server.PublicationException;
  +import org.apache.excalibur.altrmi.server.PublicationDescriptionItem;
  +import org.apache.excalibur.altrmi.server.ProxyGenerationEnvironmentException;
  +
   
   /**
    * Class JarFileClassRetriever
  @@ -283,22 +290,22 @@
           }
           catch( Throwable t )
           {
  -            System.out.println( "******" );
  -            System.out.println( "** Exception while making source : " );
  -            System.out.flush();
  +            System.err.println( "******" );
  +            System.err.println( "** Exception while making source : " );
  +            System.err.flush();
               t.printStackTrace();
  -            System.out.println( "** Name=" + asName );
  -            System.out.println( "** Classes/Interfaces to Expose.." );
  +            System.err.println( "** Name=" + asName );
  +            System.err.println( "** Classes/Interfaces to Expose.." );
   
               for( int i = 0; i < interfacesToExpose.length; i++ )
               {
                   String aString = interfacesToExpose[ i ].getFacadeClass().getName();
   
  -                System.out.println( "** .." + aString );
  +                System.err.println( "** .." + aString );
               }
   
  -            System.out.println( "******" );
  -            System.out.flush();
  +            System.err.println( "******" );
  +            System.err.flush();
           }
   
           if( !deferred )
  @@ -312,38 +319,38 @@
                   if( ( t instanceof NoClassDefFoundError )
                       && t.getMessage().equals( "sun/tools/javac/Main" ) )
                   {
  -                    System.out.println( "***************************************" );
  -                    System.out.println( "*                                     *" );
  -                    System.out.println( "* AltRMI problem......                *" );
  -                    System.out.println( "* Please copy JAVA_HOME/lib/tools.jar *" );
  -                    System.out.println( "* to your applications classpath so   *" );
  -                    System.out.println( "* that proxys can be compiled.        *" );
  -                    System.out.println( "*                                     *" );
  -                    System.out.println( "***************************************" );
  +                    System.err.println( "***************************************" );
  +                    System.err.println( "*                                     *" );
  +                    System.err.println( "* AltRMI problem......                *" );
  +                    System.err.println( "* Please copy JAVA_HOME/lib/tools.jar *" );
  +                    System.err.println( "* to your applications classpath so   *" );
  +                    System.err.println( "* that proxys can be compiled.        *" );
  +                    System.err.println( "*                                     *" );
  +                    System.err.println( "***************************************" );
   
                       throw new ProxyGenerationEnvironmentException(
                           "tools.jar not found in classpath." );
                   }
   
  -                System.out.println( "******" );
  -                System.out.println( "** Exception while making String : " );
  -                System.out.flush();
  +                System.err.println( "******" );
  +                System.err.println( "** Exception while making String : " );
  +                System.err.flush();
                   t.printStackTrace();
  -                System.out.println( "** SrcDir=" + m_srcGenDir );
  -                System.out.println( "** ClassDir=" + m_classGenDir );
  -                System.out.println( "** Name=" + asName );
  -                System.out.println( "** CLasspath=" + m_altrmiClasspath );
  -                System.out.println( "** Classes/Interfaces to Expose.." );
  +                System.err.println( "** SrcDir=" + m_srcGenDir );
  +                System.err.println( "** ClassDir=" + m_classGenDir );
  +                System.err.println( "** Name=" + asName );
  +                System.err.println( "** CLasspath=" + m_altrmiClasspath );
  +                System.err.println( "** Classes/Interfaces to Expose.." );
   
                   for( int i = 0; i < interfacesToExpose.length; i++ )
                   {
                       String aString = interfacesToExpose[ i ].getFacadeClass().getName();
   
  -                    System.out.println( "** .." + aString );
  +                    System.err.println( "** .." + aString );
                   }
   
  -                System.out.println( "******" );
  -                System.out.flush();
  +                System.err.println( "******" );
  +                System.err.flush();
               }
           }
       }
  
  
  
  1.4       +5 -5      jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/http/JettyTestCase.java
  
  Index: JettyTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/http/JettyTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JettyTestCase.java	21 Dec 2002 22:24:07 -0000	1.3
  +++ JettyTestCase.java	4 Jan 2003 21:31:47 -0000	1.4
  @@ -64,7 +64,7 @@
       }
   
       public void testURLConnectionGet() throws Exception {
  -        URL url = new URL("http","localhost", HTTP_PORT,"/test/hi.txt");
  +        URL url = new URL("http","localhost", HTTP_PORT,"/test/Jetty.txt");
           URLConnection connection = url.openConnection();
           String contentType = connection.getContentType();
           assertEquals("text/plain", contentType);
  @@ -81,9 +81,9 @@
           // we shouldn't have to wait if a connection is available
           client.setHttpConnectionFactoryTimeout( 10 * 1000 );
   
  -        GetMethod getMethod = new GetMethod("/test/hi.txt");
  +        GetMethod getMethod = new GetMethod("/test/Jetty.txt");
           client.executeMethod(getMethod);
  -        assertEquals("hi",new String(getMethod.getResponseBody()));
  +        assertEquals("Test For Jetty",new String(getMethod.getResponseBody()));
       }
   
       public void testHttpClientGet2() throws Exception {
  @@ -97,9 +97,9 @@
           // we shouldn't have to wait if a connection is available
           client.setHttpConnectionFactoryTimeout( 10 * 1000 );
   
  -        PostMethod postMethod = new PostMethod("/test/hi.txt");
  +        PostMethod postMethod = new PostMethod("/test/Jetty.txt");
           client.executeMethod(postMethod);
  -        assertEquals("hi",new String(postMethod.getResponseBody()));
  +        assertEquals("Test For Jetty",new String(postMethod.getResponseBody()));
       }
   
       public void testHttpClientPost2() throws Exception {
  
  
  

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


Mime
View raw message