commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/test PipeTest.java
Date Wed, 30 Jan 2002 23:42:45 GMT
hammant     02/01/30 15:42:45

  Modified:    altrmi   build.xml
               altrmi/src/java/org/apache/commons/altrmi/client/impl
                        AbstractAltrmiFactory.java
                        AbstractClientInvocationHandler.java
                        ClientClassAltrmiFactory.java
                        ServerClassAltrmiFactory.java
               altrmi/src/java/org/apache/commons/altrmi/generator/ant
                        AltrmiInterfaceTask.java
               altrmi/src/java/org/apache/commons/altrmi/server
                        AltrmiProxyGenerator.java
               altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers
                        AbstractClassRetriever.java
                        DynamicGeneratorClassRetriever.java
               altrmi/src/java/org/apache/commons/altrmi/test PipeTest.java
  Added:       altrmi/src/java/org/apache/commons/altrmi/common
                        ProxyGenerationException.java ProxyGenerator.java
               altrmi/src/java/org/apache/commons/altrmi/generator
                        ProxyGeneratorImpl.java
  Removed:     altrmi/src/java/org/apache/commons/altrmi/generator
                        PrimarySourceGenerator.java
                        SourceGenerationException.java
  Log:
  Work on ClassRetrival, classloader-aware proxy generation for EOB
  
  Revision  Changes    Path
  1.6       +3 -3      jakarta-commons-sandbox/altrmi/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/build.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.xml	27 Jan 2002 15:47:40 -0000	1.5
  +++ build.xml	30 Jan 2002 23:42:44 -0000	1.6
  @@ -3,7 +3,7 @@
   
   <!--
           "Alternative (to) RMI" component of the Jakarta Commons Subproject
  -        $Id: build.xml,v 1.5 2002/01/27 15:47:40 hammant Exp $
  +        $Id: build.xml,v 1.6 2002/01/30 23:42:44 hammant Exp $
   -->
   
   
  @@ -218,9 +218,9 @@
               basedir="${build.home}/classes"
              manifest="src/conf/MANIFEST-generator.MF">
         <include name="org/apache/commons/altrmi/generator/**"/>
  -      <include name="org/apache/commons/altrmi/javacompiler/**"/>
  +      <include name="org/apache/commons/altrmi/javacompiler/**"/>      
       </jar> 
  -               
  +                      
     </target>
   
   </project>
  
  
  
  1.11      +4 -2      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/AbstractAltrmiFactory.java
  
  Index: AbstractAltrmiFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/AbstractAltrmiFactory.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractAltrmiFactory.java	29 Jan 2002 10:15:56 -0000	1.10
  +++ AbstractAltrmiFactory.java	30 Jan 2002 23:42:44 -0000	1.11
  @@ -31,7 +31,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.10 $
  + * @version $Revision: 1.11 $
    */
   public abstract class AbstractAltrmiFactory implements AltrmiFactory {
   
  @@ -41,6 +41,7 @@
       private final boolean mBeanOnly;
       private transient String mTextToSign;
       protected Long mSession;
  +    protected ClassLoader mClassLoader;
   
       /**
        * Constructor AbstractAltrmiFactory
  @@ -49,8 +50,9 @@
        * @param beanOnly
        *
        */
  -    public AbstractAltrmiFactory(boolean beanOnly) {
  +    public AbstractAltrmiFactory(boolean beanOnly, ClassLoader classLoader) {
           mBeanOnly = beanOnly;
  +        mClassLoader = classLoader;
       }
   
       /**
  
  
  
  1.3       +1 -2      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/AbstractClientInvocationHandler.java
  
  Index: AbstractClientInvocationHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/AbstractClientInvocationHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractClientInvocationHandler.java	21 Jan 2002 20:10:34 -0000	1.2
  +++ AbstractClientInvocationHandler.java	30 Jan 2002 23:42:44 -0000	1.3
  @@ -26,7 +26,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public abstract class AbstractClientInvocationHandler implements AltrmiInvocationHandler, AltrmiClientInvocationHandler {
   
  @@ -47,7 +47,6 @@
       }
   
       public void initialize() throws IOException {
  -        System.out.println(" initializing ");
   
           if (mConnectionPinger == null) {
               mConnectionPinger = new DefaultConnectionPinger();
  
  
  
  1.8       +8 -3      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/ClientClassAltrmiFactory.java
  
  Index: ClientClassAltrmiFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/ClientClassAltrmiFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ClientClassAltrmiFactory.java	21 Jan 2002 20:10:34 -0000	1.7
  +++ ClientClassAltrmiFactory.java	30 Jan 2002 23:42:44 -0000	1.8
  @@ -29,7 +29,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public class ClientClassAltrmiFactory extends AbstractAltrmiFactory {
   
  @@ -41,7 +41,11 @@
        *
        */
       public ClientClassAltrmiFactory(boolean beanOnly) {
  -        super(beanOnly);
  +        super(beanOnly, ClientClassAltrmiFactory.class.getClassLoader());
  +    }
  +
  +    public ClientClassAltrmiFactory(boolean beanOnly, ClassLoader classLoader) {
  +        super(beanOnly, classLoader);
       }
   
       /**
  @@ -101,7 +105,8 @@
        *
        */
       protected Object getInstance(
  -            String publishedServiceName, String objectName, BaseServedObject baseServedObject, boolean beanOnly)
  +            String publishedServiceName, String objectName, BaseServedObject baseServedObject,
  +            boolean beanOnly)
                   throws AltrmiConnectionException {
   
           String code = "2";
  
  
  
  1.9       +17 -5     jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/ServerClassAltrmiFactory.java
  
  Index: ServerClassAltrmiFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/client/impl/ServerClassAltrmiFactory.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ServerClassAltrmiFactory.java	28 Jan 2002 10:27:06 -0000	1.8
  +++ ServerClassAltrmiFactory.java	30 Jan 2002 23:42:44 -0000	1.9
  @@ -36,7 +36,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public class ServerClassAltrmiFactory extends AbstractAltrmiFactory {
   
  @@ -50,7 +50,12 @@
        *
        */
       public ServerClassAltrmiFactory(boolean beanOnly) {
  -        super(beanOnly);
  +        super(beanOnly, ServerClassAltrmiFactory.class.getClassLoader());
  +    }
  +
  +    public ServerClassAltrmiFactory(boolean beanOnly, ClassLoader classLoader) {
  +        super(beanOnly, classLoader);
  +        System.out.println("NEWWWWW SCAF " + classLoader);
       }
   
       /**
  @@ -110,7 +115,8 @@
        *
        */
       protected Object getInstance(
  -            String publishedServiceName, String objectName, BaseServedObject baseServedObject, boolean beanOnly)
  +            String publishedServiceName, String objectName,
  +            BaseServedObject baseServedObject, boolean beanOnly)
                   throws AltrmiConnectionException {
   
           String code = "2";
  @@ -151,12 +157,13 @@
                                                           + " not published on Server");
                   }
   
  -                tcl = new TransportedClassLoader(this.getClass().getClassLoader());
  +                tcl = new TransportedClassLoader(mClassLoader);
   
                   tcl.add(beanClassName, cr.getBeanClassBytes());
   
                   try {
  -                    tcl.add(iiClassName, cr.getInterfaceImplClassBytes());
  +                    byte[] bytes = cr.getInterfaceImplClassBytes();
  +                    tcl.add(iiClassName, bytes);
                   } catch (NoClassDefFoundError ncdfe) {
   
                       // do nothing.  It's a fundamental error to have no interfaces
  @@ -177,6 +184,11 @@
               throw new AltrmiConnectionException("Generated class not instantiated : "
                                                   + ite.getTargetException().getMessage());
           } catch (ClassNotFoundException cnfe) {
  +            System.out.println("---**");
  +            cnfe.printStackTrace();
  +            System.out.println("---**");
  +            cnfe.getException().printStackTrace();
  +            System.out.println("---**");
               throw new AltrmiConnectionException("Generated class not found during lookup : "
                                                   + cnfe.getMessage());
           } catch (InstantiationException ie) {
  
  
  
  1.1                  jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/common/ProxyGenerationException.java
  
  Index: ProxyGenerationException.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.commons.altrmi.common;
  
  public class ProxyGenerationException extends Exception {
      public ProxyGenerationException(String s) {
          super(s);
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/common/ProxyGenerator.java
  
  Index: ProxyGenerator.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.commons.altrmi.common;
  
  
  /**
   * Class ProxyGenerator
   *
   *
   * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
   * @version $Revision: 1.1 $
   */
  public interface ProxyGenerator {
  
      public void setClassOrInterfacesToExpose(Class[] classesOrInterfacesToExpose);
      public void setAdditionalfacades(Class[] additionalFacades);
      public void setSrcGenDir(String srcGenDir);
      public void setClasspath(String classpath);
      public void setClassGenDir(String classGenDir);
      public void setGenName(String genName);
      public void generateSrc(ClassLoader cL) throws ProxyGenerationException;
      public void generateClass(ClassLoader cL);
  }
  
  
  1.1                  jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ProxyGeneratorImpl.java
  
  Index: ProxyGeneratorImpl.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.commons.altrmi.generator;
  
  
  
  import org.apache.commons.altrmi.common.AbstractMethodHandler;
  import org.apache.commons.altrmi.test.TestInterface;
  import org.apache.commons.altrmi.javacompiler.JavaCompiler;
  import org.apache.commons.altrmi.common.ProxyGenerationException;
  import org.apache.commons.altrmi.common.ProxyGenerator;
  
  import java.lang.reflect.Method;
  
  import java.util.Vector;
  
  import java.io.PrintWriter;
  import java.io.FileOutputStream;
  import java.io.FileNotFoundException;
  import java.io.Serializable;
  import java.io.File;
  
  
  /**
   * Class ProxyGeneratorImpl
   *
   *
   * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
   * @version $Revision: 1.1 $
   */
  public class ProxyGeneratorImpl extends AbstractMethodHandler implements ProxyGenerator {
  
      private Class[] mClassesOrInterfacesToExpose;
      private Class[] mAdditionalFacades;
      protected String mSrcGenDir;
      protected String mClassGenDir;
      protected String mClasspath;
      private String mGenName;
      private PrintWriter mClassSource;
  
      /**
       * Method setClassOrInterfacesToExpose
       *
       *
       * @param classesOrInterfacesToExpose
       *
       */
      public void setClassOrInterfacesToExpose(Class[] classesOrInterfacesToExpose) {
          mClassesOrInterfacesToExpose = classesOrInterfacesToExpose;
      }
  
      /**
       * Method setClassOrInterfacesToExpose
       *
       *
       *
       * @param additionalFacades
       *
       */
      public void setAdditionalfacades(Class[] additionalFacades) {
          mAdditionalFacades = additionalFacades;
      }
  
      public void setSrcGenDir(String srcGenDir) {
          mSrcGenDir = srcGenDir;
      }
  
      public void setClasspath(String classpath) {
          mClasspath = classpath;
      }
  
      public void setClassGenDir(String classGenDir) {
          mClassGenDir = classGenDir;
      }
  
      /**
       * Method setGenName
       *
       *
       * @param genName
       *
       */
      public void setGenName(String genName) {
          this.mGenName = genName;
      }
  
      /**
       * Method generate
       *
       *
       * @param cL
       *
       */
      public void generateSrc(ClassLoader cL) throws ProxyGenerationException {
  
          // The lookupable service class source.
          makeSource(cL, "Main", mClassesOrInterfacesToExpose);
          makeSource2(cL, "Main", mClassesOrInterfacesToExpose);
  
          if (mAdditionalFacades != null) {
              for (int i = 0; i < mAdditionalFacades.length; i++) {
                  Class facade = mAdditionalFacades[i];
  
                  makeSource(cL, encodeClassName(facade), new Class[]{ facade });
                  makeSource2(cL, encodeClassName(facade), new Class[]{ facade });
              }
          }
      }
  
      public void generateClass(ClassLoader cL) {
          JavaCompiler jc = JavaCompiler.getDefaultCompiler();
          jc.setOutputDir(mClassGenDir);
          //jc.setCompilerPath();
          jc.addClassPath(mClassGenDir);
          jc.addClassPath(mClasspath);
          jc.addDefaultClassPath();
          jc.doCompile(mSrcGenDir + File.separator + "AltrmiGenerated" + mGenName + "_Main.java");
          jc.doCompile(mSrcGenDir + File.separator + "AltrmiGenerated2" + mGenName + "_Main.java");
          System.out.println(jc.getCompilerMessage());
  
          if (mAdditionalFacades != null) {
              for (int i = 0; i < mAdditionalFacades.length; i++) {
                  String classname = encodeClassName(mAdditionalFacades[i]);
                  jc.doCompile(mSrcGenDir + File.separator + "AltrmiGenerated" + mGenName + "_" + classname + ".java");
                  jc.doCompile(mSrcGenDir + File.separator + "AltrmiGenerated2" + mGenName + "_" + classname + ".java");
              }
          }
  
      }
  
      /**
       * Method makeSource
       *
       *
       * @param cL
       * @param name
       * @param classOrInterfacesToExpose
       *
       * @throws ProxyGenerationException
       *
       */
      public void makeSource(ClassLoader cL, String name, Class[] classOrInterfacesToExpose)
              throws ProxyGenerationException {
  
          // methdos could be in more than one interface.
          Vector methodsDone = new Vector();
  
          String filename = mSrcGenDir + File.separator + "AltrmiGenerated" + mGenName + "_" + name + ".java";
          try {
              mClassSource = new PrintWriter(new FileOutputStream(filename));
          } catch (FileNotFoundException e) {
              throw new ProxyGenerationException("Cannot make source output file '" + filename + "'");
          }
  
          mClassSource.print("public class AltrmiGenerated" + mGenName + "_" + name);
          mClassSource.println(" { ");
          mClassSource.println(
              "  private transient org.apache.commons.altrmi.client.impl.BaseServedObject mBaseServedObject;");
          mClassSource.println(
              "  public AltrmiGenerated" + mGenName + "_" + name
              + " (org.apache.commons.altrmi.client.impl.BaseServedObject baseServedObject) {");
          mClassSource.println("      mBaseServedObject = baseServedObject;");
          mClassSource.println("  }");
  
          for (int x = 0; x < classOrInterfacesToExpose.length; x++) {
              Class clazz = classOrInterfacesToExpose[x];
  
              Method[] methods = clazz.getMethods();
  
              for (int y = 0; y < methods.length; y++) {
                  Method method = methods[y];
                  String methodSignature = getMethodSignature(method);
  
                  if (!methodsDone.contains(methodSignature)) {
                      methodsDone.add(methodSignature);
  
                      Class rClass = method.getReturnType();
  
                      if (!(method.getReturnType() instanceof Serializable)) {
                          throw new ProxyGenerationException("Return type " + rClass
                                                              + " must be serializable");
                      }
  
                      String mName = method.getName();
  
                      mClassSource.print("  public " + generateReturnValue(rClass) + " " + mName + " (");
  
                      Class[] argTypes = method.getParameterTypes();
  
                      for (int i = 0; i < argTypes.length; i++) {
                          String cn = argTypes[i].getName();
  
                          if (!(argTypes[i] instanceof Serializable)) {
                              throw new ProxyGenerationException("Argument type " + cn
                                                                  + " must be serializable");
                          }
  
                          generateParameter(cn, argTypes, i);
                      }
  
                      mClassSource.print(") ");
  
                      Class[] throwsTypes = method.getExceptionTypes();
  
                      for (int i = 0; i < throwsTypes.length; i++) {
                          generateThrows(i, throwsTypes);
                      }
  
                      mClassSource.println("{");
                      mClassSource.println("    Object[] args = new Object[" + argTypes.length
                                           + "];");
  
                      for (int i = 0; i < argTypes.length; i++) {
  
                          generateAssignLine(argTypes[i], i);
                      }
  
                      mClassSource.println("    try {");
  
                      if (rClass.equals("void")) {
                          mClassSource.println("      mBaseServedObject.altrmiProcessVoidRequest(\""
                                               + methodSignature.toString() + "\",args);");
                      } else {
                          boolean isFacadeRetVal =
                              isAdditionalFacade(method.getReturnType());
  
                          if (isFacadeRetVal) {
                              mClassSource.println(
                                  "      Object retVal = mBaseServedObject.altrmiProcessObjectRequestGettingFacade(\""
                                  + methodSignature.toString() + "\",args,\""
                                  + encodeClassName(rClass.getName()) + "\");");
                              mClassSource.println("      return (" + rClass.getName() + ") retVal;");
                          } else {
                              mClassSource.println(
                                  "      Object retVal = mBaseServedObject.altrmiProcessObjectRequest(\""
                                  + methodSignature.toString() + "\",args);");
                              generateReturnLine(rClass);
                          }
                      }
  
                      mClassSource.println("    } catch (Throwable t) {");
  
                      throwsTypes = method.getExceptionTypes();
  
                      for (int i = 0; i < throwsTypes.length; i++) {
                          generateThrowHandler(i, throwsTypes);
                      }
  
                      mClassSource.println("      if (t instanceof RuntimeException) { ");
                      mClassSource.println("        throw (RuntimeException) t;");
                      mClassSource.println("      } else if (t instanceof Error) { ");
                      mClassSource.println("        throw (Error) t;");
                      mClassSource.println("      } else { ");
                      mClassSource.println(
                          "        throw new org.apache.commons.altrmi.common.AltrmiInvocationException(\"Should never get here\" + t.getMessage()); ");
                      mClassSource.println("      }");
                      mClassSource.println("    }");
                      mClassSource.println("  }");
                  }
              }
          }
  
          mClassSource.print("}");
          mClassSource.close();
      }
  
      /**
       * Method makeSource2
       *
       *
       * @param cL
       * @param name
       * @param classOrInterfacesToExpose
       *
       * @throws ProxyGenerationException
       *
       */
      public void makeSource2(ClassLoader cL, String name, Class[] classOrInterfacesToExpose)
              throws ProxyGenerationException {
  
          String filename = mSrcGenDir + File.separator + "AltrmiGenerated2" + mGenName + "_" + name + ".java";
          try {
              PrintWriter class2Source = new PrintWriter(new FileOutputStream(filename));
  
              class2Source.print("public final class AltrmiGenerated2" + mGenName + "_" + name);
              class2Source.print(" extends AltrmiGenerated" + mGenName + "_" + name);
              class2Source.print(" implements ");
              generateInterfaceList(class2Source, classOrInterfacesToExpose);
              class2Source.println(" { ");
              class2Source.println(
                  "  public AltrmiGenerated2" + mGenName + "_" + name
                  + " (org.apache.commons.altrmi.client.impl.BaseServedObject baseServedObject) {");
              class2Source.println("      super(baseServedObject);");
              class2Source.println("  }");
              class2Source.println("}");
              class2Source.close();
          } catch (FileNotFoundException e) {
              throw new ProxyGenerationException("Cannot make source output file '" + filename + "'");
          }
      }
  
      private void generateThrowHandler(int i, Class[] throwsTypes) {
  
          if (i == 0) {
              mClassSource.println("      if (t instanceof " + throwsTypes[i].getName() + ") { ");
          } else {
              mClassSource.println("      } else if (t instanceof " + throwsTypes[i].getName()
                                   + ") { ");
          }
  
          mClassSource.println("        throw (" + throwsTypes[i].getName() + ") t;");
  
          if (i + 1 == throwsTypes.length) {
              mClassSource.print("      } else");
          }
      }
  
      private void generateThrows(int i, Class[] throwsTypes) {
  
          if (i == 0) {
              mClassSource.print("throws ");
          }
  
          mClassSource.print(throwsTypes[i].getName());
  
          if (i + 1 < throwsTypes.length) {
              mClassSource.print(", ");
          }
      }
  
      private void generateInterfaceList(PrintWriter pw, Class[] classOrInterfacesToExpose) {
  
          for (int x = 0; x < classOrInterfacesToExpose.length; x++) {
              pw.print(classOrInterfacesToExpose[x].getName());
  
              if (x + 1 < classOrInterfacesToExpose.length) {
                  pw.print(", ");
              }
          }
      }
  
      private void generateParameter(String cn, Class[] argTypes, int i) {
  
          if (cn.startsWith("L")) {
              mClassSource.print(argTypes[i].getName());
          } else if (cn.startsWith("[L")) {
              mClassSource.print(argTypes[i].getName() + "[]");
          } else if (cn.equals("[B")) {
              mClassSource.print("byte[]");
          } else if (cn.equals("[C")) {
              mClassSource.print("char[]");
          } else if (cn.equals("[D")) {
              mClassSource.print("double[]");
          } else if (cn.equals("[F")) {
              mClassSource.print("float[]");
          } else if (cn.equals("[I")) {
              mClassSource.print("int[]");
          } else if (cn.equals("[J")) {
              mClassSource.print("long[]");
          } else if (cn.equals("[S")) {
              mClassSource.print("short[]");
          } else if (cn.equals("[Z")) {
              mClassSource.print("boolean[]");
          } else {
              mClassSource.print(cn);
          }
  
          mClassSource.print(" v" + i);
  
          if (i + 1 < argTypes.length) {
              mClassSource.print(", ");
          }
      }
  
      private void generateAssignLine(Class clazz, int i) {
  
          String cn = clazz.getName();
  
          if (cn.equals("int")) {
              mClassSource.println("    args[" + i + "] = new Integer(v" + i + ");");
          } else if (cn.equals("short")) {
              mClassSource.println("    args[" + i + "] = new Short(v" + i + ");");
          } else if (cn.equals("float")) {
              mClassSource.println("    args[" + i + "] = new Float(v" + i + ");");
          } else if (cn.equals("double")) {
              mClassSource.println("    args[" + i + "] = new Double(v" + i + ");");
          } else if (cn.equals("long")) {
              mClassSource.println("    args[" + i + "] = new Long(v" + i + ");");
          } else if (cn.equals("char")) {
              mClassSource.println("    args[" + i + "] = new Character(v" + i + ");");
          } else if (cn.equals("boolean")) {
              mClassSource.println("    args[" + i + "] = new Boolean(v" + i + ");");
          } else if (cn.equals("byte")) {
              mClassSource.println("    args[" + i + "] = new Byte(v" + i + ");");
          } else if (isAdditionalFacade(clazz)) {
              mClassSource.println("    args[" + i + "] = mBaseServedObject.makeFacadeRefHolder(v"
                                   + i + ",\"" + super.encodeClassName(cn) + "\");");
          } else {
              mClassSource.println("    args[" + i + "] = v" + i + ";");
          }
      }
  
      private void generateReturnLine(Class rClass) {
  
          String arrayOtNot = rClass.isArray() ? "[]" : "";
          String cn = rClass.getName();
  
          if (cn.equals("boolean")) {
              mClassSource.println("      return ((Boolean) retVal).booleanValue();");
          } else if (cn.equals("integer")) {
              mClassSource.println("      return ((Integer) retVal).intValue();");
          } else if (cn.equals("short")) {
              mClassSource.println("      return ((Short) retVal).shortValue();");
          } else if (cn.equals("float")) {
              mClassSource.println("      return ((Float) retVal).floatValue();");
          } else if (cn.equals("double")) {
              mClassSource.println("      return ((Double) retVal).doubleValue();");
          } else if (cn.equals("long")) {
              mClassSource.println("      return ((Long) retVal).longValue();");
          } else if (cn.equals("char")) {
              mClassSource.println("      return ((Character) retVal).charValue();");
          } else if (cn.equals("void")) {
              mClassSource.println("      return;");
          } else if (cn.equals("byte")) {
              mClassSource.println("      return ((Byte) retVal).byteValue();");
          } else if (cn.equals("[B")) {
              mClassSource.println("      return (byte[]) retVal;");
          } else if (cn.equals("[C")) {
              mClassSource.println("      return (char[]) retVal;");
          } else if (cn.equals("[D")) {
              mClassSource.println("      return (double[]) retVal;");
          } else if (cn.equals("[F")) {
              mClassSource.println("      return (float[]) retVal;");
          } else if (cn.equals("[I")) {
              mClassSource.println("      return (int[]) retVal;");
          } else if (cn.equals("[J")) {
              mClassSource.println("      return (long[]) retVal;");
          } else if (cn.equals("[S")) {
              mClassSource.println("      return (short[]) retVal;");
          } else if (cn.equals("[Z")) {
              mClassSource.println("      return (boolean[]) retVal;");
          } else if (rClass.getName().startsWith("[L")) {
              mClassSource.println("      return (" + cn.substring(2,cn.length()-1) + "[]) retVal;");
          } else {
              mClassSource.println("      return (" + cn + ") retVal;");
          }
      }
  
      private String generateReturnValue(Class rClass) {
          String cn = rClass.getName();
          if (cn.equals("[B")) {
              return "byte[]";
          } else if (cn.equals("[C")) {
              return "char[]";
          } else if (cn.equals("[D")) {
              return "double[]";
          } else if (cn.equals("[F")) {
              return "float[]";
          } else if (cn.equals("[I")) {
              return "int[]";
          } else if (cn.equals("[J")) {
              return "long[]";
          } else if (cn.equals("[S")) {
              return "short[]";
          } else if (cn.equals("[Z")) {
              return "boolean[]";
          } else if (cn.startsWith("[L")) {
              return cn.substring(2,cn.length()-1) + "[]";
          } else {
              return cn;
          }
  
      }
  
      private boolean isAdditionalFacade(Class clazz) {
  
          if (mAdditionalFacades == null) {
              return false;
          }
  
          for (int p = 0; p < mAdditionalFacades.length; p++) {
              if (clazz.equals(mAdditionalFacades[p])) {
                  return true;
              }
          }
  
          return false;
      }
  }
  
  
  
  1.7       +10 -4     jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ant/AltrmiInterfaceTask.java
  
  Index: AltrmiInterfaceTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/ant/AltrmiInterfaceTask.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AltrmiInterfaceTask.java	28 Jan 2002 14:18:07 -0000	1.6
  +++ AltrmiInterfaceTask.java	30 Jan 2002 23:42:44 -0000	1.7
  @@ -13,8 +13,8 @@
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.Reference;
   import org.apache.tools.ant.util.FileUtils;
  -import org.apache.commons.altrmi.generator.PrimarySourceGenerator;
  -import org.apache.commons.altrmi.generator.SourceGenerationException;
  +import org.apache.commons.altrmi.common.ProxyGenerator;
  +import org.apache.commons.altrmi.common.ProxyGenerationException;
   
   import java.util.StringTokenizer;
   import java.util.Vector;
  @@ -99,7 +99,13 @@
           if (mGenName == null) {
               throw new BuildException("Specify the name to use for lookup");
           }
  -        PrimarySourceGenerator sg = new PrimarySourceGenerator();
  +        ProxyGenerator sg;
  +        try {
  +            sg = (ProxyGenerator) Class.forName("org.apache.commons.altrmi.generator.ProxyGeneratorImpl").newInstance();
  +        } catch (Exception e) {
  +            e.printStackTrace();
  +            throw new RuntimeException("PrimaryGenerator Impl jar not in classpath");
  +        }
           try {
               sg.setSrcGenDir(new File(mSrcGenDir).getAbsolutePath());
               sg.setClassGenDir(new File(mClassGenDir).getAbsolutePath());
  @@ -128,7 +134,7 @@
               sg.generateClass(cL);
           } catch (ClassNotFoundException cnfe) {
               throw new BuildException(cnfe.getMessage());
  -        } catch (SourceGenerationException sge) {
  +        } catch (ProxyGenerationException sge) {
               throw new BuildException(sge.getMessage());
           }
       }
  
  
  
  1.2       +10 -11    jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/AltrmiProxyGenerator.java
  
  Index: AltrmiProxyGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/AltrmiProxyGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AltrmiProxyGenerator.java	25 Jan 2002 16:40:13 -0000	1.1
  +++ AltrmiProxyGenerator.java	30 Jan 2002 23:42:44 -0000	1.2
  @@ -13,7 +13,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version * $Revision: 1.1 $
  + * @version * $Revision: 1.2 $
    */
   public interface AltrmiProxyGenerator {
   
  @@ -21,60 +21,59 @@
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classOrInterfaceToExpose
  +     * @param classLoader - classloader containing all needed for proxy generation
        *
        */
  -    void generate(Object impl, String asName, Class classOrInterfaceToExpose) throws PublicationException;
  +    void generate(String asName, String classOrInterfaceToExpose, ClassLoader classLoader) throws PublicationException;
   
       /**
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classOrInterfaceToExpose
        * @param additionalFacade
  +     * @param classLoader - classloader containing all needed for proxy generation
        *
        */
  -    void generate(Object impl, String asName, Class classOrInterfaceToExpose, Class additionalFacade) throws PublicationException;
  +    void generate(String asName, String classOrInterfaceToExpose, String additionalFacade, ClassLoader classLoader) throws PublicationException;
   
       /**
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classOrInterfaceToExpose
        * @param additionalFacades
  +     * @param classLoader - classloader containing all needed for proxy generation
        *
        */
  -    void generate(Object impl, String asName, Class classOrInterfaceToExpose, Class[] additionalFacades) throws PublicationException;
  +    void generate(String asName, String classOrInterfaceToExpose, String[] additionalFacades, ClassLoader classLoader) throws PublicationException;
   
   
       /**
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classesOrInterfacesToExpose
        *
        */
  -    void generate(Object impl, String asName, Class[] classesOrInterfacesToExpose) throws PublicationException;
  +    void generate(String asName, String[] classesOrInterfacesToExpose, ClassLoader classLoader) throws PublicationException;
   
       /**
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classesOrInterfacesToExpose
        * @param additionalFacades
  +     * @param classLoader - classloader containing all needed for proxy generation
        *
        */
  -    void generate(Object impl, String asName, Class[] classesOrInterfacesToExpose, Class[] additionalFacades) throws PublicationException;
  +    void generate(String asName, String[] classesOrInterfacesToExpose, String[] additionalFacades, ClassLoader classLoader) throws PublicationException;
   
   
   
  
  
  
  1.3       +1 -1      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/AbstractClassRetriever.java
  
  Index: AbstractClassRetriever.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/AbstractClassRetriever.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractClassRetriever.java	28 Jan 2002 10:27:06 -0000	1.2
  +++ AbstractClassRetriever.java	30 Jan 2002 23:42:45 -0000	1.3
  @@ -57,7 +57,7 @@
   
           InputStream is = null;
   
  -        thingName = thingName.replace('.','/') + ".class";
  +        thingName = thingName.replace('.','\\') + ".class";
   
           try {
               is = mClassLoader.getResourceAsStream(thingName);
  
  
  
  1.3       +166 -35   jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/DynamicGeneratorClassRetriever.java
  
  Index: DynamicGeneratorClassRetriever.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/DynamicGeneratorClassRetriever.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DynamicGeneratorClassRetriever.java	28 Jan 2002 00:35:16 -0000	1.2
  +++ DynamicGeneratorClassRetriever.java	30 Jan 2002 23:42:45 -0000	1.3
  @@ -9,13 +9,18 @@
   
   import org.apache.commons.altrmi.server.AltrmiProxyGenerator;
   import org.apache.commons.altrmi.server.PublicationException;
  -import org.apache.commons.altrmi.generator.PrimarySourceGenerator;
  -import org.apache.commons.altrmi.generator.SourceGenerationException;
  +import org.apache.commons.altrmi.server.ClassRetriever;
  +import org.apache.commons.altrmi.server.ClassRetrievalException;
  +import org.apache.commons.altrmi.common.ProxyGenerator;
  +import org.apache.commons.altrmi.common.ProxyGenerationException;
   
   import java.net.URLClassLoader;
   import java.net.URL;
   import java.net.MalformedURLException;
   import java.io.File;
  +import java.io.FileInputStream;
  +import java.io.ByteArrayOutputStream;
  +import java.io.IOException;
   
   
   /**
  @@ -23,74 +28,73 @@
    *
    *
    * @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 DynamicGeneratorClassRetriever extends AbstractClassRetriever implements AltrmiProxyGenerator {
  +public class DynamicGeneratorClassRetriever implements AltrmiProxyGenerator, ClassRetriever {
   
       private String mAltrmiClasspath;
       private String mClassGenDir;
       private String mSrcGenDir;
   
  +    private URL mGenJarURL;
  +
       /**
        * Constructor JarFileClassRetriever
        *
        *
        */
  -    public DynamicGeneratorClassRetriever() {
  +    public DynamicGeneratorClassRetriever(URL genJarURL) {
  +        mGenJarURL = genJarURL;
       }
   
       /**
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classOrInterfaceToExpose
        * @param additionalFacade
        *
        */
  -    public void generate(Object impl, String asName, Class classOrInterfaceToExpose, Class additionalFacade) throws PublicationException {
  -        generate(impl, asName, classOrInterfaceToExpose, new Class[] {additionalFacade} );
  +    public void generate(String asName, String classOrInterfaceToExpose, String additionalFacade, ClassLoader classLoader) throws PublicationException {
  +        generate(asName, classOrInterfaceToExpose, new String[] {additionalFacade}, classLoader );
       }
   
       /**
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classOrInterfaceToExpose
        * @param additionalFacades
        *
        */
  -    public void generate(Object impl, String asName, Class classOrInterfaceToExpose, Class[] additionalFacades) throws PublicationException {
  -        generate(impl, asName, new Class[] { classOrInterfaceToExpose }, additionalFacades );
  +    public void generate(String asName, String classOrInterfaceToExpose, String[] additionalFacades, ClassLoader classLoader) throws PublicationException {
  +        generate(asName, new String[] { classOrInterfaceToExpose }, additionalFacades, classLoader );
       }
   
       /**
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classesOrInterfacesToExpose
        *
        */
  -    public void generate(Object impl, String asName, Class[] classesOrInterfacesToExpose) throws PublicationException {
  -        generate(impl, asName, classesOrInterfacesToExpose, new Class[0] );
  +    public void generate(String asName, String[] classesOrInterfacesToExpose, ClassLoader classLoader) throws PublicationException {
  +        generate(asName, classesOrInterfacesToExpose, new String[0], classLoader );
       }
   
       /**
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classOrInterfaceToExpose
        *
        */
  -    public void generate(Object impl, String asName, Class classOrInterfaceToExpose) throws PublicationException {
  -        generate(impl, asName, new Class[] { classOrInterfaceToExpose } , new Class[0] );
  +    public void generate(String asName, String classOrInterfaceToExpose, ClassLoader classLoader) throws PublicationException {
  +        generate(asName, new String[] { classOrInterfaceToExpose } , new String[0], classLoader );
       }
   
       public void setAltrmiClasspath(String altrmiClasspath) {
  @@ -102,12 +106,79 @@
   
       public void setClassGenDir(String classGenDir) {
           mClassGenDir = classGenDir;
  +    }
  +
  +    /**
  +     * Method getBeanBytes
  +     *
  +     *
  +     * @param publishedName
  +     *
  +     * @return
  +     *
  +     * @throws ClassRetrievalException
  +     *
  +     */
  +    public final byte[] getBeanBytes(String publishedName) throws ClassRetrievalException {
  +        return getThingBytes("AltrmiGenerated" + publishedName);
  +    }
  +
  +    /**
  +     * Method getInterfaceImplementationBytes
  +     *
  +     *
  +     * @param publishedName
  +     *
  +     * @return
  +     *
  +     * @throws ClassRetrievalException
  +     *
  +     */
  +    public final byte[] getInterfaceImplementationBytes(String publishedName)
  +            throws ClassRetrievalException {
  +        return getThingBytes("AltrmiGenerated2" + publishedName);
  +    }
  +
  +    protected byte[] getThingBytes(String thingName) throws ClassRetrievalException {
  +
  +        thingName = thingName.replace('.','\\') + ".class";
  +
  +        FileInputStream fis;
  +
  +        try {
  +            fis = new FileInputStream(new File(mClassGenDir,thingName));
  +        } catch (Exception e) {
  +            e.printStackTrace();
  +            throw new ClassRetrievalException(
  +                "Generated class not found in classloader specified : " + e.getMessage());
  +        }
  +
  +        if (fis == null) {
  +            throw new ClassRetrievalException("Generated class not found in classloader specified.");
  +        }
  +
  +        ByteArrayOutputStream baos = new ByteArrayOutputStream();
  +        int i = 0;
  +
           try {
  -            setClassLoader( new URLClassLoader(new URL[]{ new File(classGenDir).toURL() }));
  -        } catch (MalformedURLException e) {
  +            while (-1 != (i = fis.read())) {
  +                baos.write(i);
  +            }
  +
  +            fis.close();
  +        } catch (IOException e) {
               e.printStackTrace();
  -            //TODO ?
  +            throw new ClassRetrievalException("Error retrieving generated class bytes : "
  +                                                    + e.getMessage());
           }
  +
  +
  +        byte[] bytes = baos.toByteArray();
  +        return bytes;
  +
  +
  +
  +
       }
   
       public void setSrcGenDir(String srcGenDir) {
  @@ -118,27 +189,87 @@
        * Method generate
        *
        *
  -     * @param impl
        * @param asName
        * @param classesOrInterfacesToExpose
        * @param additionalFacades
        *
        */
  -    public void generate(Object impl, String asName, Class[] classesOrInterfacesToExpose, Class[] additionalFacades) throws PublicationException {
  -        PrimarySourceGenerator sg = new PrimarySourceGenerator();
  -        sg.setSrcGenDir(mSrcGenDir);
  -        sg.setClassGenDir(mClassGenDir);
  -        sg.setGenName(asName);
  -        sg.setClasspath(mAltrmiClasspath);
  -        sg.setClassOrInterfacesToExpose(classesOrInterfacesToExpose);
  -        sg.setAdditionalfacades(additionalFacades);
  -        ClassLoader cL = this.getClass().getClassLoader();
  -        try {
  -            sg.generateSrc(cL);
  -            sg.generateClass(cL);
  -        } catch (SourceGenerationException e) {
  +    public void generate(String asName, String[] classesOrInterfacesToExpose, String[] additionalFacades, ClassLoader classLoader) throws PublicationException {
  +
  +        if (classLoader == null) {
  +            classLoader = this.getClass().getClassLoader();
  +        }
  +
  +        ClassLoader tmpGenClassLoader = new URLClassLoader(new URL[] {mGenJarURL}, classLoader );
  +
  +        Class[] clInfs = new Class[0];
  +        Class[] addInfs = new Class[0];
  +
  +        try {
  +            clInfs = new Class[classesOrInterfacesToExpose.length];
  +            for (int i = 0; i < classesOrInterfacesToExpose.length; i++) {
  +                String clsNam = classesOrInterfacesToExpose[i];
  +                clInfs[i] = tmpGenClassLoader.loadClass(clsNam);
  +            }
  +
  +            addInfs = new Class[additionalFacades.length];
  +            for (int i = 0; i < additionalFacades.length; i++) {
  +                String infNam = additionalFacades[i];
  +                addInfs[i] = tmpGenClassLoader.loadClass(infNam);
  +            }
  +        } catch (ClassNotFoundException e) {
               e.printStackTrace();
  -            // TODO ?
  +            throw new PublicationException("Class not found during publication:" + e.getMessage() + " " + e.getException().getMessage());
  +        }
  +
  +        ProxyGenerator proxyGenerator;
  +        try {
  +            proxyGenerator = (ProxyGenerator) tmpGenClassLoader.loadClass("org.apache.commons.altrmi.generator.ProxyGeneratorImpl").newInstance();
  +        } catch (Exception e) {
  +            throw new RuntimeException("PrimaryGenerator Impl jar not in classpath");
  +        }
  +        proxyGenerator.setSrcGenDir(mSrcGenDir);
  +        proxyGenerator.setClassGenDir(mClassGenDir);
  +        proxyGenerator.setGenName(asName);
  +        proxyGenerator.setClasspath(mAltrmiClasspath);
  +        proxyGenerator.setClassOrInterfacesToExpose(clInfs);
  +        proxyGenerator.setAdditionalfacades(addInfs);
  +
  +        //ClassLoader cL = this.getClass().getClassLoader();
  +        try {
  +            proxyGenerator.generateSrc(classLoader);
  +        } catch (Throwable t) {
  +            System.out.println("******");
  +            System.out.println("** Exception while making source : ");
  +            System.out.flush();
  +            t.printStackTrace();
  +            System.out.println("** Name=" + asName);
  +            System.out.println("** Classes/Interfaces to Expose..");
  +            for (int i = 0; i < classesOrInterfacesToExpose.length; i++) {
  +                String aString = classesOrInterfacesToExpose[i];
  +                System.out.println("** .." + classesOrInterfacesToExpose[i]);
  +            }
  +            System.out.println("******");
  +            System.out.flush();
  +        }
  +        try {
  +            proxyGenerator.generateClass(classLoader);
  +        } catch (Throwable t) {
  +            System.out.println("******");
  +            System.out.println("** Exception while making String : ");
  +            System.out.flush();
  +            t.printStackTrace();
  +            System.out.println("** SrcDir=" + mSrcGenDir);
  +            System.out.println("** ClassDir=" + mClassGenDir);
  +            System.out.println("** Name=" + asName);
  +            System.out.println("** CLasspath=" + mAltrmiClasspath);
  +            System.out.println("** Classes/Interfaces to Expose..");
  +            for (int i = 0; i < classesOrInterfacesToExpose.length; i++) {
  +                String aString = classesOrInterfacesToExpose[i];
  +                System.out.println("** .." + classesOrInterfacesToExpose[i]);
  +            }
  +            System.out.println("******");
  +            System.out.flush();
           }
       }
   }
  
  
  
  1.9       +6 -6      jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/test/PipeTest.java
  
  Index: PipeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/test/PipeTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PipeTest.java	28 Jan 2002 10:27:06 -0000	1.8
  +++ PipeTest.java	30 Jan 2002 23:42:45 -0000	1.9
  @@ -34,7 +34,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public class PipeTest {
   
  @@ -61,20 +61,20 @@
   
           ClassRetriever cr = new NoClassRetriever();
           if (mServerOrClientFactory.equals("S")) {
  -            cr = new JarFileClassRetriever("build/classes2");
  +            cr = new JarFileClassRetriever("build"+File.separator+"classes2");
           } else if (mServerOrClientFactory.equals("D")) {
  -            DynamicGeneratorClassRetriever dr = new DynamicGeneratorClassRetriever();
  +            DynamicGeneratorClassRetriever dr = new DynamicGeneratorClassRetriever(new File("build"+File.separator+"classes").toURL());
   
               File source = new File("testSource");
               source.mkdir();
               File gen = new File("testGenerated");
               gen.mkdir();
   
  -            dr.setAltrmiClasspath("build/classes");
  +            dr.setAltrmiClasspath("build"+File.separator+"classes");
               dr.setSrcGenDir(source.getAbsolutePath());
               dr.setClassGenDir(gen.getAbsolutePath());
   
  -            dr.generate(ti,"Hello",TestInterface.class, TestInterface2.class);
  +            dr.generate("Hello",TestInterface.class.getName(), TestInterface2.class.getName(), null);
               cr = dr;
   
           }
  @@ -95,7 +95,7 @@
        *
        *
        * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  -     * @version $Revision: 1.8 $
  +     * @version $Revision: 1.9 $
        */
       static class PipedTestClient implements Runnable {
   
  
  
  

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


Mime
View raw message