incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: incubator-altrmi/src/test/org/apache/altrmi/test/async AbstractSimpleAsyncTestCase.java BcelSimpleAsyncTestCase.java JavacSimpleAsyncTestCase.java SimpleAsyncTestCase.java
Date Sun, 18 May 2003 23:10:29 GMT
hammant     2003/05/18 16:10:29

  Modified:    .        build.xml
               src/java/org/apache/altrmi/client ProxyHelper.java
               src/java/org/apache/altrmi/client/impl
                        DefaultProxyHelper.java
               src/java/org/apache/altrmi/common MethodAsyncRequest.java
                        SerializationHelper.java
               src/java/org/apache/altrmi/generator ProxyGeneratorImpl.java
               src/java/org/apache/altrmi/server/impl/adapters
                        InvocationHandlerAdapter.java
  Added:       src/java/org/apache/altrmi/common GroupedMethodRequest.java
               src/test/org/apache/altrmi/test/async
                        AbstractSimpleAsyncTestCase.java
                        BcelSimpleAsyncTestCase.java
                        JavacSimpleAsyncTestCase.java
  Removed:     src/java/org/apache/altrmi/common RawRequest.java
               src/test/org/apache/altrmi/test/async
                        SimpleAsyncTestCase.java
  Log:
  rework of the async stuff. bcel still not quite coping with async - but closer
  
  Revision  Changes    Path
  1.18      +1 -0      incubator-altrmi/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/build.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- build.xml	5 May 2003 21:11:19 -0000	1.17
  +++ build.xml	18 May 2003 23:10:28 -0000	1.18
  @@ -373,6 +373,7 @@
                       <exclude name="**/Abstract*"/>
                       <exclude name="**/JSXObjectStreamTestCase.class"/> 
                       <exclude name="**/BetwixtTestCase.class"/> 
  +                    <exclude name="**/SynchronousMessengerTestCase.class"/> 
                   </fileset>
               </batchtest>
           </junit>
  
  
  
  1.4       +26 -8     incubator-altrmi/src/java/org/apache/altrmi/client/ProxyHelper.java
  
  Index: ProxyHelper.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/client/ProxyHelper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProxyHelper.java	5 May 2003 21:11:19 -0000	1.3
  +++ ProxyHelper.java	18 May 2003 23:10:28 -0000	1.4
  @@ -54,6 +54,8 @@
    */
   package org.apache.altrmi.client;
   
  +import org.apache.altrmi.common.MethodRequest;
  +
   import java.util.Vector;
   
   /**
  @@ -102,25 +104,41 @@
        * Method processVoidRequest
        *
        *
  -     * @param methodSignature
  -     * @param args
  +     * @param methodSignature the method signature
  +     * @param args The Arguments themselves
        *
        * @throws Throwable
        *
        */
  -    void processVoidRequest( String methodSignature, Object[] args ) throws Throwable;
  +    void processVoidRequest( String methodSignature, Object[] args, Class[] argClasses ) throws Throwable;
   
       /**
  -     * Method processVoidRequest
  +     * Method queueAsyncRequest
        *
        *
  -     * @param requests
  +     * @param methodSignature the method signature
  +     * @param args The Arguments themselves
  +     *
  +     *
  +     */
  +    void queueAsyncRequest( String methodSignature, Object[] args, Class[] argClasses );
  +
  +    /**
  +     * Method commitAsyncRequests
  +     *
        *
        * @throws Throwable
        *
        */
  -    void processVoidRequests( Vector requests ) throws Throwable;
  +    void commitAsyncRequests() throws Throwable;
   
  +    /**
  +     * Method rollbackAsyncRequests
  +     *
  +     *
  +     *
  +     */
  +    void rollbackAsyncRequests();
   
       /**
        * Method processVoidRequestWithRedirect
  @@ -132,7 +150,7 @@
        * @throws Throwable
        *
        */
  -    void processVoidRequestWithRedirect( String methodSignature, Object[] args ) throws Throwable;
  +    void processVoidRequestWithRedirect( String methodSignature, Object[] args, Class[] argClasses ) throws Throwable;
   
       /**
        * Method getReferenceID
  
  
  
  1.5       +177 -221  incubator-altrmi/src/java/org/apache/altrmi/client/impl/DefaultProxyHelper.java
  
  Index: DefaultProxyHelper.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/client/impl/DefaultProxyHelper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultProxyHelper.java	5 May 2003 21:11:19 -0000	1.4
  +++ DefaultProxyHelper.java	18 May 2003 23:10:28 -0000	1.5
  @@ -67,7 +67,7 @@
   import org.apache.altrmi.common.MethodRequest;
   import org.apache.altrmi.common.Reply;
   import org.apache.altrmi.common.MethodReply;
  -import org.apache.altrmi.common.RawRequest;
  +import org.apache.altrmi.common.GroupedMethodRequest;
   import org.apache.altrmi.common.MethodAsyncRequest;
   import org.apache.altrmi.common.ExceptionReply;
   import org.apache.altrmi.common.NoSuchSessionReply;
  @@ -79,7 +79,9 @@
   import org.apache.altrmi.common.MethodFacadeRequest;
   
   import java.lang.reflect.Array;
  -import java.util.Vector;
  +import java.util.ArrayList;
  +import java.util.List;
  +import java.util.Arrays;
   
   /**
    * Class DefaultProxyHelper
  @@ -89,8 +91,7 @@
    * @author Vinay Chandrasekharan <a href="mailto:vinayc77@yahoo.com">vinayc77@yahoo.com</a>
    * @version $Revision$
    */
  -public final class DefaultProxyHelper implements ProxyHelper
  -{
  +public final class DefaultProxyHelper implements ProxyHelper {
   
       private final transient AbstractFactory m_altrmiFactory;
       private final transient ClientInvocationHandler m_clientInvocationHandler;
  @@ -99,7 +100,7 @@
       private final transient Long m_referenceID;
       private final transient Long m_session;
       private ClientContextFactory m_clientContextClientFactory;
  -
  +    private ArrayList queuedAsyncRequests = new ArrayList();
   
       /**
        * Constructor DefaultProxyHelper
  @@ -113,11 +114,10 @@
        * @param session
        *
        */
  -    public DefaultProxyHelper( AbstractFactory altrmiFactory,
  -                               ClientInvocationHandler clientInvocationHandler,
  -                               String pubishedServiceName, String objectName, Long referenceID,
  -                               Long session )
  -    {
  +    public DefaultProxyHelper(AbstractFactory altrmiFactory,
  +                              ClientInvocationHandler clientInvocationHandler,
  +                              String pubishedServiceName, String objectName, Long referenceID,
  +                              Long session) {
   
           m_altrmiFactory = altrmiFactory;
           m_clientInvocationHandler = clientInvocationHandler;
  @@ -134,9 +134,8 @@
        * @param implBean
        *
        */
  -    public void registerImplObject( Object implBean )
  -    {
  -        m_altrmiFactory.registerReferenceObject( implBean, m_referenceID );
  +    public void registerImplObject(Object implBean) {
  +        m_altrmiFactory.registerReferenceObject(implBean, m_referenceID);
       }
   
       /**
  @@ -156,131 +155,106 @@
        */
   
       public Object processObjectRequestGettingFacade(
  -        Class returnClassType, String methodSignature, Object[] args, String objectName )
  -        throws Throwable
  -    {
  -        try
  -        {
  +            Class returnClassType, String methodSignature, Object[] args, String objectName)
  +            throws Throwable {
  +        try {
               return processObjectRequestGettingFacade2(returnClassType, methodSignature, args, objectName);
  -        }
  -        catch (InvocationException ie)
  -        {
  +        } catch (InvocationException ie) {
               m_clientInvocationHandler.getClientMonitor().invocationFailure(this.getClass(), this.getClass().getName(), ie);
               throw ie;
           }
       }
   
       private Object processObjectRequestGettingFacade2(
  -        Class returnClassType, String methodSignature, Object[] args, String objectName )
  -        throws Throwable
  -    {
  +            Class returnClassType, String methodSignature, Object[] args, String objectName)
  +            throws Throwable {
   
  -        boolean arrayRetVal = objectName.endsWith( "[]" );
  -        String objNameWithoutArray = objectName.substring( 0, objectName.length() - 2 );
  +        boolean arrayRetVal = objectName.endsWith("[]");
  +        String objNameWithoutArray = objectName.substring(0, objectName.length() - 2);
           MethodFacadeRequest request;
   
  -        if( arrayRetVal )
  -        {
  -            request = new MethodFacadeRequest( m_publishedServiceName, m_objectName,
  -                                               methodSignature, args, m_referenceID,
  -                                               objNameWithoutArray, m_session );
  -        }
  -        else
  -        {
  -            request = new MethodFacadeRequest( m_publishedServiceName, m_objectName,
  -                                               methodSignature, args, m_referenceID, objectName,
  -                                               m_session );
  +        if (arrayRetVal) {
  +            request = new MethodFacadeRequest(m_publishedServiceName, m_objectName,
  +                    methodSignature, args, m_referenceID,
  +                    objNameWithoutArray, m_session);
  +        } else {
  +            request = new MethodFacadeRequest(m_publishedServiceName, m_objectName,
  +                    methodSignature, args, m_referenceID, objectName,
  +                    m_session);
           }
   
           setContext(request);
  -        Reply reply = m_clientInvocationHandler.handleInvocation( request );
  +        Reply reply = m_clientInvocationHandler.handleInvocation(request);
   
  -        if( reply.getReplyCode() == ReplyConstants.METHODFACADEREPLY )
  -        {
  -            MethodFacadeReply mfr = (MethodFacadeReply)reply;
  +        if (reply.getReplyCode() == ReplyConstants.METHODFACADEREPLY) {
  +            MethodFacadeReply mfr = (MethodFacadeReply) reply;
               Long ref = mfr.getReferenceID();
   
               // it might be that the return value was intended to be null.
  -            if( ref == null )
  -            {
  +            if (ref == null) {
                   return null;
               }
   
  -            Object implBean = m_altrmiFactory.getImplObj( ref );
  +            Object implBean = m_altrmiFactory.getImplObj(ref);
   
  -            if( implBean == null )
  -            {
  -                DefaultProxyHelper pHelper = new DefaultProxyHelper( m_altrmiFactory,
  -                                                                     m_clientInvocationHandler,
  -                                                                     m_publishedServiceName,
  -                                                                     mfr.getObjectName(), ref,
  -                                                                     m_session );
  -                Object retFacade = m_altrmiFactory.getInstance( m_publishedServiceName,
  -                                                               mfr.getObjectName(), pHelper);
  +            if (implBean == null) {
  +                DefaultProxyHelper pHelper = new DefaultProxyHelper(m_altrmiFactory,
  +                        m_clientInvocationHandler,
  +                        m_publishedServiceName,
  +                        mfr.getObjectName(), ref,
  +                        m_session);
  +                Object retFacade = m_altrmiFactory.getInstance(m_publishedServiceName,
  +                        mfr.getObjectName(), pHelper);
   
  -                pHelper.registerImplObject( retFacade );
  +                pHelper.registerImplObject(retFacade);
   
                   return retFacade;
  -            }
  -            else
  -            {
  +            } else {
                   return implBean;
               }
  -        }
  -        else if( reply.getReplyCode() == ReplyConstants.METHODFACADEARRAYREPLY )
  -        {
  -            MethodFacadeArrayReply mfar = (MethodFacadeArrayReply)reply;
  +        } else if (reply.getReplyCode() == ReplyConstants.METHODFACADEARRAYREPLY) {
  +            MethodFacadeArrayReply mfar = (MethodFacadeArrayReply) reply;
               Long[] refs = mfar.getReferenceIDs();
               String[] objectNames = mfar.getObjectNames();
  -            Object[] implBeans = (Object[])Array.newInstance( returnClassType, refs.length );
  +            Object[] implBeans = (Object[]) Array.newInstance(returnClassType, refs.length);
   
  -            for( int i = 0; i < refs.length; i++ )
  -            {
  -                Long ref = refs[ i ];
  -
  -                if( ref == null )
  -                {
  -                    implBeans[ i ] = null;
  -                }
  -                else
  -                {
  -                    Object o = m_altrmiFactory.getImplObj( ref );
  -
  -                    implBeans[ i ] = o;
  -
  -                    if( implBeans[ i ] == null )
  -                    {
  -                        DefaultProxyHelper bo2 = new DefaultProxyHelper( m_altrmiFactory,
  -                                                                         m_clientInvocationHandler,
  -                                                                         m_publishedServiceName,
  -                                                                         objectNames[ i ], refs[ i ],
  -                                                                         m_session );
  +            for (int i = 0; i < refs.length; i++) {
  +                Long ref = refs[i];
  +
  +                if (ref == null) {
  +                    implBeans[i] = null;
  +                } else {
  +                    Object o = m_altrmiFactory.getImplObj(ref);
  +
  +                    implBeans[i] = o;
  +
  +                    if (implBeans[i] == null) {
  +                        DefaultProxyHelper bo2 = new DefaultProxyHelper(m_altrmiFactory,
  +                                m_clientInvocationHandler,
  +                                m_publishedServiceName,
  +                                objectNames[i], refs[i],
  +                                m_session);
                           Object retFacade = null;
   
  -                        try
  -                        {
  -                            retFacade = m_altrmiFactory.getInstance( m_publishedServiceName,
  -                                                                    objectNames[ i ], bo2);
  -                        }
  -                        catch( Exception e )
  -                        {
  -                            System.out.println( "objNameWithoutArray="
  -                                                + returnClassType.getName() );
  +                        try {
  +                            retFacade = m_altrmiFactory.getInstance(m_publishedServiceName,
  +                                    objectNames[i], bo2);
  +                        } catch (Exception e) {
  +                            System.out.println("objNameWithoutArray="
  +                                    + returnClassType.getName());
                               System.out.flush();
                               e.printStackTrace();
                           }
   
  -                        bo2.registerImplObject( retFacade );
  +                        bo2.registerImplObject(retFacade);
   
  -                        implBeans[ i ] = retFacade;
  +                        implBeans[i] = retFacade;
                       }
                   }
               }
   
               return implBeans;
  -        }
  -        else
  -        {
  +        } else {
               throw makeUnexpectedReplyThrowable(reply);
           }
       }
  @@ -297,66 +271,29 @@
        * @throws Throwable
        *
        */
  -    public Object processObjectRequest( String methodSignature, Object[] args, Class[] argClasses ) throws Throwable
  -    {
  +    public Object processObjectRequest(String methodSignature, Object[] args, Class[] argClasses) throws Throwable {
   
  -        try
  -        {
  -            m_altrmiFactory.marshallCorrection( methodSignature, args, argClasses );
  +        try {
  +            m_altrmiFactory.marshallCorrection(methodSignature, args, argClasses);
   
  -            MethodRequest request = new MethodRequest( m_publishedServiceName, m_objectName,
  -                                                       methodSignature, args, m_referenceID, m_session );
  +            MethodRequest request = new MethodRequest(m_publishedServiceName, m_objectName,
  +                    methodSignature, args, m_referenceID, m_session);
               setContext(request);
  -            Reply reply = m_clientInvocationHandler.handleInvocation( request );
  +            Reply reply = m_clientInvocationHandler.handleInvocation(request);
   
  -            if( reply.getReplyCode() == ReplyConstants.METHODREPLY )
  -            {
  -                MethodReply or = (MethodReply)reply;
  +            if (reply.getReplyCode() == ReplyConstants.METHODREPLY) {
  +                MethodReply or = (MethodReply) reply;
   
                   return or.getReplyObject();
  -            }
  -            else
  -            {
  +            } else {
                   throw makeUnexpectedReplyThrowable(reply);
               }
  -        }
  -        catch (InvocationException ie)
  -        {
  +        } catch (InvocationException ie) {
               m_clientInvocationHandler.getClientMonitor().invocationFailure(this.getClass(), this.getClass().getName(), ie);
               throw ie;
           }
       }
   
  -    public void processVoidRequests(Vector requests) throws Throwable
  -    {
  -
  -        try
  -        {
  -            RawRequest[] rawRequests = new RawRequest[requests.size()];
  -            requests.copyInto(rawRequests);
  -            MethodAsyncRequest request = new MethodAsyncRequest( m_publishedServiceName, m_objectName,
  -                                                       rawRequests, m_referenceID, m_session );
  -
  -            //debug(args);
  -            setContext(request);
  -            Reply reply = m_clientInvocationHandler.handleInvocation( request );
  -
  -            if( reply.getReplyCode() == ReplyConstants.METHODREPLY )
  -            {
  -                MethodReply or = (MethodReply)reply;
  -                return;
  -            }
  -            else
  -            {
  -                throw makeUnexpectedReplyThrowable(reply);
  -            }
  -        }
  -        catch (InvocationException ie)
  -        {
  -            m_clientInvocationHandler.getClientMonitor().invocationFailure(this.getClass(), this.getClass().getName(), ie);
  -            throw ie;
  -        }
  -    }
   
       /**
        * Method processVoidRequest
  @@ -368,36 +305,75 @@
        * @throws Throwable
        *
        */
  -    public void processVoidRequest( String methodSignature, Object[] args ) throws Throwable
  -    {
  +    public void processVoidRequest(String methodSignature, Object[] args, Class[] argClasses) throws Throwable {
   
  -        try
  -        {
  -            MethodRequest request = new MethodRequest( m_publishedServiceName, m_objectName,
  -                                                       methodSignature, args, m_referenceID, m_session );
  +        try {
  +            m_altrmiFactory.marshallCorrection(methodSignature, args, argClasses);
  +
  +            MethodRequest request = new MethodRequest(m_publishedServiceName, m_objectName,
  +                    methodSignature, args, m_referenceID, m_session);
   
               //debug(args);
               setContext(request);
  -            Reply reply = m_clientInvocationHandler.handleInvocation( request );
  +            Reply reply = m_clientInvocationHandler.handleInvocation(request);
   
  -            if( reply.getReplyCode() == ReplyConstants.METHODREPLY )
  -            {
  -                MethodReply or = (MethodReply)reply;
  +            if (reply.getReplyCode() == ReplyConstants.METHODREPLY) {
  +                MethodReply or = (MethodReply) reply;
   
                   return;
  -            }
  -            else
  -            {
  +            } else {
                   throw makeUnexpectedReplyThrowable(reply);
               }
  -        }
  -        catch (InvocationException ie)
  -        {
  +        } catch (InvocationException ie) {
               m_clientInvocationHandler.getClientMonitor().invocationFailure(this.getClass(), this.getClass().getName(), ie);
               throw ie;
           }
       }
   
  +    public void queueAsyncRequest(String methodSignature, Object[] args, Class[] argClasses) {
  +
  +        synchronized (queuedAsyncRequests) {
  +
  +            GroupedMethodRequest request = new GroupedMethodRequest(methodSignature, args);
  +            queuedAsyncRequests.add(request);
  +        }
  +
  +    }
  +
  +    public void commitAsyncRequests() throws Throwable {
  +
  +        synchronized (queuedAsyncRequests) {
  +
  +            try {
  +                GroupedMethodRequest[] rawRequests = new GroupedMethodRequest[queuedAsyncRequests.size()];
  +                queuedAsyncRequests.toArray(rawRequests);
  +                MethodAsyncRequest request = new MethodAsyncRequest(m_publishedServiceName, m_objectName,
  +                        rawRequests, m_referenceID, m_session);
  +
  +                //debug(args);
  +                setContext(request);
  +                Reply reply = m_clientInvocationHandler.handleInvocation(request);
  +
  +                if (reply.getReplyCode() == ReplyConstants.METHODREPLY) {
  +                    MethodReply or = (MethodReply) reply;
  +                    return;
  +                } else {
  +                    throw makeUnexpectedReplyThrowable(reply);
  +                }
  +            } catch (InvocationException ie) {
  +                m_clientInvocationHandler.getClientMonitor().invocationFailure(this.getClass(), this.getClass().getName(), ie);
  +                throw ie;
  +            }
  +        }
  +    }
  +
  +    public void rollbackAsyncRequests() {
  +        synchronized (queuedAsyncRequests) {
  +            queuedAsyncRequests.clear();
  +        }
  +    }
  +
  +
       /**
        * Method processVoidRequestWithRedirect
        *
  @@ -408,26 +384,21 @@
        * @throws Throwable
        *
        */
  -    public void processVoidRequestWithRedirect( String methodSignature, Object[] args )
  -        throws Throwable
  -    {
  -
  -        Object[] newArgs = new Object[ args.length ];
  -
  -        for( int i = 0; i < args.length; i++ )
  -        {
  -            if( args[ i ] instanceof Proxy )
  -            {
  +    public void processVoidRequestWithRedirect(String methodSignature, Object[] args, Class[] argClasses)
  +            throws Throwable {
  +
  +        Object[] newArgs = new Object[args.length];
  +
  +        for (int i = 0; i < args.length; i++) {
  +            if (args[i] instanceof Proxy) {
   
                   //TODO somehow get the reference details and put a redirect place holder here
  -            }
  -            else
  -            {
  -                newArgs[ i ] = args[ i ];
  +            } else {
  +                newArgs[i] = args[i];
               }
           }
   
  -        processVoidRequest( methodSignature, newArgs );
  +        processVoidRequest(methodSignature, newArgs, argClasses);
       }
   
   
  @@ -438,31 +409,23 @@
        */
       private Throwable makeUnexpectedReplyThrowable(Reply reply) {
   
  -        if( reply.getReplyCode() == ReplyConstants.EXCEPTIONREPLY )
  -        {
  -            ExceptionReply er = (ExceptionReply)reply;
  +        if (reply.getReplyCode() == ReplyConstants.EXCEPTIONREPLY) {
  +            ExceptionReply er = (ExceptionReply) reply;
               return er.getReplyException();
  -        }
  -        else if( reply.getReplyCode() == ReplyConstants.NOSUCHSESSIONREPLY )
  -        {
  -            NoSuchSessionReply nssr = (NoSuchSessionReply)reply;
  +        } else if (reply.getReplyCode() == ReplyConstants.NOSUCHSESSIONREPLY) {
  +            NoSuchSessionReply nssr = (NoSuchSessionReply) reply;
               return new NoSuchSessionException(nssr.getSessionID());
           }
           //TODO remove some of these if clover indicates they are not used?
  -        else if( reply.getReplyCode() == ReplyConstants.NOSUCHREFERENCEREPLY )
  -        {
  -            NoSuchReferenceReply nsrr = (NoSuchReferenceReply)reply;
  +        else if (reply.getReplyCode() == ReplyConstants.NOSUCHREFERENCEREPLY) {
  +            NoSuchReferenceReply nsrr = (NoSuchReferenceReply) reply;
               return new NoSuchReferenceException(nsrr.getReferenceID());
  -        }
  -        else if( reply.getReplyCode() == ReplyConstants.INVOCATIONEXCEPTIONREPLY )
  -        {
  +        } else if (reply.getReplyCode() == ReplyConstants.INVOCATIONEXCEPTIONREPLY) {
               InvocationExceptionReply ier = (InvocationExceptionReply) reply;
               return new InvocationException(ier.getMessage());
  -        }
  -        else
  -        {
  -            return new InvocationException( "Internal Error : Unknown reply type :"
  -                                                 + reply.getClass().getName() );
  +        } else {
  +            return new InvocationException("Internal Error : Unknown reply type :"
  +                    + reply.getClass().getName());
           }
       }
   
  @@ -475,53 +438,46 @@
        * @return
        *
        */
  -    public Long getReferenceID( Object factory )
  -    {
  +    public Long getReferenceID(Object factory) {
   
           // this checks the factory because reference IDs should not be
           // given out to any requester.  It should be privileged information.
  -        if( factory == m_altrmiFactory )
  -        {
  +        if (factory == m_altrmiFactory) {
               return m_referenceID;
  -        }
  -        else
  -        {
  +        } else {
               return null;
           }
       }
   
  -    public boolean isEquals(Object o1, Object o2)
  -    {
  +    public boolean isEquals(Object o1, Object o2) {
           if (o2 == null) return false;
           if (o1 == o2) return true;
           if (o1.getClass() != o2.getClass()) return false;
           try {
  -          Object retVal = processObjectRequest("equals(java.lang.Object)", new Object[] {o2}, new Class[] {Object.class});
  -          return ((Boolean) retVal).booleanValue();
  +            Object retVal = processObjectRequest("equals(java.lang.Object)", new Object[]{o2}, new Class[]{Object.class});
  +            return ((Boolean) retVal).booleanValue();
           } 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.altrmi.client.InvocationException("Should never get here: " +t.getMessage());
  -          }
  +            if (t instanceof RuntimeException) {
  +                throw (RuntimeException) t;
  +            } else if (t instanceof Error) {
  +                throw (Error) t;
  +            } else {
  +                t.printStackTrace();
  +                throw new org.apache.altrmi.client.InvocationException("Should never get here: " + t.getMessage());
  +            }
           }
   
   
       }
   
  -    protected void finalize() throws Throwable
  -    {
  +    protected void finalize() throws Throwable {
   
  -        synchronized( m_altrmiFactory )
  -        {
  +        synchronized (m_altrmiFactory) {
               Reply reply =
  -                m_clientInvocationHandler
  -                .handleInvocation( new GarbageCollectionRequest( m_publishedServiceName,
  -                                                                 m_objectName, m_session,
  -                                                                 m_referenceID ) );
  +                    m_clientInvocationHandler
  +                    .handleInvocation(new GarbageCollectionRequest(m_publishedServiceName,
  +                            m_objectName, m_session,
  +                            m_referenceID));
               if (reply instanceof ExceptionReply) {
                   // This happens if the object can not be GCed on the remote server
                   //  for any reason.
  
  
  
  1.4       +8 -8      incubator-altrmi/src/java/org/apache/altrmi/common/MethodAsyncRequest.java
  
  Index: MethodAsyncRequest.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/common/MethodAsyncRequest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MethodAsyncRequest.java	5 May 2003 21:11:19 -0000	1.3
  +++ MethodAsyncRequest.java	18 May 2003 23:10:29 -0000	1.4
  @@ -69,7 +69,7 @@
   {
       static final long serialVersionUID = -5928783250529633953L;
   
  -    private RawRequest[] m_rawRequests;
  +    private GroupedMethodRequest[] m_groupedRequests;
       private Long m_referenceID;
       private Long m_session;
   
  @@ -85,12 +85,12 @@
        *
        */
       public MethodAsyncRequest( String publishedServiceName, String objectName,
  -                          RawRequest[] rawRequests, Long referenceID, Long session )
  +                          GroupedMethodRequest[] rawRequests, Long referenceID, Long session )
       {
   
           super( publishedServiceName, objectName );
   
  -        m_rawRequests = rawRequests;
  +        m_groupedRequests = rawRequests;
           m_referenceID = referenceID;
           m_session = session;
       }
  @@ -105,9 +105,9 @@
       }
   
   
  -    public RawRequest[] getRawRequests()
  +    public GroupedMethodRequest[] getGroupedRequests()
       {
  -        return m_rawRequests;
  +        return m_groupedRequests;
       }
   
       /**
  @@ -166,7 +166,7 @@
       {
   
           super.writeExternal( out );
  -        out.writeObject( m_rawRequests );
  +        out.writeObject( m_groupedRequests );
           out.writeObject( m_referenceID );
           out.writeObject( m_session );
       }
  @@ -188,7 +188,7 @@
   
           super.readExternal( in );
   
  -        m_rawRequests = (RawRequest[])in.readObject();
  +        m_groupedRequests = (GroupedMethodRequest[])in.readObject();
           m_referenceID = (Long)in.readObject();
           m_session = (Long)in.readObject();
       }
  
  
  
  1.4       +2 -1      incubator-altrmi/src/java/org/apache/altrmi/common/SerializationHelper.java
  
  Index: SerializationHelper.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/common/SerializationHelper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SerializationHelper.java	17 Feb 2003 20:28:36 -0000	1.3
  +++ SerializationHelper.java	18 May 2003 23:10:29 -0000	1.4
  @@ -100,6 +100,7 @@
           }
           catch (IOException e)
           {
  +            e.printStackTrace();
               throw new AltrmiRuntimeException("Really out of the ordinary IOException",e);
           }
   
  
  
  
  1.1                  incubator-altrmi/src/java/org/apache/altrmi/common/GroupedMethodRequest.java
  
  Index: GroupedMethodRequest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1997-2003 The Apache Software Foundation. All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *    "This product includes software developed by the
   *    Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software
   *    itself, if and wherever such third-party acknowledgments
   *    normally appear.
   *
   * 4. The names "Incubator", "AltRMI", and "Apache Software Foundation"
   *    must not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation. For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.altrmi.common;
  
  import java.io.IOException;
  import java.io.ObjectInput;
  import java.io.ObjectOutput;
  
  /**
   * Class GroupedMethodRequest
   *
   *
   * @author Paul Hammant
   * @version $Revision: 1.1 $
   */
  public class GroupedMethodRequest extends Request
  {
  
      static final long serialVersionUID = 2433454402872395509L;
  
      private String m_methodSignature;
      private Object[] m_args;
  
      public GroupedMethodRequest()
      {
      }
  
      public GroupedMethodRequest(String methodSignature, Object[] args)
      {
          m_methodSignature = methodSignature;
          m_args = args;
      }
  
      public String getMethodSignature()
      {
          return m_methodSignature;
      }
  
      public Object[] getArgs()
      {
          return m_args;
      }
  
      public int getRequestCode()
      {
          return RequestConstants.METHODASYNCREQUEST;
      }
  
      public void writeExternal( ObjectOutput out ) throws IOException
      {
          super.writeExternal( out );
          out.writeObject( m_methodSignature );
          out.writeObject( m_args );
      }
  
      public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
      {
          super.readExternal( in );
          m_methodSignature = (String)in.readObject();
          m_args = (Object[]) in.readObject();
      }
  
  }
  
  
  
  1.5       +23 -32    incubator-altrmi/src/java/org/apache/altrmi/generator/ProxyGeneratorImpl.java
  
  Index: ProxyGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/generator/ProxyGeneratorImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ProxyGeneratorImpl.java	22 Feb 2003 14:53:52 -0000	1.4
  +++ ProxyGeneratorImpl.java	18 May 2003 23:10:29 -0000	1.5
  @@ -197,12 +197,6 @@
           classSource.println(
               "  private transient org.apache.altrmi.client.ProxyHelper m_proxyHelper;" );
   
  -        if (needsAsyncBehavior(interfacesToExpose))
  -        {
  -            classSource.println(
  -                "  private transient java.util.Vector m_asyncInvocations = new java.util.Vector();" );
  -
  -        }
   
           // Generate Constructor
           classSource.println(
  @@ -330,22 +324,17 @@
           classSource.println( "{" );
           if (async)
           {
  -            classSource.println( "    synchronized(m_asyncInvocations) {" );
               generateAsyncMethodBody(classSource, argTypes, rClass, methodSignature, method);
  -            classSource.println( "    }" );
           }
           else if (commit)
           {
  -            classSource.println( "    synchronized(m_asyncInvocations) {" );
               generateAsyncMethodBody(classSource, argTypes, rClass, methodSignature, method);
               generateAsyncCommitMethodBody(classSource);
  -            classSource.println( "    }" );
           }
           else if (rollback)
           {
  -            classSource.println( "    synchronized(m_asyncInvocations) {" );
  -            generateAsyncRollbackMethodBody(classSource, argTypes, methodSignature);
  -            classSource.println( "    }" );
  +            generateAsyncRollbackMethodBody(classSource);
  +            generateNonAsyncMethodBody(classSource, argTypes, rClass, methodSignature, method);
           }
           else
           {
  @@ -357,17 +346,30 @@
                   "}" );
       }
   
  -    private void generateNonAsyncMethodBody(PrintWriter classSource, Class[] argTypes, Class rClass, String methodSignature, Method method)
  +    private void generateNonAsyncMethodBody(PrintWriter classSource, Class[] argTypes, Class rClass, String methodSignature, Method method) {
  +
  +        generateMethodBody(classSource, argTypes, rClass, methodSignature, method, "processVoidRequest");
  +
  +    }
  +
  +    private void generateAsyncMethodBody(PrintWriter classSource, Class[] argTypes, Class rClass, String methodSignature, Method method) {
  +
  +        generateMethodBody(classSource, argTypes, rClass, methodSignature, method, "queueAsyncRequest");
  +
  +    }
  +
  +    private void generateMethodBody(PrintWriter classSource, Class[] argTypes,
  +                                    Class rClass, String methodSignature, Method method, String proxyMethodName)
       {
           Class[] throwsTypes;
           generateMethodArgs(classSource, argTypes);
   
           classSource.println( "    try {" );
   
  -        if( rClass.equals( "void" ) )
  +        if( rClass.toString().equals( "void" ) )
           {
  -            classSource.println( "      m_proxyHelper.processVoidRequest(\""
  -                                  + methodSignature + "\",args);" );
  +            classSource.println( "      m_proxyHelper." + proxyMethodName + "(\""
  +                                  + methodSignature + "\",args,argClasses);" );
           }
           else
           {
  @@ -410,18 +412,12 @@
           }
       }
   
  -    private void generateAsyncMethodBody(PrintWriter classSource,Class[] argTypes, Class rClass, String methodSignature, Method method)
  -    {
  -        generateMethodArgs(classSource, argTypes);
  -        classSource.println( "    m_asyncInvocations.add(new org.apache.altrmi.common.RawRequest(\""
  -                + methodSignature + "\", args));" );
  -    }
   
       private void generateAsyncCommitMethodBody(PrintWriter classSource)
       {
           classSource.println( "    try {" );
   
  -        classSource.println( "      m_proxyHelper.processVoidRequests(m_asyncInvocations);" );
  +        classSource.println( "      m_proxyHelper.commitAsyncRequests();" );
           classSource.println( "    } catch (Throwable t) {" );
           classSource.println( "      if (t instanceof RuntimeException) { " );
           classSource.println( "        throw (RuntimeException) t;" );
  @@ -433,22 +429,17 @@
               "        throw new org.apache.altrmi.client."
               + "InvocationException(\"Should never get here: \" +t.getMessage());");
           classSource.println( "      }" );
  -        classSource.println( "    } finally { " );
  -        classSource.println( "      m_asyncInvocations.removeAllElements();");
           classSource.println( "    }" );
   
       }
   
  -    private void generateAsyncRollbackMethodBody(PrintWriter classSource, Class[] argTypes, String methodSignature)
  +    private void generateAsyncRollbackMethodBody(PrintWriter classSource)
       {
           Vector v = new Vector();
           v.removeAllElements();
  -        generateMethodArgs(classSource, argTypes);
   
           classSource.println( "    try {" );
  -        classSource.println( "      m_asyncInvocations.removeAllElements();");
  -        classSource.println( "      m_proxyHelper.processVoidRequest(\""
  -                              + methodSignature + "\",args);" );
  +        classSource.println( "      m_proxyHelper.rollbackAsyncRequests();" );
           classSource.println( "    } catch (Throwable t) {" );
           classSource.println( "      if (t instanceof RuntimeException) { " );
           classSource.println( "        throw (RuntimeException) t;" );
  
  
  
  1.6       +3 -3      incubator-altrmi/src/java/org/apache/altrmi/server/impl/adapters/InvocationHandlerAdapter.java
  
  Index: InvocationHandlerAdapter.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/src/java/org/apache/altrmi/server/impl/adapters/InvocationHandlerAdapter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InvocationHandlerAdapter.java	5 May 2003 21:11:20 -0000	1.5
  +++ InvocationHandlerAdapter.java	18 May 2003 23:10:29 -0000	1.6
  @@ -448,10 +448,10 @@
           MethodInvocationHandler methodInvocationHandler =
               getMethodInvocationHandler( publishedThing );
   
  -        RawRequest[] requests = methodRequest.getRawRequests();
  +        GroupedMethodRequest[] requests = methodRequest.getGroupedRequests();
           for (int i = 0; i < requests.length; i++)
           {
  -            RawRequest rawRequest = requests[i];
  +            GroupedMethodRequest rawRequest = requests[i];
               methodInvocationHandler.handleMethodInvocation(
                       new MethodRequest(
                               methodRequest.getPublishedServiceName(),
  
  
  
  1.1                  incubator-altrmi/src/test/org/apache/altrmi/test/async/AbstractSimpleAsyncTestCase.java
  
  Index: AbstractSimpleAsyncTestCase.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1997-2003 The Apache Software Foundation. All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *    "This product includes software developed by the
   *    Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software
   *    itself, if and wherever such third-party acknowledgments
   *    normally appear.
   *
   * 4. The names "Incubator", "AltRMI", and "Apache Software Foundation"
   *    must not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation. For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.altrmi.test.async;
  
  import org.apache.altrmi.server.impl.socket.CompleteSocketCustomStreamServer;
  import org.apache.altrmi.server.impl.classretrievers.JavacDynamicGeneratorClassRetriever;
  import org.apache.altrmi.server.impl.classretrievers.AbstractDynamicGeneratorClassRetriever;
  import org.apache.altrmi.server.PublicationDescription;
  import org.apache.altrmi.server.PublicationDescriptionItem;
  import org.apache.altrmi.client.impl.ServerSideClassFactory;
  import org.apache.altrmi.client.impl.socket.SocketCustomStreamHostContext;
  import org.apache.altrmi.client.Factory;
  import junit.framework.TestCase;
  
  import java.io.File;
  
  public abstract class  AbstractSimpleAsyncTestCase extends TestCase
  {
  
      AsyncTestImpl asyncTestImpl;
      AsyncTest testClient;
      Factory altrmiFactory;
      CompleteSocketCustomStreamServer server;
  
      public AbstractSimpleAsyncTestCase(String name)
      {
          super(name);
      }
  
      protected abstract AbstractDynamicGeneratorClassRetriever getAbstractDynamicGeneratorClassRetriever(ClassLoader cl);
  
      protected void setUp() throws Exception
      {
          super.setUp();
  
          // server side setup.
          server = new CompleteSocketCustomStreamServer(11003);
  //        JavacDynamicGeneratorClassRetriever cr = new JavacDynamicGeneratorClassRetriever(
  //                this.getClass().getClassLoader());
          AbstractDynamicGeneratorClassRetriever cr = getAbstractDynamicGeneratorClassRetriever(
                  this.getClass().getClassLoader());
          cr.setClassGenDir(".");
          cr.setClasspath("..\\build\\classes;%JAVA_HOME%\\lib\\tools.jar");
          cr.setSrcGenDir(".");
          server.setClassRetriever(cr);
          asyncTestImpl = new AsyncTestImpl();
          PublicationDescription pd = new PublicationDescription();
          pd.addInterfaceToExpose(
                  new PublicationDescriptionItem(AsyncTest.class,
                      new String[]{"setOne(java.lang.String)",
                                   "setTwo(java.lang.String)",
                                   "setThree(java.lang.String)",
                      },
                      new String[] {"fire()"},
                      new String[] {"whoa()"}
                  )
          );
          cr.generate("AsyncTest",pd, this.getClass().getClassLoader());
          server.publish(asyncTestImpl, "AsyncTest", pd);
          server.start();
  
          // Client side setup
          altrmiFactory = new ServerSideClassFactory();
          altrmiFactory.setHostContext(
                  new SocketCustomStreamHostContext("127.0.0.1", 11003), false);
          testClient = (AsyncTest) altrmiFactory.lookup("AsyncTest");
  
          // just a kludge for unit testing given we are intrinsically dealing with
          // threads, AltRMI being a client/server thing
          Thread.yield();
      }
  
      public void testSimpleAsync() throws Exception
      {
  
          testClient.setOne("one");
          testClient.setTwo("two");
          testClient.setThree("three");
  
          assertNull("Field 'One' should be null", asyncTestImpl.one);
          assertNull("Field 'Two' should be null", asyncTestImpl.two);
          assertNull("Field 'Tree' should be null", asyncTestImpl.three);
          assertFalse("Field 'Fire' should be false", asyncTestImpl.fired);
  
          testClient.fire();
  
          assertNotNull("Field 'One' should not be null", asyncTestImpl.one);
          assertNotNull("Field 'Two' should not be null", asyncTestImpl.two);
          assertNotNull("Field 'Tree' should not be null", asyncTestImpl.three);
          assertTrue("Field 'Fire' should not be false", asyncTestImpl.fired);
  
      }
  
      public void testRollback() throws Exception
      {
  
          testClient.setOne("111");
  
          assertNull("Field 'One' should be null #1", asyncTestImpl.one);
  
          testClient.whoa();
          testClient.fire();
  
          assertNull("Field 'One' should be null #2", asyncTestImpl.one);
          assertTrue("Field 'Whoa' should not be false", asyncTestImpl.whoa);
          assertTrue("Field 'Fire' should not be false", asyncTestImpl.fired);
  
          testClient.setOne("222");
          testClient.fire();
  
          assertNotNull("Field 'One' should not be null", asyncTestImpl.one);
  
      }
  
  
      protected void tearDown() throws Exception
      {
          testClient = null;
          System.gc();
          Thread.yield();
          altrmiFactory.close();
          Thread.yield();
          server.stop();
          Thread.yield();
          server = null;
          asyncTestImpl = null;
          super.tearDown();
      }
  
  
  
  }
  
  
  
  1.1                  incubator-altrmi/src/test/org/apache/altrmi/test/async/BcelSimpleAsyncTestCase.java
  
  Index: BcelSimpleAsyncTestCase.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1997-2003 The Apache Software Foundation. All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *    "This product includes software developed by the
   *    Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software
   *    itself, if and wherever such third-party acknowledgments
   *    normally appear.
   *
   * 4. The names "Incubator", "AltRMI", and "Apache Software Foundation"
   *    must not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation. For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.altrmi.test.async;
  
  import org.apache.altrmi.server.impl.classretrievers.AbstractDynamicGeneratorClassRetriever;
  import org.apache.altrmi.server.impl.classretrievers.BcelDynamicGeneratorClassRetriever;
  
  
  public class BcelSimpleAsyncTestCase extends AbstractSimpleAsyncTestCase {
  
      public BcelSimpleAsyncTestCase(String name) {
          super(name);
      }
  
      protected AbstractDynamicGeneratorClassRetriever getAbstractDynamicGeneratorClassRetriever(ClassLoader cl) {
          return new BcelDynamicGeneratorClassRetriever(cl);
  
      }
  
      public static void main(String[] args) throws Exception
      {
          AbstractSimpleAsyncTestCase simp = new BcelSimpleAsyncTestCase("testSimpleAsync");
          simp.setUp();
          simp.testSimpleAsync();
          simp.tearDown();
      }
  
  }
  
  
  
  1.1                  incubator-altrmi/src/test/org/apache/altrmi/test/async/JavacSimpleAsyncTestCase.java
  
  Index: JavacSimpleAsyncTestCase.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1997-2003 The Apache Software Foundation. All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *    "This product includes software developed by the
   *    Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software
   *    itself, if and wherever such third-party acknowledgments
   *    normally appear.
   *
   * 4. The names "Incubator", "AltRMI", and "Apache Software Foundation"
   *    must not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation. For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.altrmi.test.async;
  
  import org.apache.altrmi.server.impl.classretrievers.AbstractDynamicGeneratorClassRetriever;
  import org.apache.altrmi.server.impl.classretrievers.JavacDynamicGeneratorClassRetriever;
  
  
  public class JavacSimpleAsyncTestCase extends AbstractSimpleAsyncTestCase {
  
      public JavacSimpleAsyncTestCase(String name) {
          super(name);
      }
  
      protected AbstractDynamicGeneratorClassRetriever getAbstractDynamicGeneratorClassRetriever(ClassLoader cl) {
          return new JavacDynamicGeneratorClassRetriever(cl);
  
      }
  
      public static void main(String[] args) throws Exception
      {
          AbstractSimpleAsyncTestCase simp = new JavacSimpleAsyncTestCase("testSimpleAsync");
          simp.setUp();
          simp.testSimpleAsync();
          simp.tearDown();
      }
  
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message