dblevins    2005/07/09 04:51:00

  Modified:    modules/itests/src/java/org/openejb/test Main.java
  Log:

  I can't fix this Tomcat integration issue with all the silly statics.  
Killing the statics.  Death to the statics!
  Added a class called SystemInstance, which is a singleton and hopefully the 
only important static for the 1.0 codebase someday.
  Changed FileUtils to get its instances from SystemInstance, then inlined all 
that code.
  Changed ClasspathUtils to get its Loader instance from SystemInstance and 
managed to inline all the remaining code.
  
  Revision  Changes    Path
  1.3       +10 -3     
openejb1/modules/itests/src/java/org/openejb/test/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb1/modules/itests/src/java/org/openejb/test/Main.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Main.java 16 Jun 2005 22:29:53 -0000      1.2
  +++ Main.java 9 Jul 2005 08:51:00 -0000       1.3
  @@ -44,6 +44,11 @@
    */
   package org.openejb.test;
   
  +import java.io.File;
  +
  +import org.openejb.loader.SystemInstance;
  +import org.openejb.util.ClasspathUtils;
  +
   
   /**
    * @author <a href="mailto:[EMAIL PROTECTED]">David Blevins</a>
  @@ -52,8 +57,10 @@
   
       public static void main (String args[]) {
           try{
  -            org.openejb.util.ClasspathUtils.addJarsToPath("lib");
  -            org.openejb.util.ClasspathUtils.addJarsToPath("dist");
  +            File directory = 
SystemInstance.get().getHome().getDirectory("lib");
  +            SystemInstance.get().getLoader().addJarsToPath(directory);
  +            File directory1 = 
SystemInstance.get().getHome().getDirectory("dist");
  +            SystemInstance.get().getLoader().addJarsToPath(directory1);
           } catch (Exception e){
               e.printStackTrace();
           }
  
  
  

Reply via email to