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/generator BCELProxyGeneratorTestCase.java TestInvocationHandler.java TestRemoteInterface.java
Date Thu, 23 May 2002 21:37:22 GMT
hammant     02/05/23 14:37:22

  Modified:    altrmi   build.xml
               altrmi/src/diag Coordinate.java WeatherSystem.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl
                        AbstractAltrmiFactory.java DefaultProxyHelper.java
                        ServerClassAltrmiFactory.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream
                        CallbackEnabledClientCustomStreamReadWriter.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct
                        AbstractDirectInvocationHandler.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl/rmi
                        RmiInvocationHandler.java
               altrmi/src/java/org/apache/excalibur/altrmi/client/impl/stream
                        StreamInvocationHandler.java
               altrmi/src/java/org/apache/excalibur/altrmi/common
                        AbstractMethodHandler.java
                        AltrmiAuthenticationException.java
                        AltrmiCallbackException.java
                        AltrmiConnectionClosedException.java
                        AltrmiConnectionException.java
                        AltrmiInvocationException.java
                        AltrmiInvocationHandler.java
                        AltrmiMarshalledInvocationHandler.java
                        AltrmiReply.java AltrmiRequest.java
                        ClassLoaderObjectInputStream.java ClassReply.java
                        ClassRequest.java ClassRetrievalFailedReply.java
                        EndConnectionReply.java ExceptionReply.java
                        ExposedObjectProxy.java FacadeRefHolder.java
                        GarbageCollectionReply.java
                        GarbageCollectionRequest.java
                        KeyAuthentication.java ListReply.java
                        ListRequest.java LookupReply.java
                        LookupRequest.java MethodFacadeArrayReply.java
                        MethodFacadeReply.java MethodFacadeRequest.java
                        MethodReply.java MethodRequest.java
                        NoSuchReferenceException.java
                        NoSuchReferenceReply.java
                        NotPublishedException.java NotPublishedReply.java
                        OpenConnectionReply.java OpenConnectionRequest.java
                        PingReply.java PingRequest.java
                        ProxyGenerationException.java ProxyGenerator.java
                        PublishedNameRequest.java RequestFailedReply.java
                        RmiAltrmiInvocationHandler.java
                        SerializationHelper.java Sessionable.java
                        SuspendedReply.java TryLaterReply.java
                        UserPasswordAuthentication.java
               altrmi/src/java/org/apache/excalibur/altrmi/generator
                        BCELProxyGeneratorImpl.java ProxyGeneratorImpl.java
               altrmi/src/java/org/apache/excalibur/altrmi/generator/ant
                        AltrmiProxyTask.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters
                        InvocationHandlerAdapter.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback
                        CallbackServerClassAltrmiFactory.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers
                        DynamicGeneratorClassRetriever.java
               altrmi/src/test/org/apache/excalibur/altrmi/test/callback
                        CallBackTestListenerImpl.java
               altrmi/src/test/org/apache/excalibur/altrmi/test/generator
                        BCELProxyGeneratorTestCase.java
                        TestInvocationHandler.java TestRemoteInterface.java
  Added:       altrmi/src/java/org/apache/excalibur/altrmi/common
                        AltrmiReplyConstants.java
                        AltrmiRequestConstants.java
  Log:
  Checkstyle conformance for 'common' package of AltRMI
  
  Revision  Changes    Path
  1.22      +1 -1      jakarta-avalon-excalibur/altrmi/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/build.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- build.xml	14 May 2002 21:35:57 -0000	1.21
  +++ build.xml	23 May 2002 21:37:19 -0000	1.22
  @@ -265,7 +265,7 @@
               failOnViolation="false"
               ignoreCastWhitespace="true">
               <fileset dir="${java.dir}">
  -                <include name="**/*.java"/>
  +                <include name="org/apache/excalibur/altrmi/common/*.java"/>
               </fileset>
               <formatter type="plain"/>
               <formatter type="xml" toFile="${build.dir}/checkstyle-results.xml"/>
  
  
  
  1.2       +1 -1      jakarta-avalon-excalibur/altrmi/src/diag/Coordinate.java
  
  Index: Coordinate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/diag/Coordinate.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Coordinate.java	3 Apr 2002 21:46:34 -0000	1.1
  +++ Coordinate.java	23 May 2002 21:37:19 -0000	1.2
  @@ -16,7 +16,7 @@
       }
   
       public float getLongditude() {
  -  	    return mlat;
  +          return mlat;
       }
       public float getLatitude() {
           return mlong;
  
  
  
  1.2       +1 -1      jakarta-avalon-excalibur/altrmi/src/diag/WeatherSystem.java
  
  Index: WeatherSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/diag/WeatherSystem.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WeatherSystem.java	3 Apr 2002 21:46:34 -0000	1.1
  +++ WeatherSystem.java	23 May 2002 21:37:19 -0000	1.2
  @@ -6,7 +6,7 @@
    */
   
   public interface WeatherSystem {
  -	
  +    
      WeatherStation[] stations;
      Meteorologist[] getMeteorologists();
   }
  
  
  
  1.7       +3 -2      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractAltrmiFactory.java	6 May 2002 18:14:36 -0000	1.6
  +++ AbstractAltrmiFactory.java	23 May 2002 21:37:19 -0000	1.7
  @@ -24,6 +24,7 @@
   import org.apache.excalibur.altrmi.common.NotPublishedReply;
   import org.apache.excalibur.altrmi.common.OpenConnectionReply;
   import org.apache.excalibur.altrmi.common.OpenConnectionRequest;
  +import org.apache.excalibur.altrmi.common.AltrmiReplyConstants;
   
   /**
    * Class AbstractAltrmiFactory
  @@ -31,7 +32,7 @@
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
    * @author Peter Royal <a href="mailto:proyal@managingpartners.com">proyal@managingpartners.com</a>
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
    */
   public abstract class AbstractAltrmiFactory implements AltrmiFactory
   {
  @@ -121,7 +122,7 @@
               .handleInvocation( new LookupRequest( publishedServiceName, altrmiAuthentication,
                                                     mSession ) );
   
  -        if( ar.getReplyCode() >= AltrmiReply.PROBLEMREPLY )
  +        if( ar.getReplyCode() >= AltrmiReplyConstants.PROBLEMREPLY )
           {
               if( ar instanceof NotPublishedReply )
               {
  
  
  
  1.9       +9 -8      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DefaultProxyHelper.java
  
  Index: DefaultProxyHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DefaultProxyHelper.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultProxyHelper.java	6 May 2002 18:14:36 -0000	1.8
  +++ DefaultProxyHelper.java	23 May 2002 21:37:19 -0000	1.9
  @@ -26,6 +26,7 @@
   import org.apache.excalibur.altrmi.common.MethodFacadeRequest;
   import org.apache.excalibur.altrmi.common.MethodReply;
   import org.apache.excalibur.altrmi.common.MethodRequest;
  +import org.apache.excalibur.altrmi.common.AltrmiReplyConstants;
   
   /**
    * Class DefaultProxyHelper
  @@ -33,7 +34,7 @@
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
    * @author Vinay Chandrasekharan <a href="mailto:vinay_chandran@users.sourceforge.net">vinay_chandran@users.sourceforge.net</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public final class DefaultProxyHelper implements ProxyHelper
   {
  @@ -135,7 +136,7 @@
   
           AltrmiReply reply = mClientInvocationHandler.handleInvocation( request );
   
  -        if( reply.getReplyCode() == AltrmiReply.METHODFACADEREPLY )
  +        if( reply.getReplyCode() == AltrmiReplyConstants.METHODFACADEREPLY )
           {
               MethodFacadeReply mfr = (MethodFacadeReply)reply;
               Long ref = mfr.getReferenceID();
  @@ -168,7 +169,7 @@
                   return implBean;
               }
           }
  -        else if( reply.getReplyCode() == AltrmiReply.METHODFACADEARRAYREPLY )
  +        else if( reply.getReplyCode() == AltrmiReplyConstants.METHODFACADEARRAYREPLY )
           {
               MethodFacadeArrayReply mfar = (MethodFacadeArrayReply)reply;
               Long[] refs = mfar.getReferenceIDs();
  @@ -221,7 +222,7 @@
   
               return implBeans;
           }
  -        else if( reply.getReplyCode() == AltrmiReply.EXCEPTIONREPLY )
  +        else if( reply.getReplyCode() == AltrmiReplyConstants.EXCEPTIONREPLY )
           {
               ExceptionReply er = (ExceptionReply)reply;
   
  @@ -255,13 +256,13 @@
                                                      methodSignature, args, mReferenceID, mSession );
           AltrmiReply reply = mClientInvocationHandler.handleInvocation( request );
   
  -        if( reply.getReplyCode() == AltrmiReply.METHODREPLY )
  +        if( reply.getReplyCode() == AltrmiReplyConstants.METHODREPLY )
           {
               MethodReply or = (MethodReply)reply;
   
               return or.getReplyObject();
           }
  -        else if( reply.getReplyCode() == AltrmiReply.EXCEPTIONREPLY )
  +        else if( reply.getReplyCode() == AltrmiReplyConstants.EXCEPTIONREPLY )
           {
               ExceptionReply er = (ExceptionReply)reply;
   
  @@ -293,13 +294,13 @@
           //debug(args);
           AltrmiReply reply = mClientInvocationHandler.handleInvocation( request );
   
  -        if( reply.getReplyCode() == AltrmiReply.METHODREPLY )
  +        if( reply.getReplyCode() == AltrmiReplyConstants.METHODREPLY )
           {
               MethodReply or = (MethodReply)reply;
   
               return;
           }
  -        else if( reply.getReplyCode() == AltrmiReply.EXCEPTIONREPLY )
  +        else if( reply.getReplyCode() == AltrmiReplyConstants.EXCEPTIONREPLY )
           {
               ExceptionReply er = (ExceptionReply)reply;
   
  
  
  
  1.8       +3 -2      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ServerClassAltrmiFactory.java	6 May 2002 18:14:36 -0000	1.7
  +++ ServerClassAltrmiFactory.java	23 May 2002 21:37:19 -0000	1.8
  @@ -17,13 +17,14 @@
   import org.apache.excalibur.altrmi.common.ClassRetrievalFailedReply;
   import org.apache.excalibur.altrmi.common.NotPublishedException;
   import org.apache.excalibur.altrmi.common.RequestFailedReply;
  +import org.apache.excalibur.altrmi.common.AltrmiReplyConstants;
   
   /**
    * Class ServerClassAltrmiFactory
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public class ServerClassAltrmiFactory extends AbstractAltrmiFactory
   {
  @@ -73,7 +74,7 @@
                       mHostContext.getClientInvocationHandler()
                       .handleInvocation( new ClassRequest( publishedServiceName, objectName ) );
   
  -                if( ar.getReplyCode() >= AltrmiReply.PROBLEMREPLY )
  +                if( ar.getReplyCode() >= AltrmiReplyConstants.PROBLEMREPLY )
                   {
                       if( ar instanceof RequestFailedReply )
                       {
  
  
  
  1.3       +9 -9      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream/CallbackEnabledClientCustomStreamReadWriter.java
  
  Index: CallbackEnabledClientCustomStreamReadWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream/CallbackEnabledClientCustomStreamReadWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CallbackEnabledClientCustomStreamReadWriter.java	24 Apr 2002 12:42:57 -0000	1.2
  +++ CallbackEnabledClientCustomStreamReadWriter.java	23 May 2002 21:37:19 -0000	1.3
  @@ -26,12 +26,12 @@
   
   /**
    * Class CallbackEnabledClientCustomStreamReadWriter
  - * 	This class embedds within itself a AltrmiServer which holds the
  - * 	exposedObjects for the client and upon which the Server can make
  - * 	callbacks.
  + *     This class embedds within itself a AltrmiServer which holds the
  + *     exposedObjects for the client and upon which the Server can make
  + *     callbacks.
    *
    * @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class CallbackEnabledClientCustomStreamReadWriter
       extends ClientStreamReadWriter
  @@ -137,7 +137,7 @@
   
       /**
        * Method getReplyFromMessageLoop.
  -     * 	Returns the reply recevied from the server
  +     *     Returns the reply recevied from the server
        * @return AltrmiReply
        */
       public AltrmiReply getReplyFromMessageLoop()
  @@ -217,8 +217,8 @@
   
       /**
        * Method exposeObject.
  -     * 	Expose the Object by adding it to the internal AltrmiServer
  -     * 	and by assigning a unique PublishedName for the same.
  +     *     Expose the Object by adding it to the internal AltrmiServer
  +     *     and by assigning a unique PublishedName for the same.
        * @param tobeExposedObject
        * @param tobeExposedInterface
        * @return boolean
  @@ -243,7 +243,7 @@
   
       /**
        * Method getUniqueNameForExposedObject.
  -     * 	Generate Unqiue name for the exposedObject.
  +     *     Generate Unqiue name for the exposedObject.
        *  Right now its as simple as ClassName_1,ClassName_2  etc....
        * @param tobeExposedObject
        * @return String
  @@ -256,7 +256,7 @@
   
       /**
        * Method getPublishedName.
  -     * 	Use while marshalling the exposedObject as an argument
  +     *     Use while marshalling the exposedObject as an argument
        *  to the server.
        * @param tobeExposedObject
        * @return String
  
  
  
  1.4       +3 -2      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/AbstractDirectInvocationHandler.java
  
  Index: AbstractDirectInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/AbstractDirectInvocationHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractDirectInvocationHandler.java	24 Apr 2002 12:42:57 -0000	1.3
  +++ AbstractDirectInvocationHandler.java	23 May 2002 21:37:19 -0000	1.4
  @@ -20,13 +20,14 @@
   import org.apache.excalibur.altrmi.common.NotPublishedReply;
   import org.apache.excalibur.altrmi.common.PublishedNameRequest;
   import org.apache.excalibur.altrmi.common.TryLaterReply;
  +import org.apache.excalibur.altrmi.common.AltrmiRequestConstants;
   
   /**
    * Class DirectInvocationHandler
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public abstract class AbstractDirectInvocationHandler extends AbstractClientInvocationHandler
   {
  @@ -61,7 +62,7 @@
       public AltrmiReply handleInvocation( AltrmiRequest request )
       {
   
  -        if( request.getRequestCode() != AltrmiRequest.PINGREQUEST )
  +        if( request.getRequestCode() != AltrmiRequestConstants.PINGREQUEST )
           {
               mLastRealRequest = System.currentTimeMillis();
           }
  
  
  
  1.6       +3 -2      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/rmi/RmiInvocationHandler.java
  
  Index: RmiInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/rmi/RmiInvocationHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RmiInvocationHandler.java	6 May 2002 18:14:37 -0000	1.5
  +++ RmiInvocationHandler.java	23 May 2002 21:37:19 -0000	1.6
  @@ -27,13 +27,14 @@
   import org.apache.excalibur.altrmi.common.PublishedNameRequest;
   import org.apache.excalibur.altrmi.common.RmiAltrmiInvocationHandler;
   import org.apache.excalibur.altrmi.common.TryLaterReply;
  +import org.apache.excalibur.altrmi.common.AltrmiRequestConstants;
   
   /**
    * Class RmiInvocationHandler
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public final class RmiInvocationHandler extends AbstractClientInvocationHandler
   {
  @@ -126,7 +127,7 @@
       public synchronized AltrmiReply handleInvocation( AltrmiRequest request )
       {
   
  -        if( request.getRequestCode() != AltrmiRequest.PINGREQUEST )
  +        if( request.getRequestCode() != AltrmiRequestConstants.PINGREQUEST )
           {
               mLastRealRequest = System.currentTimeMillis();
           }
  
  
  
  1.6       +3 -2      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StreamInvocationHandler.java	6 May 2002 18:14:37 -0000	1.5
  +++ StreamInvocationHandler.java	23 May 2002 21:37:19 -0000	1.6
  @@ -23,13 +23,14 @@
   import org.apache.excalibur.altrmi.common.NotPublishedReply;
   import org.apache.excalibur.altrmi.common.PublishedNameRequest;
   import org.apache.excalibur.altrmi.common.TryLaterReply;
  +import org.apache.excalibur.altrmi.common.AltrmiRequestConstants;
   
   /**
    * Class StreamInvocationHandler
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public abstract class StreamInvocationHandler extends AbstractClientInvocationHandler
   {
  @@ -99,7 +100,7 @@
       public synchronized AltrmiReply handleInvocation( AltrmiRequest request )
       {
   
  -        if( request.getRequestCode() != AltrmiRequest.PINGREQUEST )
  +        if( request.getRequestCode() != AltrmiRequestConstants.PINGREQUEST )
           {
               mLastRealRequest = System.currentTimeMillis();
           }
  
  
  
  1.3       +40 -12    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AbstractMethodHandler.java
  
  Index: AbstractMethodHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AbstractMethodHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractMethodHandler.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AbstractMethodHandler.java	23 May 2002 21:37:19 -0000	1.3
  @@ -1,3 +1,4 @@
  +
   /*
    * Copyright (C) The Apache Software Foundation. All rights reserved.
    *
  @@ -7,49 +8,76 @@
    */
   package org.apache.excalibur.altrmi.common;
   
  +
  +
   import java.lang.reflect.Method;
   
  +
   /**
    * Class AbstractMethodHandler
    *
    *
    * @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 AbstractMethodHandler
   {
   
  -    protected String getMethodSignature( Method method )
  +    /**
  +     * Generate a string representation of a method signature
  +     *
  +     *
  +     * @param method The method that needs a signature
  +     *
  +     * @return String representing method sig
  +     */
  +    protected String getMethodSignature(Method method)
       {
   
           StringBuffer methodSignature = new StringBuffer();
   
  -        methodSignature.append( method.getName() ).append( "(" );
  +        methodSignature.append(method.getName()).append("(");
   
           Class[] params = method.getParameterTypes();
   
  -        for( int i = 0; i < params.length; i++ )
  +        for (int i = 0; i < params.length; i++)
           {
  -            methodSignature.append( params[ i ].getName() );
  +            methodSignature.append(params[i].getName());
   
  -            if( i + 1 < params.length )
  +            if (i + 1 < params.length)
               {
  -                methodSignature.append( ", " );
  +                methodSignature.append(", ");
               }
           }
   
  -        methodSignature.append( ")" );
  +        methodSignature.append(")");
   
           return methodSignature.toString().intern();
       }
   
  -    protected String encodeClassName( Class clazz )
  +    /**
  +     * Encode a classname - i.e. escapes dots for dollars in package/class name
  +     *
  +     *
  +     * @param clazz class that has name that needs encoding.
  +     *
  +     * @return String encoded class name
  +     */
  +    protected String encodeClassName(Class clazz)
       {
  -        return encodeClassName( clazz.getName() );
  +        return encodeClassName(clazz.getName());
       }
   
  -    protected String encodeClassName( String className )
  +    /**
  +     * Encode a classname - i.e. escapes dots for dollars in package/class name
  +     *
  +     *
  +     * @param className class name that needs encoding.
  +     *
  +     * @return String encoded class name
  +     */
  +    protected String encodeClassName(String className)
       {
  -        return className.replace( '.', '$' );
  +        return className.replace('.', '$');
       }
   }
  
  
  
  1.3       +2 -2      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiAuthenticationException.java
  
  Index: AltrmiAuthenticationException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiAuthenticationException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AltrmiAuthenticationException.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AltrmiAuthenticationException.java	23 May 2002 21:37:19 -0000	1.3
  @@ -12,7 +12,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 AltrmiAuthenticationException extends AltrmiConnectionException
   {
  @@ -21,7 +21,7 @@
        * Constructor AltrmiAuthenticationException
        *
        *
  -     * @param msg
  +     * @param msg message that is the cause root of the exception
        *
        */
       public AltrmiAuthenticationException( String msg )
  
  
  
  1.4       +4 -4      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiCallbackException.java
  
  Index: AltrmiCallbackException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiCallbackException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AltrmiCallbackException.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ AltrmiCallbackException.java	23 May 2002 21:37:19 -0000	1.4
  @@ -13,7 +13,7 @@
    *
    *
    * @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class AltrmiCallbackException extends Exception
   {
  @@ -22,11 +22,11 @@
        * Constructor AltrmiCallbackException
        *
        *
  -     * @param s
  +     * @param msg the message that is the root cause of the exception.
        *
        */
  -    public AltrmiCallbackException( String s )
  +    public AltrmiCallbackException( String msg )
       {
  -        super( s );
  +        super( msg );
       }
   }
  
  
  
  1.3       +4 -4      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiConnectionClosedException.java
  
  Index: AltrmiConnectionClosedException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiConnectionClosedException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AltrmiConnectionClosedException.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AltrmiConnectionClosedException.java	23 May 2002 21:37:19 -0000	1.3
  @@ -12,7 +12,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 AltrmiConnectionClosedException extends RuntimeException
   {
  @@ -21,11 +21,11 @@
        * Constructor AltrmiConnectionClosedException
        *
        *
  -     * @param s
  +     * @param msg the message that is the root cause.
        *
        */
  -    public AltrmiConnectionClosedException( String s )
  +    public AltrmiConnectionClosedException( String msg )
       {
  -        super( s );
  +        super( msg );
       }
   }
  
  
  
  1.3       +4 -4      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AltrmiConnectionException.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AltrmiConnectionException.java	23 May 2002 21:37:19 -0000	1.3
  @@ -12,7 +12,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 AltrmiConnectionException extends Exception
   {
  @@ -21,11 +21,11 @@
        * Constructor AltrmiConnectionException
        *
        *
  -     * @param s
  +     * @param msg the message that is the root cause.
        *
        */
  -    public AltrmiConnectionException( String s )
  +    public AltrmiConnectionException( String msg )
       {
  -        super( s );
  +        super( msg );
       }
   }
  
  
  
  1.3       +4 -4      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AltrmiInvocationException.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AltrmiInvocationException.java	23 May 2002 21:37:19 -0000	1.3
  @@ -14,7 +14,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 AltrmiInvocationException extends RuntimeException implements Serializable
   {
  @@ -23,11 +23,11 @@
        * Constructor AltrmiInvocationException
        *
        *
  -     * @param s
  +     * @param msg the message that is the root cause.
        *
        */
  -    public AltrmiInvocationException( String s )
  +    public AltrmiInvocationException( String msg )
       {
  -        super( s );
  +        super( msg );
       }
   }
  
  
  
  1.3       +4 -4      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiInvocationHandler.java
  
  Index: AltrmiInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiInvocationHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AltrmiInvocationHandler.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AltrmiInvocationHandler.java	23 May 2002 21:37:19 -0000	1.3
  @@ -12,18 +12,18 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version * $Revision: 1.2 $
  + * @version * $Revision: 1.3 $
    */
   public interface AltrmiInvocationHandler
   {
   
       /**
  -     * Method handleInvocation
  +     * Handle a method invocation
        *
        *
  -     * @param request
  +     * @param request The request to handle
        *
  -     * @return
  +     * @return the reply that is a consequence of the request
        *
        */
       AltrmiReply handleInvocation( AltrmiRequest request );
  
  
  
  1.3       +4 -4      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiMarshalledInvocationHandler.java
  
  Index: AltrmiMarshalledInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiMarshalledInvocationHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AltrmiMarshalledInvocationHandler.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AltrmiMarshalledInvocationHandler.java	23 May 2002 21:37:19 -0000	1.3
  @@ -12,18 +12,18 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version * $Revision: 1.2 $
  + * @version * $Revision: 1.3 $
    */
   public interface AltrmiMarshalledInvocationHandler
   {
   
       /**
  -     * Method handleInvocation
  +     * Handle a method Invocation using byte array representations of the request and reply
        *
        *
  -     * @param request
  +     * @param request a byte array representing a request
        *
  -     * @return
  +     * @return a byte array representing the reply
        *
        */
       byte[] handleInvocation( byte[] request );
  
  
  
  1.3       +5 -25     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiReply.java
  
  Index: AltrmiReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiReply.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AltrmiReply.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AltrmiReply.java	23 May 2002 21:37:19 -0000	1.3
  @@ -17,37 +17,17 @@
    *
    *
    * @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 AltrmiReply implements Externalizable
   {
   
  -    // 'good' replies after 100
  -    public static final int CLASSREPLY = 1;
  -    public static final int METHODREPLY = 2;
  -    public static final int EXCEPTIONREPLY = 3;
  -    public static final int LOOKUPREPLY = 4;
  -    public static final int METHODFACADEREPLY = 5;
  -    public static final int OPENCONNECTIONREPLY = 6;
  -    public static final int PINGREPLY = 7;
  -    public static final int LISTREPLY = 8;
  -    public static final int METHODFACADEARRAYREPLY = 9;
  -    public static final int GCREPLY = 10;
  -
  -    // 'bad' replies after 100
  -    public static final int PROBLEMREPLY = 100;
  -    public static final int NOTPUBLISHEDREPLY = 102;
  -    public static final int REQUESTFAILEDREPLY = 103;
  -    public static final int SUSPENDEDREPLY = 104;
  -    public static final int ENDCONNECTIONREPLY = 105;
  -    public static final int NOSUCHREFERENCEREPLY = 106;
  -    public static final int CLASSRETRIEVALFAILEDREPLY = 107;
  -
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public abstract int getReplyCode();
  
  
  
  1.3       +5 -13     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiRequest.java
  
  Index: AltrmiRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiRequest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AltrmiRequest.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ AltrmiRequest.java	23 May 2002 21:37:19 -0000	1.3
  @@ -17,25 +17,17 @@
    *
    *
    * @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 AltrmiRequest implements Externalizable
   {
   
  -    public static final int CLASSREQUEST = 301;
  -    public static final int METHODREQUEST = 302;
  -    public static final int METHODFACADEREQUEST = 303;
  -    public static final int LOOKUPREQUEST = 304;
  -    public static final int OPENCONNECTIONREQUEST = 305;
  -    public static final int PINGREQUEST = 306;
  -    public static final int LISTREQUEST = 307;
  -    public static final int GCREQUEST = 308;
  -
       /**
  -     * Method getRequestCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public abstract int getRequestCode();
  
  
  
  1.3       +17 -8     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassLoaderObjectInputStream.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ ClassLoaderObjectInputStream.java	23 May 2002 21:37:19 -0000	1.3
  @@ -22,17 +22,17 @@
   public class ClassLoaderObjectInputStream extends ObjectInputStream
   {
   
  -    private ClassLoader mClassLoader;
  +    private ClassLoader m_classLoader;
   
       /**
        * Constructor ClassLoaderObjectInputStream
        *
        *
  -     * @param classLoader
  -     * @param inputStream
  +     * @param classLoader the classloader that containes the classes that may be deserialized
  +     * @param inputStream the input stream from which deserialization will occur
        *
  -     * @throws IOException
  -     * @throws StreamCorruptedException
  +     * @throws IOException from super
  +     * @throws StreamCorruptedException from super
        *
        */
       public ClassLoaderObjectInputStream(
  @@ -42,9 +42,18 @@
   
           super( inputStream );
   
  -        mClassLoader = classLoader;
  +        m_classLoader = classLoader;
       }
   
  +
  +    /**
  +     * This method overrides the super and adds classloader aware deserialization
  +     *
  +     * @param objectStreamClass the class that we're looking for during deserialization
  +     * @return the class itself if found, null if not.
  +     * @throws IOException some general problem classloading from files/resources.
  +     * @throws ClassNotFoundException this nor its super knowns about the class.
  +     */
       protected Class resolveClass( final ObjectStreamClass objectStreamClass )
           throws IOException, ClassNotFoundException
       {
  @@ -53,7 +62,7 @@
   
           try
           {
  -            clazz = Class.forName( objectStreamClass.getName(), false, mClassLoader );
  +            clazz = Class.forName( objectStreamClass.getName(), false, m_classLoader );
           }
           catch( ClassNotFoundException cnfe )
           {
  @@ -76,7 +85,7 @@
       private void printCLs()
       {
   
  -        ClassLoader cl = mClassLoader;
  +        ClassLoader cl = m_classLoader;
   
           System.out.println( "Cl1>" + cl );
   
  
  
  
  1.4       +25 -26    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ClassReply.java
  
  Index: ClassReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ClassReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClassReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ ClassReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,73 +16,72 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class ClassReply extends AltrmiReply
   {
       static final long serialVersionUID = -2122973452303573425L;
   
  -    private byte[] mBeanClassBytes;
  -    private byte[] mInterfaceImplClassBytes;
  +    private byte[] m_beanClassBytes;
  +    private byte[] m_interfaceImplClassBytes;
   
       /**
  -     * Constructor ClassReply
  +     * Contruct a class reply from byte arrays of classes.
        *
  -     *
  -     *
  -     * @param beanClassBytes
  -     * @param interfaceImplClassBytes
  +     * @param beanClassBytes a byte array of the class def for the class containing the methods.
  +     * @param interfaceImplClassBytes a byte array for the class implementing the interfaces.
        *
        */
       public ClassReply( byte[] beanClassBytes, byte[] interfaceImplClassBytes )
       {
  -        this.mBeanClassBytes = beanClassBytes;
  -        this.mInterfaceImplClassBytes = interfaceImplClassBytes;
  +        this.m_beanClassBytes = beanClassBytes;
  +        this.m_interfaceImplClassBytes = interfaceImplClassBytes;
       }
   
       /**
  -     * Constructor ClassReply
  +     * Constructor ClassReply used by externalization.
        *
        *
        */
       public ClassReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getBeanClassBytes
  +     * Get bean implementation byte array
        *
        *
  -     * @return
  +     * @return a byte array of the serialized bean class
        *
        */
       public byte[] getBeanClassBytes()
       {
  -        return mBeanClassBytes;
  +        return m_beanClassBytes;
       }
   
       /**
  -     * Method getInterfaceImplClassBytes
  +     * Get interface implementation byte array.
        *
        *
  -     * @return
  +     * @return a byte array of the serialized impl class
        *
        */
       public byte[] getInterfaceImplClassBytes()
       {
  -        return mInterfaceImplClassBytes;
  +        return m_interfaceImplClassBytes;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return CLASSREPLY;
  +        return AltrmiReplyConstants.CLASSREPLY;
       }
   
       /**
  @@ -102,8 +101,8 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mBeanClassBytes );
  -        out.writeObject( mInterfaceImplClassBytes );
  +        out.writeObject( m_beanClassBytes );
  +        out.writeObject( m_interfaceImplClassBytes );
       }
   
       /**
  @@ -120,7 +119,7 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mBeanClassBytes = (byte[])in.readObject();
  -        mInterfaceImplClassBytes = (byte[])in.readObject();
  +        m_beanClassBytes = (byte[])in.readObject();
  +        m_interfaceImplClassBytes = (byte[])in.readObject();
       }
   }
  
  
  
  1.4       +10 -9     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ClassRequest.java
  
  Index: ClassRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ClassRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClassRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ ClassRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,7 +12,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 final class ClassRequest extends PublishedNameRequest
   {
  @@ -22,8 +22,8 @@
        * Constructor ClassRequest
        *
        *
  -     * @param publishedServiceName
  -     * @param objectName*
  +     * @param publishedServiceName The service name that was originally looked up.
  +     * @param objectName the object name of the node within that.
        *
        */
       public ClassRequest( String publishedServiceName, String objectName )
  @@ -32,23 +32,24 @@
       }
   
       /**
  -     * Constructor ClassRequest
  +     * Constructor for Externalization.
        *
        *
        */
       public ClassRequest()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getRequestCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public int getRequestCode()
       {
  -        return CLASSREQUEST;
  +        return AltrmiRequestConstants.CLASSREQUEST;
       }
   }
  
  
  
  1.6       +20 -11    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ClassRetrievalFailedReply.java
  
  Index: ClassRetrievalFailedReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ClassRetrievalFailedReply.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ClassRetrievalFailedReply.java	24 Apr 2002 12:42:58 -0000	1.5
  +++ ClassRetrievalFailedReply.java	23 May 2002 21:37:19 -0000	1.6
  @@ -16,16 +16,16 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public final class ClassRetrievalFailedReply extends AltrmiReply
   {
       static final long serialVersionUID = -9005409182642544362L;
   
  -    private String mReason;
  +    private String m_reason;
   
       /**
  -     * Constructor RequestFailedReply
  +     * Constructor RequestFailedReply for Externalizable
        *
        *
        *
  @@ -34,26 +34,35 @@
       {
       }
   
  +    /**
  +     *
  +     * @param reason underlying reason.
  +     */
       public ClassRetrievalFailedReply( String reason )
       {
  -        mReason = reason;
  +        m_reason = reason;
       }
   
  +    /**
  +     *
  +     * @return the reason for failure.
  +     */
       public String getReason()
       {
  -        return mReason;
  +        return m_reason;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return CLASSRETRIEVALFAILEDREPLY;
  +        return AltrmiReplyConstants.CLASSRETRIEVALFAILEDREPLY;
       }
   
       /**
  @@ -75,7 +84,7 @@
       {
   
           super.writeExternal( out );
  -        out.writeObject( mReason );
  +        out.writeObject( m_reason );
       }
   
       /**
  @@ -94,7 +103,7 @@
       {
   
           super.readExternal( in );
  -        mReason = (String)in.readObject();
  +        m_reason = (String)in.readObject();
       }
   
   }
  
  
  
  1.4       +6 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/EndConnectionReply.java
  
  Index: EndConnectionReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/EndConnectionReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EndConnectionReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ EndConnectionReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,7 +12,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 final class EndConnectionReply extends AltrmiReply
   {
  @@ -27,14 +27,15 @@
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return ENDCONNECTIONREPLY;
  +        return AltrmiReplyConstants.ENDCONNECTIONREPLY;
       }
   }
  
  
  
  1.5       +17 -16    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ExceptionReply.java
  
  Index: ExceptionReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ExceptionReply.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ExceptionReply.java	28 Apr 2002 16:43:14 -0000	1.4
  +++ ExceptionReply.java	23 May 2002 21:37:19 -0000	1.5
  @@ -16,57 +16,58 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   public final class ExceptionReply extends AltrmiReply
   {
       static final long serialVersionUID = 8989665815895115830L;
   
  -    private Throwable mReplyExcpt;
  +    private Throwable m_replyExcpt;
   
       /**
        * Constructor ExceptionReply
        *
        *
  -     * @param replyExcpt
  +     * @param replyExcpt the exception received for the invocation
        *
        */
       public ExceptionReply( Throwable replyExcpt )
       {
  -        this.mReplyExcpt = replyExcpt;
  +        this.m_replyExcpt = replyExcpt;
       }
   
       /**
  -     * Constructor ExceptionReply
  +     * Constructor ExceptionReply for Externalization
        *
        *
        */
       public ExceptionReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getReplyException
  +     * Get reply exception.
        *
        *
  -     * @return
  +     * @return the transported exception
        *
        */
       public Throwable getReplyException()
       {
  -        return mReplyExcpt;
  +        return m_replyExcpt;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return EXCEPTIONREPLY;
  +        return AltrmiReplyConstants.EXCEPTIONREPLY;
       }
   
       /**
  @@ -86,7 +87,7 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mReplyExcpt );
  +        out.writeObject( m_replyExcpt );
       }
   
       /**
  @@ -103,7 +104,7 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mReplyExcpt = (Throwable)in.readObject();
  +        m_replyExcpt = (Throwable)in.readObject();
           
           // When the exception is read in from the stream, its stack trace will
           //  no longer exist.  This is because the stack trace information is not
  @@ -111,6 +112,6 @@
           //  down the source of problems.
           // To make it at least clear that the exception was remote, fill in the
           //  stack trace at this point.
  -        mReplyExcpt.fillInStackTrace();
  +        m_replyExcpt.fillInStackTrace();
       }
   }
  
  
  
  1.4       +19 -30    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ExposedObjectProxy.java
  
  Index: ExposedObjectProxy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ExposedObjectProxy.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExposedObjectProxy.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ ExposedObjectProxy.java	23 May 2002 21:37:19 -0000	1.4
  @@ -10,66 +10,52 @@
   import java.io.IOException;
   import java.io.ObjectInput;
   import java.io.ObjectOutput;
  +import java.io.Externalizable;
   
   /**
    * ExposedObjectProxy wraps the exposed client objects PublishedName
    * when sent across to the server as the argument.
    *
    * @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
  -public final class ExposedObjectProxy extends AltrmiReply
  +public final class ExposedObjectProxy implements Externalizable
   {
   
  -    static final long serialVersionUID = -204050172209495725L;
  -    private String mPublishedName;
  +    static final long serialVersionUID = 4395451860718894228L;
  +
  +    private String m_publishedName;
   
       /**
        * Constructor ExposedObjectProxy
        *
  -     *
  -     *
  -     * @param beanClassBytes
  -     * @param interfaceImplClassBytes
  +     * @param publishedName the name that a proxy is required for.
        *
        */
       public ExposedObjectProxy( String publishedName )
       {
  -        this.mPublishedName = publishedName;
  +        m_publishedName = publishedName;
       }
   
       /**
  -     * Constructor ExposedObjectProxy
  +     * Constructor ExposedObjectProxy for Externalization
        *
        *
        */
       public ExposedObjectProxy()
       {
  -        // for Externalization
       }
   
       /**
  -     * Method getPublishedName
  +     * Get published name.
        *
        *
  -     * @return
  +     * @return the published name
        *
        */
       public String getPublishedName()
       {
  -        return mPublishedName;
  -    }
  -
  -    /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  -     *
  -     * @return
  -     *
  -     */
  -    public int getReplyCode()
  -    {
  -        return CLASSREPLY;
  +        return m_publishedName;
       }
   
       /**
  @@ -89,7 +75,7 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mPublishedName );
  +        out.writeObject( m_publishedName );
       }
   
       /**
  @@ -106,14 +92,17 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mPublishedName = (String)in.readObject();
  +        m_publishedName = (String)in.readObject();
       }
   
  -    /*
  +    /**
  +     *
        * @see Object#toString()
  +     *
  +     * @return the string representation of this.
        */
       public String toString()
       {
  -        return "ExposedObjectProxy.PublishedName[" + mPublishedName + "]";
  +        return "ExposedObjectProxy.PublishedName[" + m_publishedName + "]";
       }
   }
  
  
  
  1.4       +13 -11    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/FacadeRefHolder.java
  
  Index: FacadeRefHolder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/FacadeRefHolder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FacadeRefHolder.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ FacadeRefHolder.java	23 May 2002 21:37:19 -0000	1.4
  @@ -14,46 +14,48 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class FacadeRefHolder implements Serializable
   {
       static final long serialVersionUID = 6621155565136424819L;
   
  -    private Long mReferenceID;
  -    private String mObjectName;
  +    private Long m_referenceID;
  +    private String m_objectName;
   
       /**
        * Constructor FacadeRefHolder
        *
        *
  -     * @param referenceID
  -     * @param objectName
  +     * @param referenceID the reference ID
  +     * @param objectName the object name
        *
        */
       public FacadeRefHolder( Long referenceID, String objectName )
       {
  -        mReferenceID = referenceID;
  -        mObjectName = objectName;
  +        m_referenceID = referenceID;
  +        m_objectName = objectName;
       }
   
       /**
  -     * Method getReferenceID
  +     * Get the reference ID
        *
  +     * @return the reference ID
        *
        */
       public Long getReferenceID()
       {
  -        return mReferenceID;
  +        return m_referenceID;
       }
   
       /**
  -     * Method getObjectName
  +     * Get the object name.
        *
  +     * @return the object name
        *
        */
       public String getObjectName()
       {
  -        return mObjectName;
  +        return m_objectName;
       }
   }
  
  
  
  1.4       +6 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/GarbageCollectionReply.java
  
  Index: GarbageCollectionReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/GarbageCollectionReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GarbageCollectionReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ GarbageCollectionReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,7 +16,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 final class GarbageCollectionReply extends AltrmiReply
   {
  @@ -32,15 +32,16 @@
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return GCREPLY;
  +        return AltrmiReplyConstants.GCREPLY;
       }
   
       /**
  
  
  
  1.4       +24 -23    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/GarbageCollectionRequest.java
  
  Index: GarbageCollectionRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/GarbageCollectionRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GarbageCollectionRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ GarbageCollectionRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,23 +16,23 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class GarbageCollectionRequest extends PublishedNameRequest implements Sessionable
   {
       static final long serialVersionUID = 494535989006608445L;
   
  -    private Long mSession;
  -    private Long mReferenceID;
  +    private Long m_session;
  +    private Long m_referenceID;
   
       /**
        * Constructor GarbageCollectionRequest
        *
        *
  -     * @param publishedServiceName
  -     * @param objectName
  -     * @param session
  -     * @param referenceID
  +     * @param publishedServiceName the published service name
  +     * @param objectName the object name within that
  +     * @param session the session ID
  +     * @param referenceID the reference ID
        *
        */
       public GarbageCollectionRequest( String publishedServiceName, String objectName, Long session,
  @@ -41,8 +41,8 @@
   
           super( publishedServiceName, objectName );
   
  -        mSession = session;
  -        mReferenceID = referenceID;
  +        m_session = session;
  +        m_referenceID = referenceID;
       }
   
       /**
  @@ -55,39 +55,40 @@
       }
   
       /**
  -     * Method getRequestCode
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public int getRequestCode()
       {
  -        return AltrmiRequest.GCREQUEST;
  +        return AltrmiRequestConstants.GCREQUEST;
       }
   
       /**
  -     * Method getSession
  +     * Get the session ID
        *
        *
  -     * @return
  +     * @return the session ID
        *
        */
       public Long getSession()
       {
  -        return mSession;
  +        return m_session;
       }
   
       /**
  -     * Method getReferenceID
  +     * Get the reference ID
        *
        *
  -     * @return
  +     * @return the reference ID
        *
        */
       public Long getReferenceID()
       {
  -        return mReferenceID;
  +        return m_referenceID;
       }
   
       /**
  @@ -109,8 +110,8 @@
       {
   
           super.writeExternal( out );
  -        out.writeObject( mSession );
  -        out.writeObject( mReferenceID );
  +        out.writeObject( m_session );
  +        out.writeObject( m_referenceID );
       }
   
       /**
  @@ -130,7 +131,7 @@
   
           super.readExternal( in );
   
  -        mSession = (Long)in.readObject();
  -        mReferenceID = (Long)in.readObject();
  +        m_session = (Long)in.readObject();
  +        m_referenceID = (Long)in.readObject();
       }
   }
  
  
  
  1.3       +19 -19    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/KeyAuthentication.java
  
  Index: KeyAuthentication.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/KeyAuthentication.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- KeyAuthentication.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ KeyAuthentication.java	23 May 2002 21:37:19 -0000	1.3
  @@ -16,59 +16,59 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public final class KeyAuthentication extends AltrmiAuthentication
   {
   
  -    private String mPublicKey;
  -    private String mSignedText;
  +    private String m_publicKey;
  +    private String m_signedText;
   
       /**
        * Constructor KeyAuthentication
        *
        *
  -     * @param publicKey
  -     * @param signedText
  +     * @param publicKey the public key
  +     * @param signedText the signed text
        *
        */
       public KeyAuthentication( String publicKey, String signedText )
       {
  -        mPublicKey = publicKey;
  -        mSignedText = signedText;
  +        m_publicKey = publicKey;
  +        m_signedText = signedText;
       }
   
       /**
  -     * Constructor KeyAuthentication
  +     * Constructor KeyAuthentication for Externalization
        *
        *
        */
       public KeyAuthentication()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getPublicKey
  +     * Get the public key for authentication.
        *
        *
  -     * @return
  +     * @return the public key
        *
        */
       public String getPublicKey()
       {
  -        return mPublicKey;
  +        return m_publicKey;
       }
   
       /**
  -     * Method getSignedText
  +     * Get the signed text for authentication
        *
        *
  -     * @return
  +     * @return the signed text
        *
        */
       public String getSignedText()
       {
  -        return mSignedText;
  +        return m_signedText;
       }
   
       /**
  @@ -88,8 +88,8 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mPublicKey );
  -        out.writeObject( mSignedText );
  +        out.writeObject( m_publicKey );
  +        out.writeObject( m_signedText );
       }
   
       /**
  @@ -106,7 +106,7 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mPublicKey = (String)in.readObject();
  -        mSignedText = (String)in.readObject();
  +        m_publicKey = (String)in.readObject();
  +        m_signedText = (String)in.readObject();
       }
   }
  
  
  
  1.4       +17 -16    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ListReply.java
  
  Index: ListReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ListReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ListReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ ListReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,57 +16,58 @@
    *
    *
    * @author Vinay Chandrasekharan
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class ListReply extends AltrmiReply
   {
       static final long serialVersionUID = 2859821236622834515L;
   
  -    private String[] mListOfPublishedObjects;
  +    private String[] m_listOfPublishedObjects;
   
       /**
        * Constructor LookupReply
        *
        *
  -     * @param param_listOfPublishedObjects : list of Published Objects
  +     * @param listOfPublishedObjects : list of Published Objects
        *
        */
  -    public ListReply( String[] param_listOfPublishedObjects )
  +    public ListReply( String[] listOfPublishedObjects )
       {
  -        mListOfPublishedObjects = param_listOfPublishedObjects;
  +        m_listOfPublishedObjects = listOfPublishedObjects;
       }
   
       /**
  -     * Constructor ListReply
  +     * Constructor ListReply for Externalization
        *
        *
        */
       public ListReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getReferenceID.
  +     * Get the reference ID.
        *
        *
  -     * @return
  +     * @return the list of published Objects
        *
        */
       public String[] getListOfPublishedObjects()
       {
  -        return mListOfPublishedObjects;
  +        return m_listOfPublishedObjects;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return LISTREPLY;
  +        return AltrmiReplyConstants.LISTREPLY;
       }
   
       /**
  @@ -86,7 +87,7 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mListOfPublishedObjects );
  +        out.writeObject( m_listOfPublishedObjects );
       }
   
       /**
  @@ -103,6 +104,6 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mListOfPublishedObjects = (String[])in.readObject();
  +        m_listOfPublishedObjects = (String[])in.readObject();
       }
   }
  
  
  
  1.4       +6 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ListRequest.java
  
  Index: ListRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ListRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ListRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ ListRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,21 +12,22 @@
    *
    *
    * @author Vinay Chandrasekharan
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class ListRequest extends AltrmiRequest
   {
       static final long serialVersionUID = -8603142444769220615L;
   
       /**
  -     * Method getRequestCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public int getRequestCode()
       {
  -        return LISTREQUEST;
  +        return AltrmiRequestConstants.LISTREQUEST;
       }
   }
  
  
  
  1.4       +16 -15    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/LookupReply.java
  
  Index: LookupReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/LookupReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LookupReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ LookupReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,57 +16,58 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class LookupReply extends AltrmiReply
   {
       static final long serialVersionUID = 4421747064999748917L;
   
  -    private Long mReferenceID;
  +    private Long m_referenceID;
   
       /**
        * Constructor LookupReply
        *
        *
  -     * @param referenceID
  +     * @param referenceID the reference ID
        *
        */
       public LookupReply( Long referenceID )
       {
  -        mReferenceID = referenceID;
  +        m_referenceID = referenceID;
       }
   
       /**
  -     * Constructor LookupReply
  +     * Constructor LookupReply for Externalization
        *
        *
        */
       public LookupReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getReferenceID.
  +     * Get the reference ID.
        *
        *
  -     * @return
  +     * @return the reference ID
        *
        */
       public Long getReferenceID()
       {
  -        return mReferenceID;
  +        return m_referenceID;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return LOOKUPREPLY;
  +        return AltrmiReplyConstants.LOOKUPREPLY;
       }
   
       /**
  @@ -86,7 +87,7 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mReferenceID );
  +        out.writeObject( m_referenceID );
       }
   
       /**
  @@ -103,6 +104,6 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mReferenceID = (Long)in.readObject();
  +        m_referenceID = (Long)in.readObject();
       }
   }
  
  
  
  1.4       +25 -24    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/LookupRequest.java
  
  Index: LookupRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/LookupRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LookupRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ LookupRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,22 +16,22 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class LookupRequest extends PublishedNameRequest implements Sessionable
   {
       static final long serialVersionUID = -4954813612238819220L;
   
  -    private AltrmiAuthentication mAltrmiAuthentication;
  -    private Long mSession;
  +    private AltrmiAuthentication m_altrmiAuthentication;
  +    private Long m_session;
   
       /**
        * Constructor LookupRequest
        *
        *
  -     * @param publishedServiceName
  -     * @param altrmiAuthentication
  -     * @param session
  +     * @param publishedServiceName the published service name
  +     * @param altrmiAuthentication a plugable authenticator
  +     * @param session the session ID
        *
        */
       public LookupRequest( String publishedServiceName, AltrmiAuthentication altrmiAuthentication,
  @@ -40,53 +40,54 @@
   
           super( publishedServiceName, "Main" );
   
  -        mAltrmiAuthentication = altrmiAuthentication;
  -        mSession = session;
  +        m_altrmiAuthentication = altrmiAuthentication;
  +        m_session = session;
       }
   
       /**
  -     * Constructor LookupRequest
  +     * Constructor LookupRequest for Externalization
        *
        *
        */
       public LookupRequest()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getRequestCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public int getRequestCode()
       {
  -        return LOOKUPREQUEST;
  +        return AltrmiRequestConstants.LOOKUPREQUEST;
       }
   
       /**
  -     * Method getAltrmiAuthentication.
  +     * Get Altrmi Authentication handler
        *
        *
  -     * @return
  +     * @return the authenticator
        *
        */
       public AltrmiAuthentication getAltrmiAuthentication()
       {
  -        return mAltrmiAuthentication;
  +        return m_altrmiAuthentication;
       }
   
       /**
  -     * Method getSession
  +     * Get the session ID.
        *
        *
  -     * @return
  +     * @return the session ID
        *
        */
       public Long getSession()
       {
  -        return mSession;
  +        return m_session;
       }
   
       /**
  @@ -108,8 +109,8 @@
       {
   
           super.writeExternal( out );
  -        out.writeObject( mAltrmiAuthentication );
  -        out.writeObject( mSession );
  +        out.writeObject( m_altrmiAuthentication );
  +        out.writeObject( m_session );
       }
   
       /**
  @@ -129,7 +130,7 @@
   
           super.readExternal( in );
   
  -        mAltrmiAuthentication = (AltrmiAuthentication)in.readObject();
  -        mSession = (Long)in.readObject();
  +        m_altrmiAuthentication = (AltrmiAuthentication)in.readObject();
  +        m_session = (Long)in.readObject();
       }
   }
  
  
  
  1.5       +24 -23    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodFacadeArrayReply.java
  
  Index: MethodFacadeArrayReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodFacadeArrayReply.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MethodFacadeArrayReply.java	24 Apr 2002 12:42:58 -0000	1.4
  +++ MethodFacadeArrayReply.java	23 May 2002 21:37:19 -0000	1.5
  @@ -16,73 +16,74 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   public final class MethodFacadeArrayReply extends AltrmiReply
   {
   
       static final long serialVersionUID = 3982374893707173208L;
  -    private Long[] mReferenceIDs;
  -    private String[] mObjectNames;
  +    private Long[] m_referenceIDs;
  +    private String[] m_objectNames;
   
       /**
        * Constructor MethodFacadeReply
        *
        *
        *
  -     * @param referenceIDs
  -     * @param objectTypes
  +     * @param referenceIDs an array of reference IDs
  +     * @param objectNames an array of object names
        *
        */
       public MethodFacadeArrayReply( Long[] referenceIDs, String[] objectNames )
       {
  -        mReferenceIDs = referenceIDs;
  -        mObjectNames = objectNames;
  +        m_referenceIDs = referenceIDs;
  +        m_objectNames = objectNames;
       }
   
       /**
  -     * Constructor MethodFacadeReply
  +     * Constructor MethodFacadeReply for Externalization
        *
        *
        */
       public MethodFacadeArrayReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getReference
  +     * Get the reference IDs.
        *
        *
  -     * @return
  +     * @return the array of reference IDs
        *
        */
       public Long[] getReferenceIDs()
       {
  -        return mReferenceIDs;
  +        return m_referenceIDs;
       }
   
       /**
  -     * Method getObjectTypes
  +     * Get object names.
        *
        *
  -     * @return
  +     * @return the array of object names
        *
        */
       public String[] getObjectNames()
       {
  -        return mObjectNames;
  +        return m_objectNames;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return METHODFACADEARRAYREPLY;
  +        return AltrmiReplyConstants.METHODFACADEARRAYREPLY;
       }
   
       /**
  @@ -102,8 +103,8 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mReferenceIDs );
  -        out.writeObject( mObjectNames );
  +        out.writeObject( m_referenceIDs );
  +        out.writeObject( m_objectNames );
       }
   
       /**
  @@ -120,7 +121,7 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mReferenceIDs = (Long[])in.readObject();
  -        mObjectNames = (String[])in.readObject();
  +        m_referenceIDs = (Long[])in.readObject();
  +        m_objectNames = (String[])in.readObject();
       }
   }
  
  
  
  1.5       +24 -23    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodFacadeReply.java
  
  Index: MethodFacadeReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodFacadeReply.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MethodFacadeReply.java	24 Apr 2002 12:42:58 -0000	1.4
  +++ MethodFacadeReply.java	23 May 2002 21:37:19 -0000	1.5
  @@ -16,72 +16,73 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   public final class MethodFacadeReply extends AltrmiReply
   {
   
       static final long serialVersionUID = 3332468131008501932L;
  -    private Long mReferenceID;
  -    private String mObjectName;
  +    private Long m_referenceID;
  +    private String m_objectName;
   
       /**
        * Constructor MethodFacadeReply
        *
        *
  -     * @param referenceID
  -     * @param objectName
  +     * @param referenceID the reference ID
  +     * @param objectName the object Name
        *
        */
       public MethodFacadeReply( Long referenceID, String objectName )
       {
  -        mReferenceID = referenceID;
  -        mObjectName = objectName;
  +        m_referenceID = referenceID;
  +        m_objectName = objectName;
       }
   
       /**
  -     * Constructor MethodFacadeReply
  +     * Constructor MethodFacadeReply for Externalization
        *
        *
        */
       public MethodFacadeReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getReference
  +     * Get the reference ID.
        *
        *
  -     * @return
  +     * @return the reference ID
        *
        */
       public Long getReferenceID()
       {
  -        return mReferenceID;
  +        return m_referenceID;
       }
   
       /**
  -     * Method getObjectName
  +     * Get object names.
        *
        *
  -     * @return
  +     * @return the object Name
        *
        */
       public String getObjectName()
       {
  -        return mObjectName;
  +        return m_objectName;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return METHODFACADEREPLY;
  +        return AltrmiReplyConstants.METHODFACADEREPLY;
       }
   
       /**
  @@ -101,8 +102,8 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mReferenceID );
  -        out.writeObject( mObjectName );
  +        out.writeObject( m_referenceID );
  +        out.writeObject( m_objectName );
       }
   
       /**
  @@ -119,7 +120,7 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mReferenceID = (Long)in.readObject();
  -        mObjectName = (String)in.readObject();
  +        m_referenceID = (Long)in.readObject();
  +        m_objectName = (String)in.readObject();
       }
   }
  
  
  
  1.4       +21 -20    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodFacadeRequest.java
  
  Index: MethodFacadeRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodFacadeRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MethodFacadeRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ MethodFacadeRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,25 +16,25 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class MethodFacadeRequest extends MethodRequest
   {
       static final long serialVersionUID = 5924458629530012405L;
   
  -    private String mBaseReturnClassNameEncoded;
  +    private String m_baseReturnClassNameEncoded;
   
       /**
        * Constructor MethodFacadeRequest
        *
        *
  -     * @param publishedServiceName
  -     * @param objectName
  -     * @param methodSignature
  -     * @param args
  -     * @param referenceID
  -     * @param baseReturnClassNameEncoded
  -     * @param session
  +     * @param publishedServiceName the published service name
  +     * @param objectName the object Name
  +     * @param methodSignature the method signature
  +     * @param args an array of args for the method invocation
  +     * @param referenceID the reference ID
  +     * @param baseReturnClassNameEncoded the encoded name of the base class
  +     * @param session the session ID
        *
        */
       public MethodFacadeRequest( String publishedServiceName, String objectName,
  @@ -44,7 +44,7 @@
   
           super( publishedServiceName, objectName, methodSignature, args, referenceID, session );
   
  -        mBaseReturnClassNameEncoded = baseReturnClassNameEncoded;
  +        m_baseReturnClassNameEncoded = baseReturnClassNameEncoded;
       }
   
       /**
  @@ -54,30 +54,31 @@
        */
       public MethodFacadeRequest()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getRequestCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public int getRequestCode()
       {
  -        return METHODFACADEREQUEST;
  +        return AltrmiRequestConstants.METHODFACADEREQUEST;
       }
   
       /**
  -     * Method getReturnClassNameEncoded.
  +     * Get return class name in encoded form.
        *
        *
  -     * @return
  +     * @return the encoded name of the base class
        *
        */
       public String getBaseReturnClassNameEncoded()
       {
  -        return mBaseReturnClassNameEncoded;
  +        return m_baseReturnClassNameEncoded;
       }
   
       /**
  @@ -98,7 +99,7 @@
       public void writeExternal( ObjectOutput out ) throws IOException
       {
           super.writeExternal( out );
  -        out.writeObject( mBaseReturnClassNameEncoded );
  +        out.writeObject( m_baseReturnClassNameEncoded );
       }
   
       /**
  @@ -118,6 +119,6 @@
   
           super.readExternal( in );
   
  -        mBaseReturnClassNameEncoded = (String)in.readObject();
  +        m_baseReturnClassNameEncoded = (String)in.readObject();
       }
   }
  
  
  
  1.4       +16 -15    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodReply.java
  
  Index: MethodReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MethodReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ MethodReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,57 +16,58 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class MethodReply extends AltrmiReply
   {
       static final long serialVersionUID = -4177121668966829330L;
   
  -    private Object mReplyObj;
  +    private Object m_replyObj;
   
       /**
        * Constructor MethodReply
        *
        *
  -     * @param replyObj
  +     * @param replyObj the object that is the return value
        *
        */
       public MethodReply( Object replyObj )
       {
  -        this.mReplyObj = replyObj;
  +        this.m_replyObj = replyObj;
       }
   
       /**
  -     * Constructor MethodReply
  +     * Constructor MethodReply for Externalization
        *
        *
        */
       public MethodReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getReplyObject
  +     * Get reply object
        *
        *
  -     * @return
  +     * @return the reply object
        *
        */
       public Object getReplyObject()
       {
  -        return mReplyObj;
  +        return m_replyObj;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return METHODREPLY;
  +        return AltrmiReplyConstants.METHODREPLY;
       }
   
       /**
  @@ -86,7 +87,7 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mReplyObj );
  +        out.writeObject( m_replyObj );
       }
   
       /**
  @@ -103,6 +104,6 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mReplyObj = in.readObject();
  +        m_replyObj = in.readObject();
       }
   }
  
  
  
  1.4       +42 -41    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodRequest.java
  
  Index: MethodRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MethodRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MethodRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ MethodRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,27 +16,27 @@
    *
    *
    * @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 MethodRequest extends PublishedNameRequest implements Sessionable
   {
       static final long serialVersionUID = -909163040319879134L;
   
  -    private String mMethodSignature;
  -    private Object[] mArgs;
  -    private Long mReferenceID;
  -    private Long mSession;
  +    private String m_methodSignature;
  +    private Object[] m_args;
  +    private Long m_referenceID;
  +    private Long m_session;
   
       /**
        * Constructor MethodRequest
        *
        *
  -     * @param publishedServiceName
  -     * @param objectName
  -     * @param methodSignature
  -     * @param args
  -     * @param referenceID
  -     * @param session
  +     * @param publishedServiceName the published service name
  +     * @param objectName the object Name
  +     * @param methodSignature the method signature
  +     * @param args an array of args for the method invocation
  +     * @param referenceID the reference ID
  +     * @param session the session ID
        *
        */
       public MethodRequest( String publishedServiceName, String objectName, String methodSignature,
  @@ -45,79 +45,80 @@
   
           super( publishedServiceName, objectName );
   
  -        mMethodSignature = methodSignature;
  -        mArgs = args;
  -        mReferenceID = referenceID;
  -        mSession = session;
  +        m_methodSignature = methodSignature;
  +        m_args = args;
  +        m_referenceID = referenceID;
  +        m_session = session;
       }
   
       /**
  -     * Constructor MethodRequest
  +     * Constructor MethodRequest for Externalization
        *
        *
        */
       public MethodRequest()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getMethodSignature
  +     * Get method signature in string form.
        *
        *
  -     * @return
  +     * @return the method signature
        *
        */
       public String getMethodSignature()
       {
  -        return mMethodSignature;
  +        return m_methodSignature;
       }
   
       /**
  -     * Method getArgs
  +     * Get arguments.
        *
        *
  -     * @return
  +     * @return the invocation arguments
        *
        */
       public Object[] getArgs()
       {
  -        return mArgs;
  +        return m_args;
       }
   
       /**
  -     * Method getReferenceID
  +     * Get the reference ID.
        *
        *
  -     * @return
  +     * @return the reference ID
        *
        */
       public Long getReferenceID()
       {
  -        return mReferenceID;
  +        return m_referenceID;
       }
   
       /**
  -     * Method getRequestCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public int getRequestCode()
       {
  -        return METHODREQUEST;
  +        return AltrmiRequestConstants.METHODREQUEST;
       }
   
       /**
  -     * Method getSession
  +     * Get the session ID.
        *
        *
  -     * @return
  +     * @return the session ID
        *
        */
       public Long getSession()
       {
  -        return mSession;
  +        return m_session;
       }
   
       /**
  @@ -139,10 +140,10 @@
       {
   
           super.writeExternal( out );
  -        out.writeObject( mMethodSignature );
  -        out.writeObject( mArgs );
  -        out.writeObject( mReferenceID );
  -        out.writeObject( mSession );
  +        out.writeObject( m_methodSignature );
  +        out.writeObject( m_args );
  +        out.writeObject( m_referenceID );
  +        out.writeObject( m_session );
       }
   
       /**
  @@ -162,9 +163,9 @@
   
           super.readExternal( in );
   
  -        mMethodSignature = (String)in.readObject();
  -        mArgs = (Object[])in.readObject();
  -        mReferenceID = (Long)in.readObject();
  -        mSession = (Long)in.readObject();
  +        m_methodSignature = (String)in.readObject();
  +        m_args = (Object[])in.readObject();
  +        m_referenceID = (Long)in.readObject();
  +        m_session = (Long)in.readObject();
       }
   }
  
  
  
  1.4       +2 -2      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/NoSuchReferenceException.java
  
  Index: NoSuchReferenceException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/NoSuchReferenceException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NoSuchReferenceException.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ NoSuchReferenceException.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,7 +12,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 NoSuchReferenceException extends AltrmiInvocationException
   {
  @@ -21,7 +21,7 @@
       /**
        * Constructor NoSuchReferenceException
        *
  -     *
  +     * @param referenceID the reference id
        *
        */
       public NoSuchReferenceException( Long referenceID )
  
  
  
  1.4       +36 -27    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/NoSuchReferenceReply.java
  
  Index: NoSuchReferenceReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/NoSuchReferenceReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NoSuchReferenceReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ NoSuchReferenceReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,13 +16,13 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class NoSuchReferenceReply extends NotPublishedReply
   {
       static final long serialVersionUID = -7215264154886986883L;
   
  -    private Long mReferenceID;
  +    private Long m_referenceID;
   
       /**
        * Constructor NoSuchReferenceReply
  @@ -36,68 +36,77 @@
        * Constructor NoSuchReferenceReply
        *
        *
  -     * @param referenceID
  +     * @param referenceID the reference identifier
        *
        */
       public NoSuchReferenceReply( Long referenceID )
       {
  -        mReferenceID = referenceID;
  +        m_referenceID = referenceID;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return NOSUCHREFERENCEREPLY;
  +        return AltrmiReplyConstants.NOSUCHREFERENCEREPLY;
       }
   
       /**
  -     * Method getReferenceID
  +     * Get the reference ID.
        *
        *
  -     * @return
  +     * @return the reference id
        *
        */
       public Long getReferenceID()
       {
  -        return mReferenceID;
  +        return m_referenceID;
       }
   
       /**
  -     * Method writeExternal
  -     *
  -     *
  -     * @param out
  -     *
  -     * @throws IOException
  +     * The object implements the writeExternal method to save its contents
  +     * by calling the methods of DataOutput for its primitive values or
  +     * calling the writeObject method of ObjectOutput for objects, strings,
  +     * and arrays.
  +     *
  +     * @serialData Overriding methods should use this tag to describe
  +     *             the data layout of this Externalizable object.
  +     *             List the sequence of element types and, if possible,
  +     *             relate the element to a public/protected field and/or
  +     *             method of this Externalizable class.
        *
  +     * @param out the stream to write the object to
  +     * @exception IOException Includes any I/O exceptions that may occur
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
           super.writeExternal( out );
  -        out.writeObject( mReferenceID );
  +        out.writeObject( m_referenceID );
       }
   
       /**
  -     * Method readExternal
  -     *
  -     *
  -     * @param in
  -     *
  -     * @throws ClassNotFoundException
  -     * @throws IOException
  -     *
  +     * The object implements the readExternal method to restore its
  +     * contents by calling the methods of DataInput for primitive
  +     * types and readObject for objects, strings and arrays.  The
  +     * readExternal method must read the values in the same sequence
  +     * and with the same types as were written by writeExternal.
  +     *
  +     * @param in the stream to read data from in order to restore the object
  +     * @exception IOException if I/O errors occur
  +     * @exception ClassNotFoundException If the class for an object being
  +     *              restored cannot be found.
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
   
           super.readExternal( in );
   
  -        mReferenceID = (Long)in.readObject();
  +        m_referenceID = (Long)in.readObject();
       }
   }
  
  
  
  1.4       +3 -3      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/NotPublishedException.java
  
  Index: NotPublishedException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/NotPublishedException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NotPublishedException.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ NotPublishedException.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,7 +12,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 NotPublishedException extends AltrmiInvocationException
   {
  @@ -22,8 +22,8 @@
        * Constructor NotPublishedException
        *
        *
  -     * @param publishedServiceName
  -     * @param objectName
  +     * @param publishedServiceName the service name that is not published
  +     * @param objectName the object name within that that is not published
        *
        */
       public NotPublishedException( String publishedServiceName, String objectName )
  
  
  
  1.4       +6 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/NotPublishedReply.java
  
  Index: NotPublishedReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/NotPublishedReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NotPublishedReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ NotPublishedReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,7 +12,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 NotPublishedReply extends AltrmiReply
   {
  @@ -27,14 +27,15 @@
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return NOTPUBLISHEDREPLY;
  +        return AltrmiReplyConstants.NOTPUBLISHEDREPLY;
       }
   }
  
  
  
  1.4       +24 -23    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/OpenConnectionReply.java
  
  Index: OpenConnectionReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/OpenConnectionReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OpenConnectionReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ OpenConnectionReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,73 +16,74 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class OpenConnectionReply extends AltrmiReply implements Sessionable
   {
       static final long serialVersionUID = 5709776827804565629L;
   
  -    private String mTextToSign;
  -    private Long mSession;
  +    private String m_textToSign;
  +    private Long m_session;
   
       /**
        * Constructor OpenConnectionReply
        *
        *
        *
  -     * @param textToSign
  -     * @param session
  +     * @param textToSign text to sign for authenicating connections
  +     * @param session the session allocated by the server
        *
        */
       public OpenConnectionReply( String textToSign, Long session )
       {
  -        mTextToSign = textToSign;
  -        mSession = session;
  +        m_textToSign = textToSign;
  +        m_session = session;
       }
   
       /**
  -     * Constructor OpenConnectionReply
  +     * Constructor OpenConnectionReply for Externalization
        *
        *
        */
       public OpenConnectionReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return OPENCONNECTIONREPLY;
  +        return AltrmiReplyConstants.OPENCONNECTIONREPLY;
       }
   
       /**
  -     * Method getTextToSign
  +     * Get text to sign.
        *
        *
  -     * @return
  +     * @return the text to sign
        *
        */
       public String getTextToSign()
       {
  -        return mTextToSign;
  +        return m_textToSign;
       }
   
       /**
  -     * Method getSession
  +     * Get the session ID.
        *
        *
  -     * @return
  +     * @return the session identifier.
        *
        */
       public Long getSession()
       {
  -        return mSession;
  +        return m_session;
       }
   
       /**
  @@ -102,8 +103,8 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mTextToSign );
  -        out.writeObject( mSession );
  +        out.writeObject( m_textToSign );
  +        out.writeObject( m_session );
       }
   
       /**
  @@ -120,7 +121,7 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mTextToSign = (String)in.readObject();
  -        mSession = (Long)in.readObject();
  +        m_textToSign = (String)in.readObject();
  +        m_session = (Long)in.readObject();
       }
   }
  
  
  
  1.4       +6 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/OpenConnectionRequest.java
  
  Index: OpenConnectionRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/OpenConnectionRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OpenConnectionRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ OpenConnectionRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,21 +12,22 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class OpenConnectionRequest extends AltrmiRequest
   {
       static final long serialVersionUID = 1773735791378198918L;
   
       /**
  -     * Method getRequestCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public int getRequestCode()
       {
  -        return OPENCONNECTIONREQUEST;
  +        return AltrmiRequestConstants.OPENCONNECTIONREQUEST;
       }
   }
  
  
  
  1.4       +6 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/PingReply.java
  
  Index: PingReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/PingReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PingReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ PingReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,21 +12,22 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class PingReply extends NotPublishedReply
   {
       static final long serialVersionUID = 5655098880949413943L;
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return PINGREPLY;
  +        return AltrmiReplyConstants.PINGREPLY;
       }
   }
  
  
  
  1.4       +6 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/PingRequest.java
  
  Index: PingRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/PingRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PingRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ PingRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,21 +12,22 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class PingRequest extends AltrmiRequest
   {
       static final long serialVersionUID = -3908905385947590608L;
   
       /**
  -     * Method getRequestCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiRequestConstants
        *
        */
       public int getRequestCode()
       {
  -        return PINGREQUEST;
  +        return AltrmiRequestConstants.PINGREQUEST;
       }
   }
  
  
  
  1.3       +4 -4      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ProxyGenerationException.java
  
  Index: ProxyGenerationException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ProxyGenerationException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProxyGenerationException.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ ProxyGenerationException.java	23 May 2002 21:37:19 -0000	1.3
  @@ -12,7 +12,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 ProxyGenerationException extends Exception
   {
  @@ -21,11 +21,11 @@
        * Constructor ProxyGenerationException
        *
        *
  -     * @param s
  +     * @param cause the cause of the exception
        *
        */
  -    public ProxyGenerationException( String s )
  +    public ProxyGenerationException( String cause )
       {
  -        super( s );
  +        super( cause );
       }
   }
  
  
  
  1.3       +24 -24    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ProxyGenerator.java
  
  Index: ProxyGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ProxyGenerator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProxyGenerator.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ ProxyGenerator.java	23 May 2002 21:37:19 -0000	1.3
  @@ -12,97 +12,97 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public interface ProxyGenerator
   {
   
       /**
  -     * Method setInterfacesToExpose
  +     * Set the interfaces to expose.
        *
        *
  -     * @param interfacesToExpose
  +     * @param interfacesToExpose the interfaces to expose
        *
        */
       void setInterfacesToExpose( Class[] interfacesToExpose );
   
       /**
  -     * Method setAdditionalfacades
  +     * Set the additional facades
        *
        *
  -     * @param additionalFacades
  +     * @param additionalFacades additional facades/interfaces to expose
        *
        */
  -    void setAdditionalfacades( Class[] additionalFacades );
  +    void setAdditionalFacades( Class[] additionalFacades );
   
       /**
  -     * Method setSrcGenDir
  +     * Set the source generation directory
        *
        *
  -     * @param srcGenDir
  +     * @param srcGenDir the source generation directory (if appl).
        *
        */
       void setSrcGenDir( String srcGenDir );
   
       /**
  -     * Method setClasspath
  +     * Set the classpath
        *
        *
  -     * @param classpath
  +     * @param classpath the classpath for compilation (if appl).
        *
        */
       void setClasspath( String classpath );
   
       /**
  -     * Method setClassGenDir
  +     * Set the class generation directory.
        *
        *
  -     * @param classGenDir
  +     * @param classGenDir the class generation directory (if appl).
        *
        */
       void setClassGenDir( String classGenDir );
   
       /**
  -     * Method setGenName
  +     * Set the generation name.
        *
        *
  -     * @param genName
  +     * @param genName the generation name
        *
        */
       void setGenName( String genName );
   
       /**
  -     * Method generateSrc
  +     * Generate source
        *
        *
  -     * @param cL
  +     * @param classLoader the classloader active during generation of source.
        *
  -     * @throws ProxyGenerationException
  +     * @throws ProxyGenerationException for when source generation has failed.
        *
        */
  -    void generateSrc( ClassLoader cL ) throws ProxyGenerationException;
  +    void generateSrc( ClassLoader classLoader ) throws ProxyGenerationException;
   
       /**
  -     * Method generateClass
  +     * Generate class
        *
        *
  -     * @param cL
  +     * @param classLoader the classloader active during compilation/generation.
        *
        */
  -    void generateClass( ClassLoader cL );
  +    void generateClass( ClassLoader classLoader );
   
       /**
  -     * Method generateDeferredClasses
  +     * Generate deferred classes
        *
        *
        */
       void generateDeferredClasses();
   
       /**
  -     * Method verbose
  +     * verbose mode.
        *
        *
  -     * @param trueFalse
  +     * @param trueFalse report on generation process
        *
        */
       void verbose( boolean trueFalse );
  
  
  
  1.4       +19 -19    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/PublishedNameRequest.java
  
  Index: PublishedNameRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/PublishedNameRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PublishedNameRequest.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ PublishedNameRequest.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,61 +16,61 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public abstract class PublishedNameRequest extends AltrmiRequest
   {
       static final long serialVersionUID = -1313413018904303303L;
   
  -    private String mPublishedServiceName;
  -    private String mObjectName;
  +    private String m_publishedServiceName;
  +    private String m_objectName;
   
       /**
        * Constructor PublishedNameRequest
        *
        *
        *
  -     * @param publishedServiceName
  -     * @param objectName
  +     * @param publishedServiceName the published service name
  +     * @param objectName the object name within that
        *
        */
       public PublishedNameRequest( String publishedServiceName, String objectName )
       {
  -        mPublishedServiceName = publishedServiceName;
  -        mObjectName = objectName;
  +        m_publishedServiceName = publishedServiceName;
  +        m_objectName = objectName;
       }
   
       /**
  -     * Constructor PublishedNameRequest
  +     * Constructor PublishedNameRequest for Externalization
        *
        *
        */
       public PublishedNameRequest()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getPublishedServiceName
  +     * Get published service name
        *
        *
  -     * @return
  +     * @return the published service name
        *
        */
       public String getPublishedServiceName()
       {
  -        return mPublishedServiceName;
  +        return m_publishedServiceName;
       }
   
       /**
  -     * Method getObjectName
  +     * Get object name
        *
        *
  -     * @return
  +     * @return the object name
        *
        */
       public String getObjectName()
       {
  -        return mObjectName;
  +        return m_objectName;
       }
   
       /**
  @@ -90,8 +90,8 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mPublishedServiceName );
  -        out.writeObject( mObjectName );
  +        out.writeObject( m_publishedServiceName );
  +        out.writeObject( m_objectName );
       }
   
       /**
  @@ -108,7 +108,7 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mPublishedServiceName = (String)in.readObject();
  -        mObjectName = (String)in.readObject();
  +        m_publishedServiceName = (String)in.readObject();
  +        m_objectName = (String)in.readObject();
       }
   }
  
  
  
  1.4       +16 -15    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/RequestFailedReply.java
  
  Index: RequestFailedReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/RequestFailedReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RequestFailedReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ RequestFailedReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,57 +16,58 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class RequestFailedReply extends AltrmiReply
   {
       static final long serialVersionUID = -708020416286440120L;
   
  -    private String mFailureReason;
  +    private String m_failureReason;
   
       /**
        * Constructor RequestFailedReply
        *
        *
  -     * @param failureReason
  +     * @param failureReason the reason for the failure
        *
        */
       public RequestFailedReply( String failureReason )
       {
  -        this.mFailureReason = failureReason;
  +        this.m_failureReason = failureReason;
       }
   
       /**
  -     * Constructor RequestFailedReply
  +     * Constructor RequestFailedReply for Externalization
        *
        *
        */
       public RequestFailedReply()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getFailureReason
  +     * Get failure reason.
        *
        *
  -     * @return
  +     * @return the failure reason
        *
        */
       public String getFailureReason()
       {
  -        return mFailureReason;
  +        return m_failureReason;
       }
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  -     *
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return REQUESTFAILEDREPLY;
  +        return AltrmiReplyConstants.REQUESTFAILEDREPLY;
       }
   
       /**
  @@ -86,7 +87,7 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mFailureReason );
  +        out.writeObject( m_failureReason );
       }
   
       /**
  @@ -103,6 +104,6 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mFailureReason = (String)in.readObject();
  +        m_failureReason = (String)in.readObject();
       }
   }
  
  
  
  1.3       +5 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/RmiAltrmiInvocationHandler.java
  
  Index: RmiAltrmiInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/RmiAltrmiInvocationHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RmiAltrmiInvocationHandler.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ RmiAltrmiInvocationHandler.java	23 May 2002 21:37:19 -0000	1.3
  @@ -15,20 +15,20 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version * $Revision: 1.2 $
  + * @version * $Revision: 1.3 $
    */
   public interface RmiAltrmiInvocationHandler extends Remote
   {
   
       /**
  -     * Method handleInvocation
  +     * Handle method invocation.
        *
        *
  -     * @param request
  +     * @param request the request to marshall over RMI
        *
  -     * @return
  +     * @return the reply got back from the server
        *
  -     * @throws RemoteException
  +     * @throws RemoteException in case there is outage.
        *
        */
       AltrmiReply handleInvocation( AltrmiRequest request ) throws RemoteException;
  
  
  
  1.3       +16 -16    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/SerializationHelper.java
  
  Index: SerializationHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/SerializationHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SerializationHelper.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ SerializationHelper.java	23 May 2002 21:37:19 -0000	1.3
  @@ -18,20 +18,20 @@
    *
    *
    * @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 SerializationHelper
   {
   
       /**
  -     * Method getBytesFromInstance
  +     * Get bytes from instance
        *
        *
  -     * @param instance
  +     * @param instance the object to turn in to serialized byte array
        *
  -     * @return
  +     * @return the byte array
        *
  -     * @throws IOException
  +     * @throws IOException if IO problem
        *
        */
       public static byte[] getBytesFromInstance( Object instance ) throws IOException
  @@ -54,15 +54,15 @@
       }
   
       /**
  -     * Method getInstanceFromBytes
  +     * Get instance from bytes.
        *
        *
  -     * @param byteArray
  +     * @param byteArray to turn into an instance
        *
  -     * @return
  +     * @return the instance
        *
  -     * @throws ClassNotFoundException
  -     * @throws IOException
  +     * @throws ClassNotFoundException if the class-def can't be resolved.
  +     * @throws IOException if IO problem
        *
        */
       public static Object getInstanceFromBytes( byte[] byteArray )
  @@ -72,16 +72,16 @@
       }
   
       /**
  -     * Method getInstanceFromBytes
  +     * Get instance from bytes.
        *
        *
  -     * @param byteArray
  -     * @param classLoader
  +     * @param byteArray to turn into an instance
  +     * @param classLoader the classloader that can resolve the class-def
        *
  -     * @return
  +     * @return the instance
        *
  -     * @throws ClassNotFoundException
  -     * @throws IOException
  +     * @throws ClassNotFoundException if the class-def can't be resolved.
  +     * @throws IOException if IO problem
        *
        */
       public static Object getInstanceFromBytes( byte[] byteArray, ClassLoader classLoader )
  
  
  
  1.3       +3 -3      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/Sessionable.java
  
  Index: Sessionable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/Sessionable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Sessionable.java	24 Apr 2002 12:42:58 -0000	1.2
  +++ Sessionable.java	23 May 2002 21:37:19 -0000	1.3
  @@ -12,15 +12,15 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version * $Revision: 1.2 $
  + * @version * $Revision: 1.3 $
    */
   public interface Sessionable
   {
   
       /**
  -     * Method getSession
  +     * Get the session ID.
        *
  -     * @return
  +     * @return the session identifier
        *
        */
       Long getSession();
  
  
  
  1.4       +6 -5      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/SuspendedReply.java
  
  Index: SuspendedReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/SuspendedReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SuspendedReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ SuspendedReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -12,21 +12,22 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class SuspendedReply extends TryLaterReply
   {
       static final long serialVersionUID = 7687775321788037967L;
   
       /**
  -     * Method getReplyCode.  This is quicker than instanceof for type checking.
  +     * Gets number that represents type for this class.
  +     * This is quicker than instanceof for type checking.
        *
  -     *
  -     * @return
  +     * @return the representative code
  +     * @see AltrmiReplyConstants
        *
        */
       public int getReplyCode()
       {
  -        return SUSPENDEDREPLY;
  +        return AltrmiReplyConstants.SUSPENDEDREPLY;
       }
   }
  
  
  
  1.4       +10 -10    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/TryLaterReply.java
  
  Index: TryLaterReply.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/TryLaterReply.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TryLaterReply.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ TryLaterReply.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,13 +16,13 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public abstract class TryLaterReply extends AltrmiReply
   {
       static final long serialVersionUID = -6459959300465362602L;
   
  -    private int mSuggestedDelayMillis;
  +    private int m_suggestedDelayMillis;
   
       /**
        * Constructor TryLaterReply
  @@ -30,7 +30,7 @@
        */
       public TryLaterReply()
       {
  -        mSuggestedDelayMillis = 5 * 1000;    // ten seconds.
  +        m_suggestedDelayMillis = 5 * 1000;    // ten seconds.
       }
   
       /**
  @@ -38,24 +38,24 @@
        *
        *
        *
  -     * @param suggestedDelayMillis
  +     * @param suggestedDelayMillis the amount of milliseconds sugested to the client
        *
        */
       public TryLaterReply( int suggestedDelayMillis )
       {
  -        mSuggestedDelayMillis = suggestedDelayMillis;
  +        m_suggestedDelayMillis = suggestedDelayMillis;
       }
   
       /**
  -     * Method getDelayMillis
  +     * Get delay in milliseconds.
        *
        *
  -     * @return
  +     * @return get delay in milliseconds
        *
        */
       public int getSuggestedDelayMillis()
       {
  -        return mSuggestedDelayMillis;
  +        return m_suggestedDelayMillis;
       }
   
       /**
  @@ -75,7 +75,7 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeInt( mSuggestedDelayMillis );
  +        out.writeInt( m_suggestedDelayMillis );
       }
   
       /**
  @@ -92,6 +92,6 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mSuggestedDelayMillis = in.readInt();
  +        m_suggestedDelayMillis = in.readInt();
       }
   }
  
  
  
  1.4       +19 -19    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/UserPasswordAuthentication.java
  
  Index: UserPasswordAuthentication.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/UserPasswordAuthentication.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UserPasswordAuthentication.java	24 Apr 2002 12:42:58 -0000	1.3
  +++ UserPasswordAuthentication.java	23 May 2002 21:37:19 -0000	1.4
  @@ -16,60 +16,60 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public final class UserPasswordAuthentication extends AltrmiAuthentication
   {
       static final long serialVersionUID = -5410097680279080054L;
   
  -    private String mUserID;
  -    private String mPassword;
  +    private String m_userID;
  +    private String m_password;
   
       /**
        * Constructor UserPasswordAuthentication
        *
        *
  -     * @param userID
  -     * @param password
  +     * @param userID the user ID
  +     * @param password the password
        *
        */
       public UserPasswordAuthentication( String userID, String password )
       {
  -        mUserID = userID;
  -        mPassword = password;
  +        m_userID = userID;
  +        m_password = password;
       }
   
       /**
  -     * Constructor UserPasswordAuthentication
  +     * Constructor UserPasswordAuthentication for Externalization
        *
        *
        */
       public UserPasswordAuthentication()
       {
  -    }    // for Externalization
  +    }
   
       /**
  -     * Method getUserID
  +     * Get user ID.
        *
        *
  -     * @return
  +     * @return the user ID
        *
        */
       public String getUserID()
       {
  -        return mUserID;
  +        return m_userID;
       }
   
       /**
  -     * Method getPassword
  +     * Get password.
        *
        *
  -     * @return
  +     * @return the password
        *
        */
       public String getPassword()
       {
  -        return mPassword;
  +        return m_password;
       }
   
       /**
  @@ -89,8 +89,8 @@
        */
       public void writeExternal( ObjectOutput out ) throws IOException
       {
  -        out.writeObject( mUserID );
  -        out.writeObject( mPassword );
  +        out.writeObject( m_userID );
  +        out.writeObject( m_password );
       }
   
       /**
  @@ -107,7 +107,7 @@
        */
       public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
       {
  -        mUserID = (String)in.readObject();
  -        mPassword = (String)in.readObject();
  +        m_userID = (String)in.readObject();
  +        m_password = (String)in.readObject();
       }
   }
  
  
  
  1.1                  jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiReplyConstants.java
  
  Index: AltrmiReplyConstants.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.excalibur.altrmi.common;
  
  
  /**
   * Interface AltrmiReplyConstants
   *
   *
   * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
   * @version * $Revision: 1.1 $
   */
  public interface AltrmiReplyConstants
   {
  
      // 'good' replies after 100
      /**
       * A reply of type class (generated proxy)
       */
      int CLASSREPLY = 1;
      /**
       * A reply of type method
       */
      int METHODREPLY = 2;
      /**
       * A reply of type exception
       */
      int EXCEPTIONREPLY = 3;
      /**
       * A reply of type lookup
       */
      int LOOKUPREPLY = 4;
      /**
       * A reply of facade as a result of a method request
       */
      int METHODFACADEREPLY = 5;
      /**
       * An ack on open of connection
       */
      int OPENCONNECTIONREPLY = 6;
      /**
       * An ack on simple ping
       */
      int PINGREPLY = 7;
      /**
       * A list of published services
       */
      int LISTREPLY = 8;
      /**
       * A reply of and array of facades
       */
      int METHODFACADEARRAYREPLY = 9;
      /**
       * A grabage collection reply
       */
      int GCREPLY = 10;
  
      // 'bad' replies after 100
  
      /**
       * A some type of problem occured.
       */
      int PROBLEMREPLY = 100;
      /**
       * The service requested was not published
       */
      int NOTPUBLISHEDREPLY = 102;
      /**
       * The request failed
       */
      int REQUESTFAILEDREPLY = 103;
      /**
       * The service is suspended
       */
      int SUSPENDEDREPLY = 104;
      /**
       * The connection has been ended
       */
      int ENDCONNECTIONREPLY = 105;
      /**
       * There is no such reference
       */
      int NOSUCHREFERENCEREPLY = 106;
      /**
       * The proxy class could not be retrieved.
       */
      int CLASSRETRIEVALFAILEDREPLY = 107;
  }
  
  
  
  1.1                  jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AltrmiRequestConstants.java
  
  Index: AltrmiRequestConstants.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.excalibur.altrmi.common;
  
  /**
   * Interface AltrmiRequestConstants a set of constants for requests over AltRMI.
   *
   * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
   * @version * $Revision: 1.1 $*
   */
  public interface AltrmiRequestConstants
   {
      /**
       * A request for a class
       */
      int CLASSREQUEST = 301;
      /**
       * A method request
       */
      int METHODREQUEST = 302;
      /**
       * A method request to a facade
       */
      int METHODFACADEREQUEST = 303;
      /**
       * A initial lookup of a service.
       */
      int LOOKUPREQUEST = 304;
      /**
       * An initial opening of connection
       */
      int OPENCONNECTIONREQUEST = 305;
      /**
       * A ping to keep the connection alive
       */
      int PINGREQUEST = 306;
      /**
       * A list of published services
       */
      int LISTREQUEST = 307;
      /**
       * A request for garbage collection for a finished with proxy
       */
      int GCREQUEST = 308;
  }
  
  
  
  1.3       +1095 -1095jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/generator/BCELProxyGeneratorImpl.java
  
  Index: BCELProxyGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/generator/BCELProxyGeneratorImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BCELProxyGeneratorImpl.java	15 May 2002 20:17:48 -0000	1.2
  +++ BCELProxyGeneratorImpl.java	23 May 2002 21:37:21 -0000	1.3
  @@ -38,1110 +38,1110 @@
   
   /**
    * Class BCElProxyGeneratorImpl
  - * 	This class generates Altrmi stubs using Jakarta BCEL library.
  + *  This class generates Altrmi stubs using Jakarta BCEL library.
    * 
    * @HOWTO: Use 'javap' to read the bytecodes of the stubs generated
  - *  	by using the original stub-generator(which generates pure java code).
  + *      by using the original stub-generator(which generates pure java code).
    *
    * @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class BCELProxyGeneratorImpl
  -	extends ProxyGeneratorImpl
  -	implements ProxyGenerator
  +    extends ProxyGeneratorImpl
  +    implements ProxyGenerator
   {
  +    
  +    //bcel 
  +    private static final String mStubPrefix = "AltrmiGenerated";
  +    private InstructionFactory mFactory;
  +    private ConstantPoolGen mConstantsPool;
  +    private ClassGen mClassGen;
  +    private ArrayList mInternalFieldRepresentingClasses;
  +    private int mArrayDepth_ = 0;
  +
  +    /*
  +     * @see ProxyGenerator#generateClass(ClassLoader)
  +     */
  +    public void generateClass(ClassLoader cL)
  +    {
  +
  +        //create the Main Stubs:
  +        generateAltrmiProxyClass(mStubPrefix + mGenName + "_Main", mInterfacesToExpose);
  +        generateAltrmiProxyClass2(
  +            mStubPrefix + "2" + mGenName + "_Main",
  +            mStubPrefix + mGenName + "_Main",
  +            mInterfacesToExpose);
  +
  +        //Create the Additional Facades 
  +        if (mAdditionalFacades != null)
  +        {
  +            for (int i = 0; i < mAdditionalFacades.length; i++)
  +            {
  +                String encodedClassName = encodeClassName(mAdditionalFacades[i]);
  +                generateAltrmiProxyClass(
  +                    mStubPrefix + mGenName + "_" + encodedClassName,
  +                    new Class[] { mAdditionalFacades[i] });
  +                generateAltrmiProxyClass2(
  +                    mStubPrefix + "2" + mGenName + "_" + encodedClassName,
  +                    mStubPrefix + mGenName + "_" + encodedClassName,
  +                    new Class[] { mAdditionalFacades[i] });
  +
  +            }
  +        }
  +
  +    }
  +
  +    /**
  +     * Method generateAltrmiProxyClass.
  +     *         Create AltrmiProxy Implementation with all interface methods 
  +     *     Generating AltrmiGeneratedGENNAME_Main class
  +     * @param className
  +     * @param interfacesToStubify
  +     */
  +    private void generateAltrmiProxyClass(
  +        String mGeneratedClassName,
  +        Class[] interfacesToStubify)
  +    {
  +        //Start creating class 
  +        createNewClassDeclaration(mGeneratedClassName);
  +        /******** CONSTRUCTOR **************/
  +        //create constructor that takes ProxyHelper
  +        createConstructor(mGeneratedClassName);
  +        /******** FIELDS *************/
  +        //create fields 
  +        createFields();
  +        /******** METHODS *************/
  +        //create fields 
  +        createAltrmiGetReferenceIDMethod(mGeneratedClassName);
  +        createHelperMethodForDotClassCalls(mGeneratedClassName);
  +        createInterfaceMethods(mGeneratedClassName, interfacesToStubify);
  +        //TODO://Finally finally fInally "DUMP" the  class file  that we deligently prepared somewhere
  +        FileOutputStream fos = null;
  +        try
  +        {
  +            fos = new FileOutputStream(mClassGenDir + "/" + mGeneratedClassName + ".class");
  +            mClassGen.getJavaClass().dump(fos);
  +            fos.close();
  +        }
  +        catch (FileNotFoundException fnfe)
  +        {
  +            fnfe.printStackTrace();
  +        }
  +        catch (IOException ioe)
  +        {
  +            ioe.printStackTrace();
  +        }
  +    }
  +
  +    /**
  +     * Method generateAltrmiProxyClass2.
  +     *      Create the Stub Class purely implementing the Interface  and
  +     *             inheriting the implementation from the helper class
  +     *     Generating AltrmiGenerated2GENNAME_Main class
  +     * @param className
  +     */
  +    private void generateAltrmiProxyClass2(
  +        String mGeneratedClassName2,
  +        String mGeneratedClassName,
  +        Class[] interfacesToStubify)
  +    {
  +        //start creating the class
  +        createNewClassDeclaration2(
  +            mGeneratedClassName2,
  +            mGeneratedClassName,
  +            interfacesToStubify);
  +        //create the constructor 
  +        createConstructor2(mGeneratedClassName2, mGeneratedClassName);
  +        try
  +        {
  +            FileOutputStream fos =
  +                new FileOutputStream(mClassGenDir + "/" + mGeneratedClassName2 + ".class");
  +            mClassGen.getJavaClass().dump(fos);
  +            fos.close();
  +        }
  +        catch (FileNotFoundException fnfe)
  +        {
  +            fnfe.printStackTrace();
  +        }
  +        catch (IOException ioe)
  +        {
  +            ioe.printStackTrace();
  +        }
  +
  +    }
  +
  +    //<BCEL>  <!-- Enter the BCEL Arena -->
  +
  +    /**
  +     * Method createAndInitializeClass.
  +     *     This method starts creating the class.
  +     */
  +    private void createNewClassDeclaration(String mGeneratedClassName)
  +    {
  +
  +        mClassGen =
  +            new ClassGen(
  +                mGeneratedClassName,
  +                "java.lang.Object",
  +                mGeneratedClassName + ".java",
  +                Constants.ACC_PUBLIC | Constants.ACC_SUPER,
  +                new String[] { "org.apache.excalibur.altrmi.client.AltrmiProxy" });
  +        mConstantsPool = mClassGen.getConstantPool();
  +        mFactory = new InstructionFactory(mClassGen, mConstantsPool);
  +        mInternalFieldRepresentingClasses = new ArrayList();
  +
  +    }
  +    /**
  +     * Method createNewClassDeclaration2.
  +     *     Create a class which extends a class contained the impl of the Interface and 
  +     *                     and  implements the interface
  +     */
  +    private void createNewClassDeclaration2(
  +        String mGeneratedClassName2,
  +        String mGeneratedClassName,
  +        Class[] interfacesToStubify)
  +    {
  +        String[] mInterafacesToImplement = new String[interfacesToStubify.length];
  +        for (int i = 0; i < mInterafacesToImplement.length; i++)
  +            mInterafacesToImplement[i] = interfacesToStubify[i].getName();
  +        mClassGen =
  +            new ClassGen(
  +                mGeneratedClassName2,
  +                mGeneratedClassName,
  +                mGeneratedClassName2 + ".java",
  +                Constants.ACC_PUBLIC | Constants.ACC_FINAL | Constants.ACC_SUPER,
  +                mInterafacesToImplement);
  +        mConstantsPool = mClassGen.getConstantPool();
  +        mFactory = new InstructionFactory(mClassGen, mConstantsPool);
  +    }
  +    /**
  +     * Method createConstructor.
  +     *     This method adds a constructor that takes in a ProxyHelper Instance
  +     */
  +    private void createConstructor(String mGeneratedClassName)
  +    {
  +        InstructionList il = new InstructionList();
  +        MethodGen method =
  +            new MethodGen(
  +                Constants.ACC_PUBLIC,
  +                Type.VOID,
  +                new Type[] { new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper")},
  +                new String[] { "arg0" },
  +                "<init>",
  +                mGeneratedClassName,
  +                il,
  +                mConstantsPool);
  +        InstructionHandle ih_0 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.Object",
  +                "<init>",
  +                Type.VOID,
  +                Type.NO_ARGS,
  +                Constants.INVOKESPECIAL));
  +        InstructionHandle ih_4 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  +        il.append(mFactory.createLoad(Type.OBJECT, 1));
  +        il.append(
  +            mFactory.createFieldAccess(
  +                mGeneratedClassName,
  +                "mProxyHelper",
  +                new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper"),
  +                Constants.PUTFIELD));
  +        InstructionHandle ih_9 = il.append(mFactory.createReturn(Type.VOID));
  +        method.setMaxStack();
  +        method.setMaxLocals();
  +        mClassGen.addMethod(method.getMethod());
  +        il.dispose();
  +    }
  +
  +    /**
  +     * Method createConstructor2.
  +     */
  +    private void createConstructor2(
  +        String mGeneratedClassName2,
  +        String mGeneratedClassName)
  +    {
  +        InstructionList il = new InstructionList();
  +        MethodGen method =
  +            new MethodGen(
  +                Constants.ACC_PUBLIC,
  +                Type.VOID,
  +                new Type[] { new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper")},
  +                new String[] { "arg0" },
  +                "<init>",
  +                mGeneratedClassName2,
  +                il,
  +                mConstantsPool);
  +        InstructionHandle ih_0 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  +        il.append(mFactory.createLoad(Type.OBJECT, 1));
  +        il.append(
  +            mFactory.createInvoke(
  +                mGeneratedClassName,
  +                "<init>",
  +                Type.VOID,
  +                new Type[] { new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper")},
  +                Constants.INVOKESPECIAL));
  +        InstructionHandle ih_5 = il.append(mFactory.createReturn(Type.VOID));
  +        method.setMaxStack();
  +        method.setMaxLocals();
  +        mClassGen.addMethod(method.getMethod());
  +        il.dispose();
  +    }
  +
  +    /**
  +     * Method createFields.
  +     * =================adding===============
  +     *   private transient org.apache.excalibur.altrmi.client.ProxyHelper mProxyHelper;
  +     * =================adding===============
  +     *     Add 
  +     */
  +    private void createFields()
  +    {
  +        FieldGen field;
  +        field =
  +            new FieldGen(
  +                Constants.ACC_PRIVATE | Constants.ACC_TRANSIENT,
  +                new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper"),
  +                "mProxyHelper",
  +                mConstantsPool);
  +        mClassGen.addField(field.getField());
  +    }
  +
  +    /**
  +     * Method createAltrmiGetReferenceIDMethod. 
  +     * =================adding=====================================
  +     *      public Long altrmiGetReferenceID(Object factoryThatIsAsking) {
  +     *   return mProxyHelper.getReferenceID(factoryThatIsAsking);
  +     *        }
  +     * =================adding=====================================
  +     */
  +    private void createAltrmiGetReferenceIDMethod(String mGeneratedClassName)
  +    {
  +        InstructionList il = new InstructionList();
  +        MethodGen method =
  +            new MethodGen(
  +                Constants.ACC_PUBLIC,
  +                new ObjectType("java.lang.Long"),
  +                new Type[] { Type.OBJECT },
  +                new String[] { "arg0" },
  +                "altrmiGetReferenceID",
  +                mGeneratedClassName,
  +                il,
  +                mConstantsPool);
  +        InstructionHandle ih_0 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  +        il.append(
  +            mFactory.createFieldAccess(
  +                mGeneratedClassName,
  +                "mProxyHelper",
  +                new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper"),
  +                Constants.GETFIELD));
  +        il.append(mFactory.createLoad(Type.OBJECT, 1));
  +        il.append(
  +            mFactory.createInvoke(
  +                "org.apache.excalibur.altrmi.client.ProxyHelper",
  +                "getReferenceID",
  +                new ObjectType("java.lang.Long"),
  +                new Type[] { Type.OBJECT },
  +                Constants.INVOKEINTERFACE));
  +        InstructionHandle ih_8 = il.append(mFactory.createReturn(Type.OBJECT));
  +        method.setMaxStack();
  +        method.setMaxLocals();
  +        mClassGen.addMethod(method.getMethod());
  +        il.dispose();
  +    }
  +
  +    /**
  +     * Method createHelperMethodForDotClassCalls.
  +     *     This class creates a method class$(String) which is used 
  +     *     during SomeClass.class instruction
  +     * 
  +     */
  +    private void createHelperMethodForDotClassCalls(String mGeneratedClassName)
  +    {
  +        InstructionList il = new InstructionList();
  +        MethodGen method =
  +            new MethodGen(
  +                Constants.ACC_STATIC,
  +                new ObjectType("java.lang.Class"),
  +                new Type[] { Type.STRING },
  +                new String[] { "arg0" },
  +                "class$",
  +                mGeneratedClassName,
  +                il,
  +                mConstantsPool);
  +        InstructionHandle ih_0 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.Class",
  +                "forName",
  +                new ObjectType("java.lang.Class"),
  +                new Type[] { Type.STRING },
  +                Constants.INVOKESTATIC));
  +        InstructionHandle ih_4 = il.append(mFactory.createReturn(Type.OBJECT));
  +        InstructionHandle ih_5 = il.append(mFactory.createStore(Type.OBJECT, 1));
  +        il.append(mFactory.createNew("java.lang.NoClassDefFoundError"));
  +        il.append(InstructionConstants.DUP);
  +        il.append(mFactory.createLoad(Type.OBJECT, 1));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.Throwable",
  +                "getMessage",
  +                Type.STRING,
  +                Type.NO_ARGS,
  +                Constants.INVOKEVIRTUAL));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.NoClassDefFoundError",
  +                "<init>",
  +                Type.VOID,
  +                new Type[] { Type.STRING },
  +                Constants.INVOKESPECIAL));
  +        InstructionHandle ih_17 = il.append(InstructionConstants.ATHROW);
  +        method.addExceptionHandler(
  +            ih_0,
  +            ih_4,
  +            ih_5,
  +            new ObjectType("java.lang.ClassNotFoundException"));
  +        method.setMaxStack();
  +        method.setMaxLocals();
  +        mClassGen.addMethod(method.getMethod());
  +        il.dispose();
  +    }
  +
  +    /**
  +     * Method createInterfaceMethods.
  +     *     This methods shall iterate through the set of methods
  +     *     of the interface creating equivalent methods for the
  +     *     stubs in the process.
  +     */
  +    private void createInterfaceMethods(
  +        String mGeneratedClassName,
  +        Class[] interfacesToStubify)
  +    {
  +        for (int x = 0; x < interfacesToStubify.length; x++)
  +        {
  +            Class clazz = interfacesToStubify[x];
  +
  +            if (mVerbose)
  +            {
  +                System.out.println("ProxyGen: Processing interface: " + clazz.getName());
  +            }
  +            Method[] methods = clazz.getMethods();
  +            for (int i = 0; i < methods.length; i++)
  +            {
  +                createInterfaceMethod(mGeneratedClassName, methods[i]);
  +            }
  +
  +        }
  +
  +    }
  +
  +    /**
  +     * Method createInterfaceMethod.
  +     *     Add the java.lang.reflect.Method wrapper into the stub
  +     * @param m
  +     */
  +    private void createInterfaceMethod(String mGeneratedClassName, Method m)
  +    {
  +        InstructionList il = new InstructionList();
  +        MethodGen method =
  +            new MethodGen(
  +                Constants.ACC_PUBLIC,
  +                getReturnType(m),
  +                getArguments(m),
  +                getArgumentNames(m),
  +                m.getName(),
  +                mGeneratedClassName,
  +                il,
  +                mConstantsPool);
  +
  +        //debug(getArguments(m));
  +
  +        // **** TO Insert TEST Bytecode Inside the stub ,uncomment the subsequent lines
  +        //if (mVerbose)
  +        //    createTestMethod(il, "calling " + m.getName());
  +
  +        /*
  +         *  Declaration of Arrays
  +         * =======================
  +         *  Object[] args = new Object[__number__of__arguments];
  +         *  Class[] argClasses = new Class[__number__of__arguments]; 
  +         */
  +
  +        int variableIndex, numberOfArguments;
  +        Class[] paramTypes = m.getParameterTypes();
  +        numberOfArguments = paramTypes.length;
  +        variableIndex = getFreeIndexToStart(paramTypes);
  +        InstructionHandle ih_0 = il.append(new PUSH(mConstantsPool, numberOfArguments));
  +        il.append((Instruction) mFactory.createNewArray(Type.OBJECT, (short) 1));
  +        il.append(mFactory.createStore(Type.OBJECT, ++variableIndex));
  +        InstructionHandle ih_5 = il.append(new PUSH(mConstantsPool, numberOfArguments));
  +        il.append(
  +            (Instruction) mFactory.createNewArray(
  +                new ObjectType("java.lang.Class"),
  +                (short) 1));
  +        il.append(mFactory.createStore(Type.OBJECT, ++variableIndex));
  +
  +        /*
  +         *  Assigning parameter into Object[] and Class[] Array
  +         * ====================================================
  +         *   args[0] = v0;
  +         *   argClasses[0]=v0Class.class
  +         */
  +        //Used for adjustment of double/long datatype: 
  +        Type _previousType = null;
  +        int _loadIndex = 0;
  +        for (int i = 0; i < numberOfArguments; i++)
  +        {
  +            // assigning the obj ref's
  +            il.append(mFactory.createLoad(Type.OBJECT, variableIndex - 1));
  +            il.append(new PUSH(mConstantsPool, i));
  +            String className = paramTypes[i].getName();
  +            //adjust for any previous wider datatype (double/long)
  +            if (_previousType != null
  +                && (_previousType == Type.DOUBLE || _previousType == Type.LONG))
  +                ++_loadIndex;
  +            if (paramTypes[i].isPrimitive())
  +            {
  +                il.append(mFactory.createNew(getJavaWrapperClass(className)));
  +                il.append(InstructionConstants.DUP);
  +                il.append(mFactory.createLoad(getBCELPrimitiveType(className), ++_loadIndex));
  +                il.append(
  +                    mFactory.createInvoke(
  +                        getJavaWrapperClass(className),
  +                        "<init>",
  +                        Type.VOID,
  +                        new Type[] { getBCELPrimitiveType(className)},
  +                        Constants.INVOKESPECIAL));
  +                il.append(InstructionConstants.AASTORE);
  +            }
  +            else
  +            {
  +
  +                //create the static fields for enabling .class calls
  +                String _encodedFieldName;
  +                if (paramTypes[i].isArray())
  +                {
  +                    int _index = className.lastIndexOf('[');
  +                    if (className.charAt(_index + 1) == 'L')
  +                        _encodedFieldName =
  +                            "array$"
  +                                + className.substring(1 + _index, className.length() - 1).replace('.', '$');
  +                    else
  +                        _encodedFieldName =
  +                            "array$" + className.substring(1 + _index, className.length());
  +                }
  +                else
  +                    _encodedFieldName = "class$" + className.replace('.', '$');
  +                
  +                addField(_encodedFieldName);
  +                // ******** TODO assign the obj reference 
  +                il.append(mFactory.createLoad(Type.OBJECT, variableIndex - 1));
  +                il.append(new PUSH(mConstantsPool, i));
  +                il.append(mFactory.createLoad(Type.OBJECT, ++_loadIndex));
  +                il.append(InstructionConstants.AASTORE);
  +
  +                // *********TODO assign the class ref's
  +                il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +                il.append(new PUSH(mConstantsPool, i));
  +                il.append(
  +                    mFactory.createFieldAccess(
  +                        mGeneratedClassName,
  +                        _encodedFieldName,
  +                        new ObjectType("java.lang.Class"),
  +                        Constants.GETSTATIC));
  +                BranchInstruction ifnull =
  +                    mFactory.createBranchInstruction(Constants.IFNULL, null);
  +                il.append(ifnull);
  +                il.append(
  +                    mFactory.createFieldAccess(
  +                        mGeneratedClassName,
  +                        _encodedFieldName,
  +                        new ObjectType("java.lang.Class"),
  +                        Constants.GETSTATIC));
  +                BranchInstruction goHeadToStoreRef =
  +                    mFactory.createBranchInstruction(Constants.GOTO, null);
  +                il.append(goHeadToStoreRef);
  +                InstructionHandle ifnullStartHere =
  +                    il.append(new PUSH(mConstantsPool, className));
  +
  +                ifnull.setTarget(ifnullStartHere);
  +
  +                il.append(
  +                    mFactory.createInvoke(
  +                        mGeneratedClassName,
  +                        "class$",
  +                        new ObjectType("java.lang.Class"),
  +                        new Type[] { Type.STRING },
  +                        Constants.INVOKESTATIC));
  +                il.append(InstructionConstants.DUP);
  +                il.append(
  +                    mFactory.createFieldAccess(
  +                        mGeneratedClassName,
  +                        _encodedFieldName,
  +                        new ObjectType("java.lang.Class"),
  +                        Constants.PUTSTATIC));
  +                InstructionHandle storeClassRef = il.append(InstructionConstants.AASTORE);
  +                goHeadToStoreRef.setTarget(storeClassRef);
  +
  +            }
  +            _previousType = getBCELPrimitiveType(className);
  +        }
  +
  +        /* Within the stub put the 
  +         * Call processObjectRequest on the instance ProxyHelper held within the stub
  +         * Thus,
  +         * Injecting the following
  +         * ================================================
  +         * try 
  +         * {
  +             *      Object retVal = mProxyHelper.processObjectRequest("foo1(int, float, java.lang.String, java.lang.Integer)",args,argClasses);
  +             *      return (java.lang.String) retVal;
  +         * } 
  +         *  catch (Throwable t) 
  +         *     {
  +             *         if (t instanceof RuntimeException) 
  +             *         { 
  +             *           throw (RuntimeException) t;
  +             *      } else if (t instanceof Error) 
  +             *         { 
  +             *                throw (Error) t;
  +             *      } else 
  +             *         { 
  +             *                t.printStackTrace(); 
  +             *                 throw new org.apache.excalibur.altrmi.common.AltrmiInvocationException("Should never get here: " + t.getMessage()); 
  +             *      } 
  +             *     }
  +         * ================================================
  +         */
  +        InstructionHandle ihe1 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  +        il.append(
  +            mFactory.createFieldAccess(
  +                mGeneratedClassName,
  +                "mProxyHelper",
  +                new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper"),
  +                Constants.GETFIELD));
  +        // **** Check if the return type is facade ***
  +        Class _returnClass=m.getReturnType();
  +        if(_returnClass.isArray())
  +                _returnClass=_returnClass.getComponentType();
  +        
  +        if (isAdditionalFacade(m.getReturnType()))
  +        {
  +            String _encodedReturnClassName="class$" + encodeClassName(_returnClass);
  +            addField(_encodedReturnClassName);
  +            il.append(
  +                mFactory.createFieldAccess(
  +                    mGeneratedClassName,
  +                    _encodedReturnClassName,
  +                    new ObjectType("java.lang.Class"),
  +                    Constants.GETSTATIC));
  +            BranchInstruction ifnullReturnClass =
  +                mFactory.createBranchInstruction(Constants.IFNULL, null);
  +            il.append(ifnullReturnClass);
  +            il.append(
  +                mFactory.createFieldAccess(
  +                    mGeneratedClassName,
  +                    _encodedReturnClassName,
  +                    new ObjectType("java.lang.Class"),
  +                    Constants.GETSTATIC));
  +            BranchInstruction gotoReturnClass =
  +                mFactory.createBranchInstruction(Constants.GOTO, null);
  +            il.append(gotoReturnClass);
  +            
  +            InstructionHandle ihPushMethodName =
  +                il.append(new PUSH(mConstantsPool, _returnClass.getName()));
  +            ifnullReturnClass.setTarget(ihPushMethodName);
  +            il.append(
  +                mFactory.createInvoke(
  +                    mGeneratedClassName,
  +                    "class$",
  +                    new ObjectType("java.lang.Class"),
  +                    new Type[] { Type.STRING },
  +                    Constants.INVOKESTATIC));
  +            il.append(InstructionConstants.DUP);
  +            il.append(
  +                mFactory.createFieldAccess(
  +                    mGeneratedClassName,
  +                    _encodedReturnClassName,
  +                    new ObjectType("java.lang.Class"),
  +                    Constants.PUTSTATIC));
  +            InstructionHandle ihPushSignature =
  +                il.append(new PUSH(mConstantsPool, getMethodSignature(m)));
  +            gotoReturnClass.setTarget(ihPushSignature);
  +            il.append(mFactory.createLoad(Type.OBJECT, variableIndex-1));
  +            il.append(new PUSH(mConstantsPool, encodeClassName( getClassType( _returnClass ) )));
  +            il.append(
  +                mFactory.createInvoke(
  +                    "org.apache.excalibur.altrmi.client.ProxyHelper",
  +                    "processObjectRequestGettingFacade",
  +                    Type.OBJECT,
  +                    new Type[] {
  +                        new ObjectType("java.lang.Class"),
  +                        Type.STRING,
  +                        new ArrayType(Type.OBJECT, 1),
  +                        Type.STRING },
  +                    Constants.INVOKEINTERFACE));
  +        }
  +        else
  +        {
  +            //method signature = METHODNAME(arguments....)   
  +            il.append(new PUSH(mConstantsPool, getMethodSignature(m)));
  +            variableIndex -= 2;
  +            il.append(mFactory.createLoad(Type.OBJECT, ++variableIndex));
  +            il.append(mFactory.createLoad(Type.OBJECT, ++variableIndex));
  +            il.append(
  +                mFactory.createInvoke(
  +                    "org.apache.excalibur.altrmi.client.ProxyHelper",
  +                    "processObjectRequest",
  +                    Type.OBJECT,
  +                    new Type[] {
  +                        Type.STRING,
  +                        new ArrayType(Type.OBJECT, 1),
  +                        new ArrayType(new ObjectType("java.lang.Class"), 1)},
  +                    Constants.INVOKEINTERFACE));
  +        }
  +        il.append(mFactory.createStore(Type.OBJECT, ++variableIndex));
  +        il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +
  +        InstructionHandle ihe2;
  +        if (m.getReturnType().isPrimitive())
  +        {
  +            if (getBCELPrimitiveType(m.getReturnType().getName()) == Type.VOID)
  +            {
  +                ihe2 = il.append(mFactory.createReturn(Type.VOID));
  +            }
  +            else
  +            {
  +                il.append(
  +                    mFactory.createCheckCast(
  +                        new ObjectType(getJavaWrapperClass(m.getReturnType().getName()))));
  +                il.append(
  +                    mFactory.createInvoke(
  +                        getJavaWrapperClass(m.getReturnType().getName()),
  +                        m.getReturnType().getName() + "Value",
  +                        getBCELPrimitiveType(m.getReturnType().getName()),
  +                        Type.NO_ARGS,
  +                        Constants.INVOKEVIRTUAL));
  +                ihe2 =
  +                    il.append(
  +                        mFactory.createReturn(getBCELPrimitiveType(m.getReturnType().getName())));
  +            }
  +        }
  +        else
  +        {
  +            il.append(
  +                mFactory.createCheckCast(new ObjectType(m.getReturnType().getName())));
  +            ihe2 = il.append(mFactory.createReturn(Type.OBJECT));
  +        }
  +
  +        InstructionHandle ihe3 =
  +            il.append(mFactory.createStore(Type.OBJECT, variableIndex));
  +
  +        //add custom exceptionHandling here 
  +        Class[] _exceptionClasses = m.getExceptionTypes();
  +        InstructionHandle _customHandler = null;
  +        BranchInstruction _ifCustomExceptionBranch = null;
  +        for (int i = 0; i < _exceptionClasses.length; i++)
  +        {
  +
  +            _customHandler = il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +            //create the series of custom exception handlers for the classes
  +            if (_ifCustomExceptionBranch != null)
  +                _ifCustomExceptionBranch.setTarget(_customHandler);
  +            il.append(
  +                new INSTANCEOF(
  +                    mConstantsPool.addClass(new ObjectType(_exceptionClasses[i].getName()))));
  +            _ifCustomExceptionBranch =
  +                mFactory.createBranchInstruction(Constants.IFEQ, null);
  +            il.append(_ifCustomExceptionBranch);
  +            il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +            il.append(
  +                mFactory.createCheckCast(new ObjectType(_exceptionClasses[i].getName())));
  +            il.append(InstructionConstants.ATHROW);
  +        }
  +
  +        InstructionHandle _defaultExceptionHandler =
  +            il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +        if (_customHandler != null)
  +            _ifCustomExceptionBranch.setTarget(_defaultExceptionHandler);
  +        il.append(
  +            new INSTANCEOF(
  +                mConstantsPool.addClass(new ObjectType("java.lang.RuntimeException"))));
  +        BranchInstruction b1 = mFactory.createBranchInstruction(Constants.IFEQ, null);
  +        il.append(b1);
  +        il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +        il.append(
  +            mFactory.createCheckCast(new ObjectType("java.lang.RuntimeException")));
  +        il.append(InstructionConstants.ATHROW);
  +        InstructionHandle ih1 =
  +            il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +        il.append(
  +            new INSTANCEOF(mConstantsPool.addClass(new ObjectType("java.lang.Error"))));
  +        BranchInstruction b2 = mFactory.createBranchInstruction(Constants.IFEQ, null);
  +        il.append(b2);
  +        il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +        il.append(mFactory.createCheckCast(new ObjectType("java.lang.Error")));
  +        il.append(InstructionConstants.ATHROW);
  +        InstructionHandle ih2 =
  +            il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.Throwable",
  +                "printStackTrace",
  +                Type.VOID,
  +                Type.NO_ARGS,
  +                Constants.INVOKEVIRTUAL));
  +        il.append(
  +            mFactory.createNew(
  +                "org.apache.excalibur.altrmi.common.AltrmiInvocationException"));
  +        il.append(InstructionConstants.DUP);
  +        il.append(mFactory.createNew("java.lang.StringBuffer"));
  +        il.append(InstructionConstants.DUP);
  +        il.append(new PUSH(mConstantsPool, "Should never get here: "));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.StringBuffer",
  +                "<init>",
  +                Type.VOID,
  +                new Type[] { Type.STRING },
  +                Constants.INVOKESPECIAL));
  +        il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.Throwable",
  +                "getMessage",
  +                Type.STRING,
  +                Type.NO_ARGS,
  +                Constants.INVOKEVIRTUAL));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.StringBuffer",
  +                "append",
  +                Type.STRINGBUFFER,
  +                new Type[] { Type.STRING },
  +                Constants.INVOKEVIRTUAL));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.lang.StringBuffer",
  +                "toString",
  +                Type.STRING,
  +                Type.NO_ARGS,
  +                Constants.INVOKEVIRTUAL));
  +        il.append(
  +            mFactory.createInvoke(
  +                "org.apache.excalibur.altrmi.common.AltrmiInvocationException",
  +                "<init>",
  +                Type.VOID,
  +                new Type[] { Type.STRING },
  +                Constants.INVOKESPECIAL));
  +        il.append(InstructionConstants.ATHROW);
  +
  +        b1.setTarget(ih1);
  +        b2.setTarget(ih2);
  +        method.addExceptionHandler(
  +            ihe1,
  +            ihe2,
  +            ihe3,
  +            new ObjectType("java.lang.Throwable"));
  +        method.setMaxStack();
  +        method.setMaxLocals();
  +        mClassGen.addMethod(method.getMethod());
  +        il.dispose();
  +    }
  +
  +    /**
  +     * Method getFreeIndexToStart.
  +     *     Returns the index to start allocating the subsequent stack variables
  +     * @param ca
  +     * @return int
  +     */
  +    private int getFreeIndexToStart(Class[] ca)
  +    {
  +        int _index = 0;
  +        for (int i = 0; i < ca.length; i++)
  +        {
  +            if (getBCELType(ca[i]) == Type.DOUBLE) //|| getBCELType(ca[i])==Type.LONG)
  +            {
  +                _index += 2;
  +            }
  +            _index += 1;
  +        }
  +
  +        return _index;
  +    }
  +    /**
  +     * Method getArguments.
  +     *     Convert the arguments of the method 
  +     *         into equivalent BCEL datatypes
  +     * @param m
  +     * @return Type[]
  +     */
  +    private Type[] getArguments(Method m)
  +    {
  +        Class[] _classes = m.getParameterTypes();
  +        if (_classes.length == 0)
  +            return Type.NO_ARGS;
  +
  +        Type[] types = new Type[_classes.length];
  +        for (int i = 0; i < _classes.length; i++)
  +        {
  +            types[i] = getBCELType(_classes[i]);
  +        }
  +        return types;
  +    }
  +
  +    /**
  +     * Method getReturnType.
  +     *     Convert the returnType of the method into BCEL datatype
  +     * @param m
  +     * @return Type
  +     */
  +    private Type getReturnType(Method m)
  +    {
  +        return getBCELType(m.getReturnType());
  +    }
  +
  +    /**
  +     * Method getArgumentNames.
  +     *     The arguments are arg0,arg1,.....
  +     * @param m
  +     * @return String[]
  +     */
  +    private String[] getArgumentNames(Method m)
  +    {
  +        Class[] _classes = m.getParameterTypes();
  +        String[] _args = new String[_classes.length];
  +        for (int i = 0; i < _classes.length; i++)
  +        {
  +            _args[i] = "arg" + i;
  +        }
  +        return _args;
  +    }
  +
  +    /**
  +     * Method getBCELType.
  +     *     Maps the java datatype and the BCEL datatype
  +     * @param c
  +     * @return Type
  +     */
  +    private Type getBCELType(Class c)
  +    {
  +
  +        if (c.isPrimitive())
  +        {
  +            return getBCELPrimitiveType(c.getName());
  +        }
  +        else if (!c.isArray())
  +        {
  +            return new ObjectType(c.getName());
  +        }
  +        else
  +        {
  +            String className = c.getName();
  +            int _index = className.lastIndexOf('[');
  +            int _arrayDepth = className.indexOf('[') - className.lastIndexOf('[') + 1;
  +            if (className.charAt(_index + 1) == 'L')
  +            {
  +                return new ArrayType(new ObjectType(c.getComponentType().getName()), _arrayDepth);
  +            }
  +
  +            return new ArrayType(
  +                getBCELPrimitiveType(className.substring(_arrayDepth)),
  +                _arrayDepth);
  +        }
  +
  +    }
  +
  +    /**
  +     * Method getBCELPrimitiveType.
  +     *     Returns the BCEL Type given the Class Name 
  +     * @param javaDataType
  +     * @return Type
  +     */
  +    private Type getBCELPrimitiveType(String javaDataType)
  +    {
  +        switch (javaDataType.charAt(0))
  +        {
  +
  +            case 'b' :
  +                if (javaDataType.toString().charAt(1) == 'o')
  +                    return Type.BOOLEAN;
  +                else
  +                    return Type.BYTE;
  +            case 'c' :
  +            case 'C' :
  +                return Type.CHAR;
  +            case 's' :
  +            case 'S' :
  +                return Type.SHORT;
  +            case 'i' :
  +            case 'I' :
  +                return Type.INT;
  +            case 'l' :
  +            case 'L' :
  +                return Type.LONG;
  +            case 'f' :
  +            case 'F' :
  +                return Type.FLOAT;
  +            case 'd' :
  +            case 'D' :
  +                return Type.DOUBLE;
  +                //boolean array appears in this format
  +            case 'Z' :
  +                return Type.BOOLEAN;
  +            case 'B' :
  +                return Type.BYTE;
  +            case 'v' :
  +            case 'V' :
  +                return Type.VOID;
  +        }
  +        return null;
  +    }
  +
  +    /**
  +     * Method getJavaWrapperClass.
  +     *     Returns the String representing the Wrapper class given the 
  +     *         primitive datatype
  +     * @param javaDataType
  +     * @return String
  +     */
  +    private String getJavaWrapperClass(String javaDataType)
  +    {
  +        switch (javaDataType.charAt(0))
  +        {
  +
  +            case 'b' :
  +                if (javaDataType.charAt(1) == 'o')
  +                    return "java.lang.Boolean";
  +                else
  +                    return "java.lang.Byte";
  +            case 'c' :
  +            case 'C' :
  +                return "java.lang.Character";
  +            case 's' :
  +            case 'S' :
  +                return "java.lang.Short";
  +            case 'i' :
  +            case 'I' :
  +                return "java.lang.Integer";
  +            case 'l' :
  +            case 'L' :
  +                return "java.lang.Long";
  +            case 'f' :
  +            case 'F' :
  +                return "java.lang.Float";
  +            case 'd' :
  +            case 'D' :
  +                return "java.lang.Double";
  +            case 'B' :
  +                return "java.lang.Byte";
  +            case 'Z' :
  +                return "java.lang.Boolean";
  +            case 'v' :
  +            case 'V' :
  +                return "java.lang.Void";
  +            case '[' :
  +                mArrayDepth_++;
  +                return getJavaWrapperClass(javaDataType.substring(1));
  +
  +        }
  +        return null; //never occurs;
  +    }
  +
  +    private void addField(String _encodedFieldName)
  +    {
  +        if (!mInternalFieldRepresentingClasses.contains(_encodedFieldName))
  +        {
  +            //System.out.println("method."+method.getName()+".addingfield[" + _encodedFieldName + "]");
  +            FieldGen field =
  +                new FieldGen(
  +                    Constants.ACC_STATIC,
  +                    new ObjectType("java.lang.Class"),
  +                    _encodedFieldName,
  +                    mConstantsPool);
  +            mClassGen.addField(field.getField());
  +            mInternalFieldRepresentingClasses.add(_encodedFieldName);
  +        }
  +
  +    }
  +    
  +    //++++++++++++++++++testing
  +    private void createTestMethod(InstructionList il, String msg)
  +    {
  +        il.append(
  +            mFactory.createFieldAccess(
  +                "java.lang.System",
  +                "out",
  +                new ObjectType("java.io.PrintStream"),
  +                Constants.GETSTATIC));
  +        il.append(new PUSH(mConstantsPool, msg));
  +        il.append(
  +            mFactory.createInvoke(
  +                "java.io.PrintStream",
  +                "println",
  +                Type.VOID,
  +                new Type[] { Type.STRING },
  +                Constants.INVOKEVIRTUAL));
  +    }
  +
  +    private void debug(String prefix, Object[] a)
  +    {
  +        System.out.print(prefix);
  +        for (int i = 0; i < a.length; i++)
  +            System.out.print(a[i] + ":");
  +        System.out.println();
  +    }
  +
  +    public Class getGeneratedClass(String mGeneratedClassName)
  +    {
  +        return getAltrmiClass(mGeneratedClassName);
  +    }
  +
  +    /**
  +     * Method getAltrmiClass.
  +     *     This get the Class definition from the bytes
  +     * @return Class
  +     */
  +    private Class getAltrmiClass(String className)
  +    {
  +
  +        /*
  +        FromJavaClassClassLoader fromJavaClassClassLoader =
  +            new FromJavaClassClassLoader();
  +        Class clazz =
  +            fromJavaClassClassLoader.getClassFromJavaClass(mClassGen.getJavaClass());
  +        */
  +        Class clazz = null;
  +
  +        try
  +        {
  +            URLClassLoader urlCL =
  +                new URLClassLoader(
  +                    new URL[] {
  +                         new URL("file:/" + new File(mClassGenDir).getCanonicalPath() + "/")},
  +            //
  +            this.getClass().getClassLoader());
  +            clazz = urlCL.loadClass(className);
  +        }
  +
  +        catch (ClassNotFoundException e)
  +        {
  +            e.printStackTrace();
  +        }
  +        catch (MalformedURLException e)
  +        {
  +            e.printStackTrace();
  +        }
  +        catch (IOException e)
  +        {
   
  -	//bcel 
  -	private static final String mStubPrefix = "AltrmiGenerated";
  -	private InstructionFactory mFactory;
  -	private ConstantPoolGen mConstantsPool;
  -	private ClassGen mClassGen;
  -	private ArrayList mInternalFieldRepresentingClasses;
  -	private int mArrayDepth_ = 0;
  -
  -	/*
  -	 * @see ProxyGenerator#generateClass(ClassLoader)
  -	 */
  -	public void generateClass(ClassLoader cL)
  -	{
  -
  -		//create the Main Stubs:
  -		generateAltrmiProxyClass(mStubPrefix + mGenName + "_Main", mInterfacesToExpose);
  -		generateAltrmiProxyClass2(
  -			mStubPrefix + "2" + mGenName + "_Main",
  -			mStubPrefix + mGenName + "_Main",
  -			mInterfacesToExpose);
  -
  -		//Create the Additional Facades 
  -		if (mAdditionalFacades != null)
  -		{
  -			for (int i = 0; i < mAdditionalFacades.length; i++)
  -			{
  -				String encodedClassName = encodeClassName(mAdditionalFacades[i]);
  -				generateAltrmiProxyClass(
  -					mStubPrefix + mGenName + "_" + encodedClassName,
  -					new Class[] { mAdditionalFacades[i] });
  -				generateAltrmiProxyClass2(
  -					mStubPrefix + "2" + mGenName + "_" + encodedClassName,
  -					mStubPrefix + mGenName + "_" + encodedClassName,
  -					new Class[] { mAdditionalFacades[i] });
  -
  -			}
  -		}
  -
  -	}
  -
  -	/**
  -	 * Method generateAltrmiProxyClass.
  -	 * 		Create AltrmiProxy Implementation with all interface methods 
  -	 * 	Generating AltrmiGeneratedGENNAME_Main class
  -	 * @param className
  -	 * @param interfacesToStubify
  -	 */
  -	private void generateAltrmiProxyClass(
  -		String mGeneratedClassName,
  -		Class[] interfacesToStubify)
  -	{
  -		//Start creating class 
  -		createNewClassDeclaration(mGeneratedClassName);
  -		/******** CONSTRUCTOR **************/
  -		//create constructor that takes ProxyHelper
  -		createConstructor(mGeneratedClassName);
  -		/******** FIELDS *************/
  -		//create fields 
  -		createFields();
  -		/******** METHODS *************/
  -		//create fields 
  -		createAltrmiGetReferenceIDMethod(mGeneratedClassName);
  -		createHelperMethodForDotClassCalls(mGeneratedClassName);
  -		createInterfaceMethods(mGeneratedClassName, interfacesToStubify);
  -		//TODO://Finally finally fInally "DUMP" the  class file  that we deligently prepared somewhere
  -		FileOutputStream fos = null;
  -		try
  -		{
  -			fos = new FileOutputStream(mClassGenDir + "/" + mGeneratedClassName + ".class");
  -			mClassGen.getJavaClass().dump(fos);
  -			fos.close();
  -		}
  -		catch (FileNotFoundException fnfe)
  -		{
  -			fnfe.printStackTrace();
  -		}
  -		catch (IOException ioe)
  -		{
  -			ioe.printStackTrace();
  -		}
  -	}
  -
  -	/**
  -	 * Method generateAltrmiProxyClass2.
  -	 *  	Create the Stub Class purely implementing the Interface  and
  -	 * 			inheriting the implementation from the helper class
  -	 * 	Generating AltrmiGenerated2GENNAME_Main class
  -	 * @param className
  -	 */
  -	private void generateAltrmiProxyClass2(
  -		String mGeneratedClassName2,
  -		String mGeneratedClassName,
  -		Class[] interfacesToStubify)
  -	{
  -		//start creating the class
  -		createNewClassDeclaration2(
  -			mGeneratedClassName2,
  -			mGeneratedClassName,
  -			interfacesToStubify);
  -		//create the constructor 
  -		createConstructor2(mGeneratedClassName2, mGeneratedClassName);
  -		try
  -		{
  -			FileOutputStream fos =
  -				new FileOutputStream(mClassGenDir + "/" + mGeneratedClassName2 + ".class");
  -			mClassGen.getJavaClass().dump(fos);
  -			fos.close();
  -		}
  -		catch (FileNotFoundException fnfe)
  -		{
  -			fnfe.printStackTrace();
  -		}
  -		catch (IOException ioe)
  -		{
  -			ioe.printStackTrace();
  -		}
  -
  -	}
  -
  -	//<BCEL>  <!-- Enter the BCEL Arena -->
  -
  -	/**
  -	 * Method createAndInitializeClass.
  -	 * 	This method starts creating the class.
  -	 */
  -	private void createNewClassDeclaration(String mGeneratedClassName)
  -	{
  -
  -		mClassGen =
  -			new ClassGen(
  -				mGeneratedClassName,
  -				"java.lang.Object",
  -				mGeneratedClassName + ".java",
  -				Constants.ACC_PUBLIC | Constants.ACC_SUPER,
  -				new String[] { "org.apache.excalibur.altrmi.client.AltrmiProxy" });
  -		mConstantsPool = mClassGen.getConstantPool();
  -		mFactory = new InstructionFactory(mClassGen, mConstantsPool);
  -		mInternalFieldRepresentingClasses = new ArrayList();
  -
  -	}
  -	/**
  -	 * Method createNewClassDeclaration2.
  -	 * 	Create a class which extends a class contained the impl of the Interface and 
  -	 * 					and  implements the interface
  -	 */
  -	private void createNewClassDeclaration2(
  -		String mGeneratedClassName2,
  -		String mGeneratedClassName,
  -		Class[] interfacesToStubify)
  -	{
  -		String[] mInterafacesToImplement = new String[interfacesToStubify.length];
  -		for (int i = 0; i < mInterafacesToImplement.length; i++)
  -			mInterafacesToImplement[i] = interfacesToStubify[i].getName();
  -		mClassGen =
  -			new ClassGen(
  -				mGeneratedClassName2,
  -				mGeneratedClassName,
  -				mGeneratedClassName2 + ".java",
  -				Constants.ACC_PUBLIC | Constants.ACC_FINAL | Constants.ACC_SUPER,
  -				mInterafacesToImplement);
  -		mConstantsPool = mClassGen.getConstantPool();
  -		mFactory = new InstructionFactory(mClassGen, mConstantsPool);
  -	}
  -	/**
  -	 * Method createConstructor.
  -	 * 	This method adds a constructor that takes in a ProxyHelper Instance
  -	 */
  -	private void createConstructor(String mGeneratedClassName)
  -	{
  -		InstructionList il = new InstructionList();
  -		MethodGen method =
  -			new MethodGen(
  -				Constants.ACC_PUBLIC,
  -				Type.VOID,
  -				new Type[] { new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper")},
  -				new String[] { "arg0" },
  -				"<init>",
  -				mGeneratedClassName,
  -				il,
  -				mConstantsPool);
  -		InstructionHandle ih_0 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.Object",
  -				"<init>",
  -				Type.VOID,
  -				Type.NO_ARGS,
  -				Constants.INVOKESPECIAL));
  -		InstructionHandle ih_4 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  -		il.append(mFactory.createLoad(Type.OBJECT, 1));
  -		il.append(
  -			mFactory.createFieldAccess(
  -				mGeneratedClassName,
  -				"mProxyHelper",
  -				new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper"),
  -				Constants.PUTFIELD));
  -		InstructionHandle ih_9 = il.append(mFactory.createReturn(Type.VOID));
  -		method.setMaxStack();
  -		method.setMaxLocals();
  -		mClassGen.addMethod(method.getMethod());
  -		il.dispose();
  -	}
  -
  -	/**
  -	 * Method createConstructor2.
  -	 */
  -	private void createConstructor2(
  -		String mGeneratedClassName2,
  -		String mGeneratedClassName)
  -	{
  -		InstructionList il = new InstructionList();
  -		MethodGen method =
  -			new MethodGen(
  -				Constants.ACC_PUBLIC,
  -				Type.VOID,
  -				new Type[] { new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper")},
  -				new String[] { "arg0" },
  -				"<init>",
  -				mGeneratedClassName2,
  -				il,
  -				mConstantsPool);
  -		InstructionHandle ih_0 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  -		il.append(mFactory.createLoad(Type.OBJECT, 1));
  -		il.append(
  -			mFactory.createInvoke(
  -				mGeneratedClassName,
  -				"<init>",
  -				Type.VOID,
  -				new Type[] { new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper")},
  -				Constants.INVOKESPECIAL));
  -		InstructionHandle ih_5 = il.append(mFactory.createReturn(Type.VOID));
  -		method.setMaxStack();
  -		method.setMaxLocals();
  -		mClassGen.addMethod(method.getMethod());
  -		il.dispose();
  -	}
  -
  -	/**
  -	 * Method createFields.
  -	 * =================adding===============
  -	 *   private transient org.apache.excalibur.altrmi.client.ProxyHelper mProxyHelper;
  -	 * =================adding===============
  -	 * 	Add 
  -	 */
  -	private void createFields()
  -	{
  -		FieldGen field;
  -		field =
  -			new FieldGen(
  -				Constants.ACC_PRIVATE | Constants.ACC_TRANSIENT,
  -				new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper"),
  -				"mProxyHelper",
  -				mConstantsPool);
  -		mClassGen.addField(field.getField());
  -	}
  -
  -	/**
  -	 * Method createAltrmiGetReferenceIDMethod. 
  -	 * =================adding=====================================
  -	 * 	 public Long altrmiGetReferenceID(Object factoryThatIsAsking) {
  -	 *   return mProxyHelper.getReferenceID(factoryThatIsAsking);
  -	 *		}
  -	 * =================adding=====================================
  -	 */
  -	private void createAltrmiGetReferenceIDMethod(String mGeneratedClassName)
  -	{
  -		InstructionList il = new InstructionList();
  -		MethodGen method =
  -			new MethodGen(
  -				Constants.ACC_PUBLIC,
  -				new ObjectType("java.lang.Long"),
  -				new Type[] { Type.OBJECT },
  -				new String[] { "arg0" },
  -				"altrmiGetReferenceID",
  -				mGeneratedClassName,
  -				il,
  -				mConstantsPool);
  -		InstructionHandle ih_0 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  -		il.append(
  -			mFactory.createFieldAccess(
  -				mGeneratedClassName,
  -				"mProxyHelper",
  -				new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper"),
  -				Constants.GETFIELD));
  -		il.append(mFactory.createLoad(Type.OBJECT, 1));
  -		il.append(
  -			mFactory.createInvoke(
  -				"org.apache.excalibur.altrmi.client.ProxyHelper",
  -				"getReferenceID",
  -				new ObjectType("java.lang.Long"),
  -				new Type[] { Type.OBJECT },
  -				Constants.INVOKEINTERFACE));
  -		InstructionHandle ih_8 = il.append(mFactory.createReturn(Type.OBJECT));
  -		method.setMaxStack();
  -		method.setMaxLocals();
  -		mClassGen.addMethod(method.getMethod());
  -		il.dispose();
  -	}
  -
  -	/**
  -	 * Method createHelperMethodForDotClassCalls.
  -	 * 	This class creates a method class$(String) which is used 
  -	 * 	during SomeClass.class instruction
  -	 * 
  -	 */
  -	private void createHelperMethodForDotClassCalls(String mGeneratedClassName)
  -	{
  -		InstructionList il = new InstructionList();
  -		MethodGen method =
  -			new MethodGen(
  -				Constants.ACC_STATIC,
  -				new ObjectType("java.lang.Class"),
  -				new Type[] { Type.STRING },
  -				new String[] { "arg0" },
  -				"class$",
  -				mGeneratedClassName,
  -				il,
  -				mConstantsPool);
  -		InstructionHandle ih_0 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.Class",
  -				"forName",
  -				new ObjectType("java.lang.Class"),
  -				new Type[] { Type.STRING },
  -				Constants.INVOKESTATIC));
  -		InstructionHandle ih_4 = il.append(mFactory.createReturn(Type.OBJECT));
  -		InstructionHandle ih_5 = il.append(mFactory.createStore(Type.OBJECT, 1));
  -		il.append(mFactory.createNew("java.lang.NoClassDefFoundError"));
  -		il.append(InstructionConstants.DUP);
  -		il.append(mFactory.createLoad(Type.OBJECT, 1));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.Throwable",
  -				"getMessage",
  -				Type.STRING,
  -				Type.NO_ARGS,
  -				Constants.INVOKEVIRTUAL));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.NoClassDefFoundError",
  -				"<init>",
  -				Type.VOID,
  -				new Type[] { Type.STRING },
  -				Constants.INVOKESPECIAL));
  -		InstructionHandle ih_17 = il.append(InstructionConstants.ATHROW);
  -		method.addExceptionHandler(
  -			ih_0,
  -			ih_4,
  -			ih_5,
  -			new ObjectType("java.lang.ClassNotFoundException"));
  -		method.setMaxStack();
  -		method.setMaxLocals();
  -		mClassGen.addMethod(method.getMethod());
  -		il.dispose();
  -	}
  -
  -	/**
  -	 * Method createInterfaceMethods.
  -	 * 	This methods shall iterate through the set of methods
  -	 * 	of the interface creating equivalent methods for the
  -	 * 	stubs in the process.
  -	 */
  -	private void createInterfaceMethods(
  -		String mGeneratedClassName,
  -		Class[] interfacesToStubify)
  -	{
  -		for (int x = 0; x < interfacesToStubify.length; x++)
  -		{
  -			Class clazz = interfacesToStubify[x];
  -
  -			if (mVerbose)
  -			{
  -				System.out.println("ProxyGen: Processing interface: " + clazz.getName());
  -			}
  -			Method[] methods = clazz.getMethods();
  -			for (int i = 0; i < methods.length; i++)
  -			{
  -				createInterfaceMethod(mGeneratedClassName, methods[i]);
  -			}
  -
  -		}
  -
  -	}
  -
  -	/**
  -	 * Method createInterfaceMethod.
  -	 * 	Add the java.lang.reflect.Method wrapper into the stub
  -	 * @param m
  -	 */
  -	private void createInterfaceMethod(String mGeneratedClassName, Method m)
  -	{
  -		InstructionList il = new InstructionList();
  -		MethodGen method =
  -			new MethodGen(
  -				Constants.ACC_PUBLIC,
  -				getReturnType(m),
  -				getArguments(m),
  -				getArgumentNames(m),
  -				m.getName(),
  -				mGeneratedClassName,
  -				il,
  -				mConstantsPool);
  -
  -		//debug(getArguments(m));
  -
  -		// **** TO Insert TEST Bytecode Inside the stub ,uncomment the subsequent lines
  -		//if (mVerbose)
  -		//	createTestMethod(il, "calling " + m.getName());
  -
  -		/*
  -		 *  Declaration of Arrays
  -		 * =======================
  -		 *  Object[] args = new Object[__number__of__arguments];
  -		 *  Class[] argClasses = new Class[__number__of__arguments]; 
  -		 */
  -
  -		int variableIndex, numberOfArguments;
  -		Class[] paramTypes = m.getParameterTypes();
  -		numberOfArguments = paramTypes.length;
  -		variableIndex = getFreeIndexToStart(paramTypes);
  -		InstructionHandle ih_0 = il.append(new PUSH(mConstantsPool, numberOfArguments));
  -		il.append((Instruction) mFactory.createNewArray(Type.OBJECT, (short) 1));
  -		il.append(mFactory.createStore(Type.OBJECT, ++variableIndex));
  -		InstructionHandle ih_5 = il.append(new PUSH(mConstantsPool, numberOfArguments));
  -		il.append(
  -			(Instruction) mFactory.createNewArray(
  -				new ObjectType("java.lang.Class"),
  -				(short) 1));
  -		il.append(mFactory.createStore(Type.OBJECT, ++variableIndex));
  -
  -		/*
  -		 *  Assigning parameter into Object[] and Class[] Array
  -		 * ====================================================
  -		 *   args[0] = v0;
  -		 *   argClasses[0]=v0Class.class
  -		 */
  -		//Used for adjustment of double/long datatype: 
  -		Type _previousType = null;
  -		int _loadIndex = 0;
  -		for (int i = 0; i < numberOfArguments; i++)
  -		{
  -			// assigning the obj ref's
  -			il.append(mFactory.createLoad(Type.OBJECT, variableIndex - 1));
  -			il.append(new PUSH(mConstantsPool, i));
  -			String className = paramTypes[i].getName();
  -			//adjust for any previous wider datatype (double/long)
  -			if (_previousType != null
  -				&& (_previousType == Type.DOUBLE || _previousType == Type.LONG))
  -				++_loadIndex;
  -			if (paramTypes[i].isPrimitive())
  -			{
  -				il.append(mFactory.createNew(getJavaWrapperClass(className)));
  -				il.append(InstructionConstants.DUP);
  -				il.append(mFactory.createLoad(getBCELPrimitiveType(className), ++_loadIndex));
  -				il.append(
  -					mFactory.createInvoke(
  -						getJavaWrapperClass(className),
  -						"<init>",
  -						Type.VOID,
  -						new Type[] { getBCELPrimitiveType(className)},
  -						Constants.INVOKESPECIAL));
  -				il.append(InstructionConstants.AASTORE);
  -			}
  -			else
  -			{
  -
  -				//create the static fields for enabling .class calls
  -				String _encodedFieldName;
  -				if (paramTypes[i].isArray())
  -				{
  -					int _index = className.lastIndexOf('[');
  -					if (className.charAt(_index + 1) == 'L')
  -						_encodedFieldName =
  -							"array$"
  -								+ className.substring(1 + _index, className.length() - 1).replace('.', '$');
  -					else
  -						_encodedFieldName =
  -							"array$" + className.substring(1 + _index, className.length());
  -				}
  -				else
  -					_encodedFieldName = "class$" + className.replace('.', '$');
  -				
  -				addField(_encodedFieldName);
  -				// ******** TODO assign the obj reference 
  -				il.append(mFactory.createLoad(Type.OBJECT, variableIndex - 1));
  -				il.append(new PUSH(mConstantsPool, i));
  -				il.append(mFactory.createLoad(Type.OBJECT, ++_loadIndex));
  -				il.append(InstructionConstants.AASTORE);
  -
  -				// *********TODO assign the class ref's
  -				il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -				il.append(new PUSH(mConstantsPool, i));
  -				il.append(
  -					mFactory.createFieldAccess(
  -						mGeneratedClassName,
  -						_encodedFieldName,
  -						new ObjectType("java.lang.Class"),
  -						Constants.GETSTATIC));
  -				BranchInstruction ifnull =
  -					mFactory.createBranchInstruction(Constants.IFNULL, null);
  -				il.append(ifnull);
  -				il.append(
  -					mFactory.createFieldAccess(
  -						mGeneratedClassName,
  -						_encodedFieldName,
  -						new ObjectType("java.lang.Class"),
  -						Constants.GETSTATIC));
  -				BranchInstruction goHeadToStoreRef =
  -					mFactory.createBranchInstruction(Constants.GOTO, null);
  -				il.append(goHeadToStoreRef);
  -				InstructionHandle ifnullStartHere =
  -					il.append(new PUSH(mConstantsPool, className));
  -
  -				ifnull.setTarget(ifnullStartHere);
  -
  -				il.append(
  -					mFactory.createInvoke(
  -						mGeneratedClassName,
  -						"class$",
  -						new ObjectType("java.lang.Class"),
  -						new Type[] { Type.STRING },
  -						Constants.INVOKESTATIC));
  -				il.append(InstructionConstants.DUP);
  -				il.append(
  -					mFactory.createFieldAccess(
  -						mGeneratedClassName,
  -						_encodedFieldName,
  -						new ObjectType("java.lang.Class"),
  -						Constants.PUTSTATIC));
  -				InstructionHandle storeClassRef = il.append(InstructionConstants.AASTORE);
  -				goHeadToStoreRef.setTarget(storeClassRef);
  -
  -			}
  -			_previousType = getBCELPrimitiveType(className);
  -		}
  -
  -		/* Within the stub put the 
  -		 * Call processObjectRequest on the instance ProxyHelper held within the stub
  -		 * Thus,
  -		 * Injecting the following
  -		 * ================================================
  -		 * try 
  -		 * {
  -			 *  	Object retVal = mProxyHelper.processObjectRequest("foo1(int, float, java.lang.String, java.lang.Integer)",args,argClasses);
  -			 *  	return (java.lang.String) retVal;
  -		 * } 
  -		 *  catch (Throwable t) 
  -		 * 	{
  -			 * 		if (t instanceof RuntimeException) 
  -			 * 		{ 
  -			 *      	 throw (RuntimeException) t;
  -			 *      } else if (t instanceof Error) 
  -			 * 		{ 
  -			 * 		       throw (Error) t;
  -			 *      } else 
  -			 * 		{ 
  -			 * 		       t.printStackTrace(); 
  -			 * 		        throw new org.apache.excalibur.altrmi.common.AltrmiInvocationException("Should never get here: " + t.getMessage()); 
  -			 *      } 
  -			 * 	}
  -		 * ================================================
  -		 */
  -		InstructionHandle ihe1 = il.append(mFactory.createLoad(Type.OBJECT, 0));
  -		il.append(
  -			mFactory.createFieldAccess(
  -				mGeneratedClassName,
  -				"mProxyHelper",
  -				new ObjectType("org.apache.excalibur.altrmi.client.ProxyHelper"),
  -				Constants.GETFIELD));
  -		// **** Check if the return type is facade ***
  -		Class _returnClass=m.getReturnType();
  -		if(_returnClass.isArray())
  -				_returnClass=_returnClass.getComponentType();
  -		
  -		if (isAdditionalFacade(m.getReturnType()))
  -		{
  -			String _encodedReturnClassName="class$" + encodeClassName(_returnClass);
  -			addField(_encodedReturnClassName);
  -			il.append(
  -				mFactory.createFieldAccess(
  -					mGeneratedClassName,
  -					_encodedReturnClassName,
  -					new ObjectType("java.lang.Class"),
  -					Constants.GETSTATIC));
  -			BranchInstruction ifnullReturnClass =
  -				mFactory.createBranchInstruction(Constants.IFNULL, null);
  -			il.append(ifnullReturnClass);
  -			il.append(
  -				mFactory.createFieldAccess(
  -					mGeneratedClassName,
  -					_encodedReturnClassName,
  -					new ObjectType("java.lang.Class"),
  -					Constants.GETSTATIC));
  -			BranchInstruction gotoReturnClass =
  -				mFactory.createBranchInstruction(Constants.GOTO, null);
  -			il.append(gotoReturnClass);
  -			
  -			InstructionHandle ihPushMethodName =
  -				il.append(new PUSH(mConstantsPool, _returnClass.getName()));
  -			ifnullReturnClass.setTarget(ihPushMethodName);
  -			il.append(
  -				mFactory.createInvoke(
  -					mGeneratedClassName,
  -					"class$",
  -					new ObjectType("java.lang.Class"),
  -					new Type[] { Type.STRING },
  -					Constants.INVOKESTATIC));
  -			il.append(InstructionConstants.DUP);
  -			il.append(
  -				mFactory.createFieldAccess(
  -					mGeneratedClassName,
  -					_encodedReturnClassName,
  -					new ObjectType("java.lang.Class"),
  -					Constants.PUTSTATIC));
  -			InstructionHandle ihPushSignature =
  -				il.append(new PUSH(mConstantsPool, getMethodSignature(m)));
  -			gotoReturnClass.setTarget(ihPushSignature);
  -			il.append(mFactory.createLoad(Type.OBJECT, variableIndex-1));
  -			il.append(new PUSH(mConstantsPool, encodeClassName( getClassType( _returnClass ) )));
  -			il.append(
  -				mFactory.createInvoke(
  -					"org.apache.excalibur.altrmi.client.ProxyHelper",
  -					"processObjectRequestGettingFacade",
  -					Type.OBJECT,
  -					new Type[] {
  -						new ObjectType("java.lang.Class"),
  -						Type.STRING,
  -						new ArrayType(Type.OBJECT, 1),
  -						Type.STRING },
  -					Constants.INVOKEINTERFACE));
  -		}
  -		else
  -		{
  -			//method signature = METHODNAME(arguments....)   
  -			il.append(new PUSH(mConstantsPool, getMethodSignature(m)));
  -			variableIndex -= 2;
  -			il.append(mFactory.createLoad(Type.OBJECT, ++variableIndex));
  -			il.append(mFactory.createLoad(Type.OBJECT, ++variableIndex));
  -			il.append(
  -				mFactory.createInvoke(
  -					"org.apache.excalibur.altrmi.client.ProxyHelper",
  -					"processObjectRequest",
  -					Type.OBJECT,
  -					new Type[] {
  -						Type.STRING,
  -						new ArrayType(Type.OBJECT, 1),
  -						new ArrayType(new ObjectType("java.lang.Class"), 1)},
  -					Constants.INVOKEINTERFACE));
  -		}
  -		il.append(mFactory.createStore(Type.OBJECT, ++variableIndex));
  -		il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -
  -		InstructionHandle ihe2;
  -		if (m.getReturnType().isPrimitive())
  -		{
  -			if (getBCELPrimitiveType(m.getReturnType().getName()) == Type.VOID)
  -			{
  -				ihe2 = il.append(mFactory.createReturn(Type.VOID));
  -			}
  -			else
  -			{
  -				il.append(
  -					mFactory.createCheckCast(
  -						new ObjectType(getJavaWrapperClass(m.getReturnType().getName()))));
  -				il.append(
  -					mFactory.createInvoke(
  -						getJavaWrapperClass(m.getReturnType().getName()),
  -						m.getReturnType().getName() + "Value",
  -						getBCELPrimitiveType(m.getReturnType().getName()),
  -						Type.NO_ARGS,
  -						Constants.INVOKEVIRTUAL));
  -				ihe2 =
  -					il.append(
  -						mFactory.createReturn(getBCELPrimitiveType(m.getReturnType().getName())));
  -			}
  -		}
  -		else
  -		{
  -			il.append(
  -				mFactory.createCheckCast(new ObjectType(m.getReturnType().getName())));
  -			ihe2 = il.append(mFactory.createReturn(Type.OBJECT));
  -		}
  -
  -		InstructionHandle ihe3 =
  -			il.append(mFactory.createStore(Type.OBJECT, variableIndex));
  -
  -		//add custom exceptionHandling here 
  -		Class[] _exceptionClasses = m.getExceptionTypes();
  -		InstructionHandle _customHandler = null;
  -		BranchInstruction _ifCustomExceptionBranch = null;
  -		for (int i = 0; i < _exceptionClasses.length; i++)
  -		{
  -
  -			_customHandler = il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -			//create the series of custom exception handlers for the classes
  -			if (_ifCustomExceptionBranch != null)
  -				_ifCustomExceptionBranch.setTarget(_customHandler);
  -			il.append(
  -				new INSTANCEOF(
  -					mConstantsPool.addClass(new ObjectType(_exceptionClasses[i].getName()))));
  -			_ifCustomExceptionBranch =
  -				mFactory.createBranchInstruction(Constants.IFEQ, null);
  -			il.append(_ifCustomExceptionBranch);
  -			il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -			il.append(
  -				mFactory.createCheckCast(new ObjectType(_exceptionClasses[i].getName())));
  -			il.append(InstructionConstants.ATHROW);
  -		}
  -
  -		InstructionHandle _defaultExceptionHandler =
  -			il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -		if (_customHandler != null)
  -			_ifCustomExceptionBranch.setTarget(_defaultExceptionHandler);
  -		il.append(
  -			new INSTANCEOF(
  -				mConstantsPool.addClass(new ObjectType("java.lang.RuntimeException"))));
  -		BranchInstruction b1 = mFactory.createBranchInstruction(Constants.IFEQ, null);
  -		il.append(b1);
  -		il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -		il.append(
  -			mFactory.createCheckCast(new ObjectType("java.lang.RuntimeException")));
  -		il.append(InstructionConstants.ATHROW);
  -		InstructionHandle ih1 =
  -			il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -		il.append(
  -			new INSTANCEOF(mConstantsPool.addClass(new ObjectType("java.lang.Error"))));
  -		BranchInstruction b2 = mFactory.createBranchInstruction(Constants.IFEQ, null);
  -		il.append(b2);
  -		il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -		il.append(mFactory.createCheckCast(new ObjectType("java.lang.Error")));
  -		il.append(InstructionConstants.ATHROW);
  -		InstructionHandle ih2 =
  -			il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.Throwable",
  -				"printStackTrace",
  -				Type.VOID,
  -				Type.NO_ARGS,
  -				Constants.INVOKEVIRTUAL));
  -		il.append(
  -			mFactory.createNew(
  -				"org.apache.excalibur.altrmi.common.AltrmiInvocationException"));
  -		il.append(InstructionConstants.DUP);
  -		il.append(mFactory.createNew("java.lang.StringBuffer"));
  -		il.append(InstructionConstants.DUP);
  -		il.append(new PUSH(mConstantsPool, "Should never get here: "));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.StringBuffer",
  -				"<init>",
  -				Type.VOID,
  -				new Type[] { Type.STRING },
  -				Constants.INVOKESPECIAL));
  -		il.append(mFactory.createLoad(Type.OBJECT, variableIndex));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.Throwable",
  -				"getMessage",
  -				Type.STRING,
  -				Type.NO_ARGS,
  -				Constants.INVOKEVIRTUAL));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.StringBuffer",
  -				"append",
  -				Type.STRINGBUFFER,
  -				new Type[] { Type.STRING },
  -				Constants.INVOKEVIRTUAL));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.lang.StringBuffer",
  -				"toString",
  -				Type.STRING,
  -				Type.NO_ARGS,
  -				Constants.INVOKEVIRTUAL));
  -		il.append(
  -			mFactory.createInvoke(
  -				"org.apache.excalibur.altrmi.common.AltrmiInvocationException",
  -				"<init>",
  -				Type.VOID,
  -				new Type[] { Type.STRING },
  -				Constants.INVOKESPECIAL));
  -		il.append(InstructionConstants.ATHROW);
  -
  -		b1.setTarget(ih1);
  -		b2.setTarget(ih2);
  -		method.addExceptionHandler(
  -			ihe1,
  -			ihe2,
  -			ihe3,
  -			new ObjectType("java.lang.Throwable"));
  -		method.setMaxStack();
  -		method.setMaxLocals();
  -		mClassGen.addMethod(method.getMethod());
  -		il.dispose();
  -	}
  -
  -	/**
  -	 * Method getFreeIndexToStart.
  -	 * 	Returns the index to start allocating the subsequent stack variables
  -	 * @param ca
  -	 * @return int
  -	 */
  -	private int getFreeIndexToStart(Class[] ca)
  -	{
  -		int _index = 0;
  -		for (int i = 0; i < ca.length; i++)
  -		{
  -			if (getBCELType(ca[i]) == Type.DOUBLE) //|| getBCELType(ca[i])==Type.LONG)
  -			{
  -				_index += 2;
  -			}
  -			_index += 1;
  -		}
  -
  -		return _index;
  -	}
  -	/**
  -	 * Method getArguments.
  -	 * 	Convert the arguments of the method 
  -	 * 		into equivalent BCEL datatypes
  -	 * @param m
  -	 * @return Type[]
  -	 */
  -	private Type[] getArguments(Method m)
  -	{
  -		Class[] _classes = m.getParameterTypes();
  -		if (_classes.length == 0)
  -			return Type.NO_ARGS;
  -
  -		Type[] types = new Type[_classes.length];
  -		for (int i = 0; i < _classes.length; i++)
  -		{
  -			types[i] = getBCELType(_classes[i]);
  -		}
  -		return types;
  -	}
  -
  -	/**
  -	 * Method getReturnType.
  -	 * 	Convert the returnType of the method into BCEL datatype
  -	 * @param m
  -	 * @return Type
  -	 */
  -	private Type getReturnType(Method m)
  -	{
  -		return getBCELType(m.getReturnType());
  -	}
  -
  -	/**
  -	 * Method getArgumentNames.
  -	 * 	The arguments are arg0,arg1,.....
  -	 * @param m
  -	 * @return String[]
  -	 */
  -	private String[] getArgumentNames(Method m)
  -	{
  -		Class[] _classes = m.getParameterTypes();
  -		String[] _args = new String[_classes.length];
  -		for (int i = 0; i < _classes.length; i++)
  -		{
  -			_args[i] = "arg" + i;
  -		}
  -		return _args;
  -	}
  -
  -	/**
  -	 * Method getBCELType.
  -	 * 	Maps the java datatype and the BCEL datatype
  -	 * @param c
  -	 * @return Type
  -	 */
  -	private Type getBCELType(Class c)
  -	{
  -
  -		if (c.isPrimitive())
  -		{
  -			return getBCELPrimitiveType(c.getName());
  -		}
  -		else if (!c.isArray())
  -		{
  -			return new ObjectType(c.getName());
  -		}
  -		else
  -		{
  -			String className = c.getName();
  -			int _index = className.lastIndexOf('[');
  -			int _arrayDepth = className.indexOf('[') - className.lastIndexOf('[') + 1;
  -			if (className.charAt(_index + 1) == 'L')
  -			{
  -				return new ArrayType(new ObjectType(c.getComponentType().getName()), _arrayDepth);
  -			}
  -
  -			return new ArrayType(
  -				getBCELPrimitiveType(className.substring(_arrayDepth)),
  -				_arrayDepth);
  -		}
  -
  -	}
  -
  -	/**
  -	 * Method getBCELPrimitiveType.
  -	 * 	Returns the BCEL Type given the Class Name 
  -	 * @param javaDataType
  -	 * @return Type
  -	 */
  -	private Type getBCELPrimitiveType(String javaDataType)
  -	{
  -		switch (javaDataType.charAt(0))
  -		{
  -
  -			case 'b' :
  -				if (javaDataType.toString().charAt(1) == 'o')
  -					return Type.BOOLEAN;
  -				else
  -					return Type.BYTE;
  -			case 'c' :
  -			case 'C' :
  -				return Type.CHAR;
  -			case 's' :
  -			case 'S' :
  -				return Type.SHORT;
  -			case 'i' :
  -			case 'I' :
  -				return Type.INT;
  -			case 'l' :
  -			case 'L' :
  -				return Type.LONG;
  -			case 'f' :
  -			case 'F' :
  -				return Type.FLOAT;
  -			case 'd' :
  -			case 'D' :
  -				return Type.DOUBLE;
  -				//boolean array appears in this format
  -			case 'Z' :
  -				return Type.BOOLEAN;
  -			case 'B' :
  -				return Type.BYTE;
  -			case 'v' :
  -			case 'V' :
  -				return Type.VOID;
  -		}
  -		return null;
  -	}
  -
  -	/**
  -	 * Method getJavaWrapperClass.
  -	 * 	Returns the String representing the Wrapper class given the 
  -	 * 		primitive datatype
  -	 * @param javaDataType
  -	 * @return String
  -	 */
  -	private String getJavaWrapperClass(String javaDataType)
  -	{
  -		switch (javaDataType.charAt(0))
  -		{
  -
  -			case 'b' :
  -				if (javaDataType.charAt(1) == 'o')
  -					return "java.lang.Boolean";
  -				else
  -					return "java.lang.Byte";
  -			case 'c' :
  -			case 'C' :
  -				return "java.lang.Character";
  -			case 's' :
  -			case 'S' :
  -				return "java.lang.Short";
  -			case 'i' :
  -			case 'I' :
  -				return "java.lang.Integer";
  -			case 'l' :
  -			case 'L' :
  -				return "java.lang.Long";
  -			case 'f' :
  -			case 'F' :
  -				return "java.lang.Float";
  -			case 'd' :
  -			case 'D' :
  -				return "java.lang.Double";
  -			case 'B' :
  -				return "java.lang.Byte";
  -			case 'Z' :
  -				return "java.lang.Boolean";
  -			case 'v' :
  -			case 'V' :
  -				return "java.lang.Void";
  -			case '[' :
  -				mArrayDepth_++;
  -				return getJavaWrapperClass(javaDataType.substring(1));
  -
  -		}
  -		return null; //never occurs;
  -	}
  -
  -	private void addField(String _encodedFieldName)
  -	{
  -		if (!mInternalFieldRepresentingClasses.contains(_encodedFieldName))
  -		{
  -			//System.out.println("method."+method.getName()+".addingfield[" + _encodedFieldName + "]");
  -			FieldGen field =
  -				new FieldGen(
  -					Constants.ACC_STATIC,
  -					new ObjectType("java.lang.Class"),
  -					_encodedFieldName,
  -					mConstantsPool);
  -			mClassGen.addField(field.getField());
  -			mInternalFieldRepresentingClasses.add(_encodedFieldName);
  -		}
  -
  -	}
  -	
  -	//++++++++++++++++++testing
  -	private void createTestMethod(InstructionList il, String msg)
  -	{
  -		il.append(
  -			mFactory.createFieldAccess(
  -				"java.lang.System",
  -				"out",
  -				new ObjectType("java.io.PrintStream"),
  -				Constants.GETSTATIC));
  -		il.append(new PUSH(mConstantsPool, msg));
  -		il.append(
  -			mFactory.createInvoke(
  -				"java.io.PrintStream",
  -				"println",
  -				Type.VOID,
  -				new Type[] { Type.STRING },
  -				Constants.INVOKEVIRTUAL));
  -	}
  -
  -	private void debug(String prefix, Object[] a)
  -	{
  -		System.out.print(prefix);
  -		for (int i = 0; i < a.length; i++)
  -			System.out.print(a[i] + ":");
  -		System.out.println();
  -	}
  -
  -	public Class getGeneratedClass(String mGeneratedClassName)
  -	{
  -		return getAltrmiClass(mGeneratedClassName);
  -	}
  -
  -	/**
  -	 * Method getAltrmiClass.
  -	 * 	This get the Class definition from the bytes
  -	 * @return Class
  -	 */
  -	private Class getAltrmiClass(String className)
  -	{
  -
  -		/*
  -		FromJavaClassClassLoader fromJavaClassClassLoader =
  -			new FromJavaClassClassLoader();
  -		Class clazz =
  -			fromJavaClassClassLoader.getClassFromJavaClass(mClassGen.getJavaClass());
  -		*/
  -		Class clazz = null;
  -
  -		try
  -		{
  -			URLClassLoader urlCL =
  -				new URLClassLoader(
  -					new URL[] {
  -						 new URL("file:/" + new File(mClassGenDir).getCanonicalPath() + "/")},
  -			//
  -			this.getClass().getClassLoader());
  -			clazz = urlCL.loadClass(className);
  -		}
  -
  -		catch (ClassNotFoundException e)
  -		{
  -			e.printStackTrace();
  -		}
  -		catch (MalformedURLException e)
  -		{
  -			e.printStackTrace();
  -		}
  -		catch (IOException e)
  -		{
  +        }
   
  -		}
  +        return clazz;
  +    }
   
  -		return clazz;
  -	}
  -
  -	//++++++++++++++++++testing
  -	//</BCEL>
  +    //++++++++++++++++++testing
  +    //</BCEL>
   
   }
  
  
  
  1.9       +2 -2      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/generator/ProxyGeneratorImpl.java
  
  Index: ProxyGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/generator/ProxyGeneratorImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ProxyGeneratorImpl.java	14 May 2002 21:37:21 -0000	1.8
  +++ ProxyGeneratorImpl.java	23 May 2002 21:37:21 -0000	1.9
  @@ -26,7 +26,7 @@
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
    * @author Mike Miller of www.gac.com
    * @author <a href="mailto:proyal@apache.org">Peter Royal</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public class ProxyGeneratorImpl extends AbstractMethodHandler implements ProxyGenerator
   {
  @@ -60,7 +60,7 @@
        * @param additionalFacades
        *
        */
  -    public void setAdditionalfacades( Class[] additionalFacades )
  +    public void setAdditionalFacades( Class[] additionalFacades )
       {
           mAdditionalFacades = additionalFacades;
       }
  
  
  
  1.6       +11 -11    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/generator/ant/AltrmiProxyTask.java
  
  Index: AltrmiProxyTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/generator/ant/AltrmiProxyTask.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AltrmiProxyTask.java	14 May 2002 22:43:07 -0000	1.5
  +++ AltrmiProxyTask.java	23 May 2002 21:37:21 -0000	1.6
  @@ -24,7 +24,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 AltrmiProxyTask extends Task
   {
  @@ -191,14 +191,14 @@
           mVerbose = verbose;
       }
   
  -	/**
  -	 * Sets the GeneratorClass
  -	 * @param generatorClass The Generator Class to set.
  -	 */
  -	public void setGeneratorClass(String generatorClass)
  -	{
  -		this.mGeneratorClass = generatorClass;
  -	}
  +    /**
  +     * Sets the GeneratorClass
  +     * @param generatorClass The Generator Class to set.
  +     */
  +    public void setGeneratorClass(String generatorClass)
  +    {
  +        this.mGeneratorClass = generatorClass;
  +    }
   
       /**
        * Method execute
  @@ -277,7 +277,7 @@
                       additionalFacades[ i ] = cLoader.loadClass( cn );
                   }
   
  -                proxyGenerator.setAdditionalfacades( additionalFacades );
  +                proxyGenerator.setAdditionalFacades( additionalFacades );
               }
   
               ClassLoader cL = null;
  @@ -305,7 +305,7 @@
               throw new BuildException( "Proxy Gerneation error : " + sge.getMessage() );
           }
       }
  -	
  +    
   
   
   }
  
  
  
  1.7       +14 -12    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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- InvocationHandlerAdapter.java	24 Apr 2002 12:43:01 -0000	1.6
  +++ InvocationHandlerAdapter.java	23 May 2002 21:37:21 -0000	1.7
  @@ -34,6 +34,8 @@
   import org.apache.excalibur.altrmi.common.PingReply;
   import org.apache.excalibur.altrmi.common.RequestFailedReply;
   import org.apache.excalibur.altrmi.common.SuspendedReply;
  +import org.apache.excalibur.altrmi.common.AltrmiRequestConstants;
  +import org.apache.excalibur.altrmi.common.AltrmiReplyConstants;
   import org.apache.excalibur.altrmi.server.AltrmiAuthenticator;
   import org.apache.excalibur.altrmi.server.ClassRetrievalException;
   import org.apache.excalibur.altrmi.server.ClassRetriever;
  @@ -47,7 +49,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
    */
   public class InvocationHandlerAdapter extends PublicationAdapter
       implements AltrmiInvocationHandler
  @@ -103,43 +105,43 @@
   
           // Method request is positioned first as
           // it is the one we want to be most speedy.
  -        if( request.getRequestCode() == AltrmiRequest.METHODREQUEST )
  +        if( request.getRequestCode() == AltrmiRequestConstants.METHODREQUEST )
           {
               return doMethodRequest( request );
   
           }
  -        else if( request.getRequestCode() == AltrmiRequest.METHODFACADEREQUEST )
  +        else if( request.getRequestCode() == AltrmiRequestConstants.METHODFACADEREQUEST )
           {
               return doMethodFacadeRequest( request );
   
           }
  -        else if( request.getRequestCode() == AltrmiRequest.GCREQUEST )
  +        else if( request.getRequestCode() == AltrmiRequestConstants.GCREQUEST )
           {
               return doGarbageCollectionRequest( request );
   
           }
  -        else if( request.getRequestCode() == AltrmiRequest.LOOKUPREQUEST )
  +        else if( request.getRequestCode() == AltrmiRequestConstants.LOOKUPREQUEST )
           {
               return doLookupRequest( request );
   
           }
  -        else if( request.getRequestCode() == AltrmiRequest.CLASSREQUEST )
  +        else if( request.getRequestCode() == AltrmiRequestConstants.CLASSREQUEST )
           {
               return doClassRequest( request );
   
           }
  -        else if( request.getRequestCode() == AltrmiRequest.OPENCONNECTIONREQUEST )
  +        else if( request.getRequestCode() == AltrmiRequestConstants.OPENCONNECTIONREQUEST )
           {
               return doOpenConnectionRequest();
   
           }
  -        else if( request.getRequestCode() == AltrmiRequest.PINGREQUEST )
  +        else if( request.getRequestCode() == AltrmiRequestConstants.PINGREQUEST )
           {
   
               // we could communicate back useful state info in this transaction.
               return new PingReply();
           }
  -        else if( request.getRequestCode() == AltrmiRequest.LISTREQUEST )
  +        else if( request.getRequestCode() == AltrmiRequestConstants.LISTREQUEST )
           {
               return doListRequest();
           }
  @@ -170,15 +172,15 @@
               (MethodInvocationHandler)mPublishedObjects.get( publishedThing );
           AltrmiReply ar = methodInvocationHandler.handleMethodInvocation( mFacReq );
   
  -        if( ar.getReplyCode() == AltrmiReply.EXCEPTIONREPLY )
  +        if( ar.getReplyCode() == AltrmiReplyConstants.EXCEPTIONREPLY )
           {
               return ar;
           }
  -        else if( ar.getReplyCode() >= AltrmiReply.PROBLEMREPLY )
  +        else if( ar.getReplyCode() >= AltrmiReplyConstants.PROBLEMREPLY )
           {
               return ar;
           }
  -        else if( ar.getReplyCode() == AltrmiReply.METHODREPLY )
  +        else if( ar.getReplyCode() == AltrmiReplyConstants.METHODREPLY )
           {
               Object methodReply = ( (MethodReply)ar ).getReplyObject();
   
  
  
  
  1.4       +3 -2      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/CallbackServerClassAltrmiFactory.java
  
  Index: CallbackServerClassAltrmiFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/CallbackServerClassAltrmiFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CallbackServerClassAltrmiFactory.java	6 May 2002 18:14:37 -0000	1.3
  +++ CallbackServerClassAltrmiFactory.java	23 May 2002 21:37:21 -0000	1.4
  @@ -18,6 +18,7 @@
   import org.apache.excalibur.altrmi.common.LookupReply;
   import org.apache.excalibur.altrmi.common.LookupRequest;
   import org.apache.excalibur.altrmi.common.NotPublishedReply;
  +import org.apache.excalibur.altrmi.common.AltrmiReplyConstants;
   
   /**
    * Class CallbackServerClassAltrmiFactory :
  @@ -28,7 +29,7 @@
    *      PublishedName during this part of the protocol.
    *
    * @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class CallbackServerClassAltrmiFactory extends ServerClassAltrmiFactory
   {
  @@ -82,7 +83,7 @@
               .handleInvocation( new LookupRequest( modifiedPublishedName, altrmiAuthentication,
                                                     mSession ) );
   
  -        if( ar.getReplyCode() >= AltrmiReply.PROBLEMREPLY )
  +        if( ar.getReplyCode() >= AltrmiReplyConstants.PROBLEMREPLY )
           {
               if( ar instanceof NotPublishedReply )
               {
  
  
  
  1.4       +9 -9      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers/DynamicGeneratorClassRetriever.java
  
  Index: DynamicGeneratorClassRetriever.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers/DynamicGeneratorClassRetriever.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DynamicGeneratorClassRetriever.java	17 May 2002 19:02:19 -0000	1.3
  +++ DynamicGeneratorClassRetriever.java	23 May 2002 21:37:21 -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 DynamicGeneratorClassRetriever implements AltrmiProxyGenerator, ClassRetriever
   {
  @@ -35,7 +35,7 @@
       private String mClassGenDir;
       private String mSrcGenDir;
       private URL mGenJarURL;
  -	private String mGeneratorClass="org.apache.excalibur.altrmi.generator.ProxyGeneratorImpl";
  +    private String mGeneratorClass="org.apache.excalibur.altrmi.generator.ProxyGeneratorImpl";
   
       /**
        * Constructor DynamicGeneratorClassRetriever
  @@ -47,19 +47,19 @@
           mGenJarURL = genJarURL;
       }
   
  -	/**
  +    /**
        * Constructor DynamicGeneratorClassRetriever
        * @param genJarURL 
  -	 * @param generatorType  Values: "bcel" - Use the BCELProxyGeneratorImpl for generating the proxies
  -	 *	                                      Any other value for generatorType uses the default generator,v.i.z
  -	 *                                        ProxyGeneratorImpl (which internally uses 'javac' to generate proxies)
  +     * @param generatorType  Values: "bcel" - Use the BCELProxyGeneratorImpl for generating the proxies
  +     *                                          Any other value for generatorType uses the default generator,v.i.z
  +     *                                        ProxyGeneratorImpl (which internally uses 'javac' to generate proxies)
        *
        */
       public DynamicGeneratorClassRetriever( URL genJarURL ,String generatorType)
       {
           mGenJarURL = genJarURL;
  -		if(generatorType.equalsIgnoreCase("bcel"))
  -			mGeneratorClass="org.apache.excalibur.altrmi.generator.BCELProxyGeneratorImpl";
  +        if(generatorType.equalsIgnoreCase("bcel"))
  +            mGeneratorClass="org.apache.excalibur.altrmi.generator.BCELProxyGeneratorImpl";
       }
       /**
        * Method generate
  @@ -279,7 +279,7 @@
           proxyGenerator.setGenName( asName );
           proxyGenerator.setClasspath( mAltrmiClasspath );
           proxyGenerator.setInterfacesToExpose( interfacesToExpose );
  -        proxyGenerator.setAdditionalfacades( addInfs );
  +        proxyGenerator.setAdditionalFacades( addInfs );
   
           //ClassLoader cL = this.getClass().getClassLoader();
           try
  
  
  
  1.4       +2 -2      jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestListenerImpl.java
  
  Index: CallBackTestListenerImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/callback/CallBackTestListenerImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CallBackTestListenerImpl.java	19 May 2002 08:46:11 -0000	1.3
  +++ CallBackTestListenerImpl.java	23 May 2002 21:37:21 -0000	1.4
  @@ -23,8 +23,8 @@
       }
   
       /*
  -	 * @see CallBackTestListener#serverCallingClient(String)
  -	 */
  +     * @see CallBackTestListener#serverCallingClient(String)
  +     */
       public void serverCallingClient( String message )
       {
           System.out.println( "CallBackTestListenerImpl: Server message for instance number " + instNbr + " [" + message + "]" );
  
  
  
  1.3       +138 -138  jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/generator/BCELProxyGeneratorTestCase.java
  
  Index: BCELProxyGeneratorTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/generator/BCELProxyGeneratorTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BCELProxyGeneratorTestCase.java	14 May 2002 22:47:16 -0000	1.2
  +++ BCELProxyGeneratorTestCase.java	23 May 2002 21:37:21 -0000	1.3
  @@ -21,45 +21,45 @@
   
   /**
    * Class BCELProxyGeneratorTest
  - * 	Unit testing of BCELProxyGeneratorImpl
  - * @version 	1.0
  + *     Unit testing of BCELProxyGeneratorImpl
  + * @version     1.0
    * @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
    */
   public class BCELProxyGeneratorTestCase  extends TestCase
   { 
  -	private ProxyGenerator mProxyGenerator;
  -	private Class mGeneratedProxyClass;
  -	private Object mGeneratedProxyObject; 
  -	/************************ TestInterface *******************/
  -	public  static final Class mTestInterfaceClass=//org.apache.excalibur.altrmi.test.TestInterface.class;
  -													 TestRemoteInterface.class;
  -	public BCELProxyGeneratorTestCase(String testName)
  -	{
  -		super(testName);
  -	}
  +    private ProxyGenerator mProxyGenerator;
  +    private Class mGeneratedProxyClass;
  +    private Object mGeneratedProxyObject; 
  +    /************************ TestInterface *******************/
  +    public  static final Class mTestInterfaceClass=//org.apache.excalibur.altrmi.test.TestInterface.class;
  +                                                     TestRemoteInterface.class;
  +    public BCELProxyGeneratorTestCase(String testName)
  +    {
  +        super(testName);
  +    }
    
  -	private Class _createNewClass()
  -	{
  -		if(mGeneratedProxyClass!=null)
  -			return mGeneratedProxyClass;
  -		mProxyGenerator.setGenName("Something");
  -		mProxyGenerator.setInterfacesToExpose(new Class[]{mTestInterfaceClass});
  -		mProxyGenerator.setClassGenDir(".");
  -		mProxyGenerator.verbose(true);
  -		mProxyGenerator.generateClass(null);
  -		
  -		
  -		mGeneratedProxyClass=((BCELProxyGeneratorImpl)mProxyGenerator).getGeneratedClass("AltrmiGeneratedSomething_Main");
  -		return mGeneratedProxyClass;
  -	}
  +    private Class _createNewClass()
  +    {
  +        if(mGeneratedProxyClass!=null)
  +            return mGeneratedProxyClass;
  +        mProxyGenerator.setGenName("Something");
  +        mProxyGenerator.setInterfacesToExpose(new Class[]{mTestInterfaceClass});
  +        mProxyGenerator.setClassGenDir(".");
  +        mProxyGenerator.verbose(true);
  +        mProxyGenerator.generateClass(null);
  +        
  +        
  +        mGeneratedProxyClass=((BCELProxyGeneratorImpl)mProxyGenerator).getGeneratedClass("AltrmiGeneratedSomething_Main");
  +        return mGeneratedProxyClass;
  +    }
   
   
   
  -	/*
  -	 * @see TestCase#setUp()
  -	 */
  -	protected void setUp() throws Exception
  -	{
  +    /*
  +     * @see TestCase#setUp()
  +     */
  +    protected void setUp() throws Exception
  +    {
           try
           {
               mProxyGenerator =
  @@ -74,112 +74,112 @@
               throw new RuntimeException("PrimaryGenerator Impl jar not in classpath");
           }
           //create the Proxy Class using the BCEL Generator
  -		_createNewClass();	
  -		mProxyGenerator.verbose(true);
  -	}
  -	
  -	
  -	/**
  -	 * Method testGeneratedClassName.
  -	 * 	Checks whether 'Class' is created properly
  -	 */
  -	public void testGeneratedClassNameOfProxy()
  -	{
  -		assertNotNull(mProxyGenerator);
  -		assertNotNull(mGeneratedProxyClass);
  -		assertEquals(mGeneratedProxyClass.getName().equals("AltrmiGeneratedSomething_Main"),true);
  -	}
  -
  -	/**
  -	 * Method testConstructorOfProxy.
  -	 * 	Test if the instance is created properly using the lone 
  -	 * 		Constructor embedded within the AltrmiProxy implementation
  -	 * @throws Exception
  -	 */
  -	public void testConstructorOfProxy() throws Exception
  -	{
  -		if(mGeneratedProxyClass==null)
  -			testGeneratedClassNameOfProxy();
  -		
  -		DefaultProxyHelper defaultProxyHelper = 
  -							new DefaultProxyHelper(null,
  -												  new TestInvocationHandler(),
  -												  "PublishedName",
  -												  "ObjectName",
  -												  new Long(1010),
  -												  new Long(3030));
  -	
  -		Constructor[] _constructors=  mGeneratedProxyClass.getConstructors();
  -		//there shld be only 1 constructor for the generated proxy
  -		// one that takes BaseServedObject as the argument
  -		assertEquals(_constructors.length,1);
  -	
  -		mGeneratedProxyObject = _constructors[0].newInstance(new Object[]{defaultProxyHelper});
  -		assertNotNull(mGeneratedProxyObject);
  -			
  -	}
  -	
  -	
  -	/**
  -	 * Method testGetReferenceIDMethodOfProxy.
  -	 * 	Testing 
  -	 * =================================
  -	 * public Long altrmiGetReferenceID(Object factoryThatIsAsking) {
  +        _createNewClass();    
  +        mProxyGenerator.verbose(true);
  +    }
  +    
  +    
  +    /**
  +     * Method testGeneratedClassName.
  +     *     Checks whether 'Class' is created properly
  +     */
  +    public void testGeneratedClassNameOfProxy()
  +    {
  +        assertNotNull(mProxyGenerator);
  +        assertNotNull(mGeneratedProxyClass);
  +        assertEquals(mGeneratedProxyClass.getName().equals("AltrmiGeneratedSomething_Main"),true);
  +    }
  +
  +    /**
  +     * Method testConstructorOfProxy.
  +     *     Test if the instance is created properly using the lone 
  +     *         Constructor embedded within the AltrmiProxy implementation
  +     * @throws Exception
  +     */
  +    public void testConstructorOfProxy() throws Exception
  +    {
  +        if(mGeneratedProxyClass==null)
  +            testGeneratedClassNameOfProxy();
  +        
  +        DefaultProxyHelper defaultProxyHelper = 
  +                            new DefaultProxyHelper(null,
  +                                                  new TestInvocationHandler(),
  +                                                  "PublishedName",
  +                                                  "ObjectName",
  +                                                  new Long(1010),
  +                                                  new Long(3030));
  +    
  +        Constructor[] _constructors=  mGeneratedProxyClass.getConstructors();
  +        //there shld be only 1 constructor for the generated proxy
  +        // one that takes BaseServedObject as the argument
  +        assertEquals(_constructors.length,1);
  +    
  +        mGeneratedProxyObject = _constructors[0].newInstance(new Object[]{defaultProxyHelper});
  +        assertNotNull(mGeneratedProxyObject);
  +            
  +    }
  +    
  +    
  +    /**
  +     * Method testGetReferenceIDMethodOfProxy.
  +     *     Testing 
  +     * =================================
  +     * public Long altrmiGetReferenceID(Object factoryThatIsAsking) {
        *   return mBaseServedObject.getReferenceID(factoryThatIsAsking);
  -     *	}
  -	 * =================================
  -	 * @throws Exception
  -	 */
  -	public void testGetReferenceIDMethodOfProxy() throws Exception
  -	{
  -		if(mGeneratedProxyObject==null)
  -			testConstructorOfProxy();
  -		
  -		Method _getReferenceIDMethod = mGeneratedProxyClass.getMethod("altrmiGetReferenceID",new Class[]{Object.class});
  -		assertNotNull(_getReferenceIDMethod);
  -		Object _ret = _getReferenceIDMethod.invoke(mGeneratedProxyObject,new Object[]{null});
  -		assertEquals(new Long(1010),_ret);
  -	}
  -
  -	/**
  -	 * Method testGeneratedMethodsPassOne.
  -	 * 	Testing
  -	 * This test involves the crux of the stub-generation  
  -	 * routine.
  -	 * 1. Pass an test interface for stub-generation
  -	 * 2. Test the created stub
  -	 * @throws Exception
  -	 */
  -	public void testGeneratedMethodsPassOne() throws Exception
  -	{
  -		if(mGeneratedProxyObject==null)
  -			testConstructorOfProxy();
  -		
  -		
  -		Method[] __fooMethods = mGeneratedProxyClass.getMethods();
  -		for(int i=0;i<__fooMethods.length;i++)
  -		{
  -			if(__fooMethods[i].getName().indexOf("test")==-1)
  -			{
  -				continue;
  -			}
  -			//System.out.println("Testing method["+__fooMethods[i].getName()+"]");
  -			Object[] _arguments= new Object[__fooMethods[i].getParameterTypes().length];
  -			for(int j=0;j<_arguments.length;j++)
  -			{
  -				
  -				_arguments[j]=mTestInterfaceClass.getField(__fooMethods[i].getName()+"_arg"+j).get(null);
  -				//System.out.println("argType["+__fooMethods[i].getParameterTypes()[j]+"]arg["+j+"]"+_arguments[j]);
  -			}
  -			if(__fooMethods[i].getParameterTypes().length==0)
  -				_arguments=null;
  -			Object _ret=__fooMethods[i].invoke(mGeneratedProxyObject,_arguments);
  -			
  -			if(__fooMethods[i].getReturnType()!=Void.TYPE)
  -			{
  -				assertEquals(mTestInterfaceClass.getField(__fooMethods[i].getName()+"_retValue").get(null),_ret);
  -			}
  -		}
  -	}
  -	
  +     *    }
  +     * =================================
  +     * @throws Exception
  +     */
  +    public void testGetReferenceIDMethodOfProxy() throws Exception
  +    {
  +        if(mGeneratedProxyObject==null)
  +            testConstructorOfProxy();
  +        
  +        Method _getReferenceIDMethod = mGeneratedProxyClass.getMethod("altrmiGetReferenceID",new Class[]{Object.class});
  +        assertNotNull(_getReferenceIDMethod);
  +        Object _ret = _getReferenceIDMethod.invoke(mGeneratedProxyObject,new Object[]{null});
  +        assertEquals(new Long(1010),_ret);
  +    }
  +
  +    /**
  +     * Method testGeneratedMethodsPassOne.
  +     *     Testing
  +     * This test involves the crux of the stub-generation  
  +     * routine.
  +     * 1. Pass an test interface for stub-generation
  +     * 2. Test the created stub
  +     * @throws Exception
  +     */
  +    public void testGeneratedMethodsPassOne() throws Exception
  +    {
  +        if(mGeneratedProxyObject==null)
  +            testConstructorOfProxy();
  +        
  +        
  +        Method[] __fooMethods = mGeneratedProxyClass.getMethods();
  +        for(int i=0;i<__fooMethods.length;i++)
  +        {
  +            if(__fooMethods[i].getName().indexOf("test")==-1)
  +            {
  +                continue;
  +            }
  +            //System.out.println("Testing method["+__fooMethods[i].getName()+"]");
  +            Object[] _arguments= new Object[__fooMethods[i].getParameterTypes().length];
  +            for(int j=0;j<_arguments.length;j++)
  +            {
  +                
  +                _arguments[j]=mTestInterfaceClass.getField(__fooMethods[i].getName()+"_arg"+j).get(null);
  +                //System.out.println("argType["+__fooMethods[i].getParameterTypes()[j]+"]arg["+j+"]"+_arguments[j]);
  +            }
  +            if(__fooMethods[i].getParameterTypes().length==0)
  +                _arguments=null;
  +            Object _ret=__fooMethods[i].invoke(mGeneratedProxyObject,_arguments);
  +            
  +            if(__fooMethods[i].getReturnType()!=Void.TYPE)
  +            {
  +                assertEquals(mTestInterfaceClass.getField(__fooMethods[i].getName()+"_retValue").get(null),_ret);
  +            }
  +        }
  +    }
  +    
   }
  
  
  
  1.4       +56 -56    jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/generator/TestInvocationHandler.java
  
  Index: TestInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/generator/TestInvocationHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestInvocationHandler.java	14 May 2002 22:47:16 -0000	1.3
  +++ TestInvocationHandler.java	23 May 2002 21:37:21 -0000	1.4
  @@ -20,65 +20,65 @@
   
   /**
    * TestInvocationHandler 
  - * @version 	1.0
  + * @version     1.0
    * @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
    */
   public class TestInvocationHandler extends  AbstractClientInvocationHandler{
   
  -	/*
  -	 * @see AltrmiInvocationHandler#handleInvocation(AltrmiRequest)
  -	 */
  -	public AltrmiReply handleInvocation(AltrmiRequest request) {
  -		MethodRequest methodRequest = (MethodRequest) request;
  -		//System.out.println("methodRequest[" + methodRequest.getMethodSignature() + "]");
  -		Method[] methods = TestRemoteInterface.class.getMethods();
  -		for (int i = 0; i < methods.length; i++) 
  -		{
  -			try
  -			{
  -				if (methodRequest.getMethodSignature().indexOf(methods[i].getName()) != -1)
  -				{
  -					Object[] _arguments=methodRequest.getArgs();
  -					for(int j=0;j<_arguments.length;j++)
  -					{	
  -						
  -						if(!TestRemoteInterface.class.getField(methods[i].getName() + "_arg"+j).get(null).equals(_arguments[j]))
  -						{
  -							return new ExceptionReply(new Exception(methodRequest.getMethodSignature()+": arguments not marshalled correctly \n expected["+TestRemoteInterface.class.getField(methods[i].getName() + "_arg"+j).get(null)+"] received["+_arguments[j]+"]"));
  -						}
  -					}
  -					MethodReply methodReply =null;
  -					if(methods[i].getReturnType()!=Void.TYPE)
  -					
  -						methodReply =
  -							new MethodReply(
  -								TestRemoteInterface.class.getField(methods[i].getName() + "_retValue").get(null));
  -					else
  -						methodReply =new MethodReply();				
  -					return methodReply;
  -				}
  -			}
  -			catch(Exception e)
  -			{
  -				e.printStackTrace();
  -				return new ExceptionReply(e);
  -			}
  -		}
  -		return null;
  -	}
  -	/*
  -	 * @see AbstractClientInvocationHandler#tryReconnect()
  -	 */
  -	protected boolean tryReconnect()
  -	{
  -		return true;
  -	}
  -	/*
  -	 * @see AltrmiClientInvocationHandler#getLastRealRequest()
  -	 */
  -	public long getLastRealRequest()
  -	{
  -		return 0;
  -	}
  +    /*
  +     * @see AltrmiInvocationHandler#handleInvocation(AltrmiRequest)
  +     */
  +    public AltrmiReply handleInvocation(AltrmiRequest request) {
  +        MethodRequest methodRequest = (MethodRequest) request;
  +        //System.out.println("methodRequest[" + methodRequest.getMethodSignature() + "]");
  +        Method[] methods = TestRemoteInterface.class.getMethods();
  +        for (int i = 0; i < methods.length; i++) 
  +        {
  +            try
  +            {
  +                if (methodRequest.getMethodSignature().indexOf(methods[i].getName()) != -1)
  +                {
  +                    Object[] _arguments=methodRequest.getArgs();
  +                    for(int j=0;j<_arguments.length;j++)
  +                    {    
  +                        
  +                        if(!TestRemoteInterface.class.getField(methods[i].getName() + "_arg"+j).get(null).equals(_arguments[j]))
  +                        {
  +                            return new ExceptionReply(new Exception(methodRequest.getMethodSignature()+": arguments not marshalled correctly \n expected["+TestRemoteInterface.class.getField(methods[i].getName() + "_arg"+j).get(null)+"] received["+_arguments[j]+"]"));
  +                        }
  +                    }
  +                    MethodReply methodReply =null;
  +                    if(methods[i].getReturnType()!=Void.TYPE)
  +                    
  +                        methodReply =
  +                            new MethodReply(
  +                                TestRemoteInterface.class.getField(methods[i].getName() + "_retValue").get(null));
  +                    else
  +                        methodReply =new MethodReply();                
  +                    return methodReply;
  +                }
  +            }
  +            catch(Exception e)
  +            {
  +                e.printStackTrace();
  +                return new ExceptionReply(e);
  +            }
  +        }
  +        return null;
  +    }
  +    /*
  +     * @see AbstractClientInvocationHandler#tryReconnect()
  +     */
  +    protected boolean tryReconnect()
  +    {
  +        return true;
  +    }
  +    /*
  +     * @see AltrmiClientInvocationHandler#getLastRealRequest()
  +     */
  +    public long getLastRealRequest()
  +    {
  +        return 0;
  +    }
   
   }
  
  
  
  1.3       +57 -57    jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/generator/TestRemoteInterface.java
  
  Index: TestRemoteInterface.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/generator/TestRemoteInterface.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestRemoteInterface.java	14 May 2002 22:47:16 -0000	1.2
  +++ TestRemoteInterface.java	23 May 2002 21:37:22 -0000	1.3
  @@ -10,65 +10,65 @@
   /**
    * Interface TestRemoteInterface
    * Test Interface for which the stub would be generated
  - * 	The test is automated in the sense given the input args and expected
  - * 	return of the function and the testcase will test for the same .
  - * 	The method is invoked on the BCEL generated  proxy and then 
  - * 	the invocationhandler associated with the proxy  will
  - * 	be used to complete the test cycle for the client side stub
  - * @version 	1.0
  + *     The test is automated in the sense given the input args and expected
  + *     return of the function and the testcase will test for the same .
  + *     The method is invoked on the BCEL generated  proxy and then 
  + *     the invocationhandler associated with the proxy  will
  + *     be used to complete the test cycle for the client side stub
  + * @version     1.0
    * @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
    */
   public interface TestRemoteInterface
   {
  -	
  -	String test0(String name);
  -	String test0_arg0="a for altrmi";
  -	String test0_retValue="b for bat";
  -	
  -	
  -	String test1(int me);
  -	String test1_retValue="c for cat";
  -	Integer test1_arg0=new Integer(1);
  -	
  -	
  -	int test2(int you,String str);
  -	Integer test2_retValue=new Integer(7654);
  -	Integer test2_arg0=new Integer(1);
  -	String test2_arg1=new String("d for dog");
  -	
  -	Integer test3();
  -	Integer test3_retValue=new Integer(1010);
  -	
  -	float test4();
  -	Float test4_retValue=new Float(100.10);
  -	
  -	
  -	byte test6(byte[] lotsofdata);
  -	byte[] test6_arg0=new byte[100];
  -	byte test6_retValue=(byte)10;
  -	 
  -	double test5(int[] ia , String[] sa);
  -	int[] test5_arg0={1,2,3};
  -	String[] test5_arg1={"a","b","z"};
  -	Double test5_retValue=new Double(1010.4545);
  -	
  -	void test7();
  -	Float test7_arg0=new Float(10);
  -	
  -	StringBuffer test8(String something);
  -	String test8_arg0="";
  -	StringBuffer test8_retValue=new StringBuffer("I am here , Where are you?");
  -	
  -	StringBuffer test9( float f, double d1,Long d2 ,double s3,String s);
  -	Float test9_arg0=new Float(10);
  -	Double test9_arg1=new Double(1000);
  -	Long test9_arg2=new Long(1000);
  -	Double test9_arg3=new Double(1000);	
  -	String test9_arg4=new String("s for so long, are you a fool");
  -	StringBuffer test9_retValue=new StringBuffer("e for elephant");
  -	
  -	
  -	
  -	
  -	
  +    
  +    String test0(String name);
  +    String test0_arg0="a for altrmi";
  +    String test0_retValue="b for bat";
  +    
  +    
  +    String test1(int me);
  +    String test1_retValue="c for cat";
  +    Integer test1_arg0=new Integer(1);
  +    
  +    
  +    int test2(int you,String str);
  +    Integer test2_retValue=new Integer(7654);
  +    Integer test2_arg0=new Integer(1);
  +    String test2_arg1=new String("d for dog");
  +    
  +    Integer test3();
  +    Integer test3_retValue=new Integer(1010);
  +    
  +    float test4();
  +    Float test4_retValue=new Float(100.10);
  +    
  +    
  +    byte test6(byte[] lotsofdata);
  +    byte[] test6_arg0=new byte[100];
  +    byte test6_retValue=(byte)10;
  +     
  +    double test5(int[] ia , String[] sa);
  +    int[] test5_arg0={1,2,3};
  +    String[] test5_arg1={"a","b","z"};
  +    Double test5_retValue=new Double(1010.4545);
  +    
  +    void test7();
  +    Float test7_arg0=new Float(10);
  +    
  +    StringBuffer test8(String something);
  +    String test8_arg0="";
  +    StringBuffer test8_retValue=new StringBuffer("I am here , Where are you?");
  +    
  +    StringBuffer test9( float f, double d1,Long d2 ,double s3,String s);
  +    Float test9_arg0=new Float(10);
  +    Double test9_arg1=new Double(1000);
  +    Long test9_arg2=new Long(1000);
  +    Double test9_arg3=new Double(1000);    
  +    String test9_arg4=new String("s for so long, are you a fool");
  +    StringBuffer test9_retValue=new StringBuffer("e for elephant");
  +    
  +    
  +    
  +    
  +    
   }
  
  
  

--
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