dblevins    2005/08/16 00:18:56

  Modified:    modules/webadmin/src/java/org/openejb/webadmin/main
                        DeployerBean.java
  Log:

  Killed the temp codebase functionality from SafeToolkit.  Added new class
  TempCodebase which is not static.  Refactored nearly all code using the
  SafeToolkit.loadTempClass to use just a classloader instead.  Code for 
creating
  "temp" jars for validation and other deployment related classloading is now in
  one spot (instead of everywhere a class is loaded) and can now be safely 
avoided
  for unpacked ejb jars--we don't want to copy entire directories when we 
validate
  an unpacked ejb jar.
  
  Revision  Changes    Path
  1.6       +13 -13    
openejb1/modules/webadmin/src/java/org/openejb/webadmin/main/DeployerBean.java
  
  Index: DeployerBean.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb1/modules/webadmin/src/java/org/openejb/webadmin/main/DeployerBean.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DeployerBean.java 4 Aug 2005 20:17:43 -0000       1.5
  +++ DeployerBean.java 16 Aug 2005 04:18:56 -0000      1.6
  @@ -44,22 +44,13 @@
    */
   package org.openejb.webadmin.main;
   
  -import java.io.File;
  -import java.lang.reflect.Method;
  -import java.util.ArrayList;
  -import java.util.List;
  -import java.util.Vector;
  -
  -import javax.ejb.CreateException;
  -import javax.ejb.SessionBean;
  -import javax.ejb.SessionContext;
  -
   import org.openejb.DeploymentInfo;
   import org.openejb.OpenEJB;
   import org.openejb.OpenEJBException;
   import org.openejb.alt.config.Bean;
   import org.openejb.alt.config.ConfigUtils;
   import org.openejb.alt.config.EjbJarUtils;
  +import org.openejb.alt.config.TempCodebase;
   import org.openejb.alt.config.ejb11.EjbDeployment;
   import org.openejb.alt.config.ejb11.EjbJar;
   import org.openejb.alt.config.ejb11.EjbRef;
  @@ -74,9 +65,17 @@
   import org.openejb.alt.config.sys.Openejb;
   import org.openejb.util.HtmlUtilities;
   import org.openejb.util.JarUtils;
  -import org.openejb.util.SafeToolkit;
   import org.openejb.util.StringUtilities;
   
  +import javax.ejb.CreateException;
  +import javax.ejb.SessionBean;
  +import javax.ejb.SessionContext;
  +import java.io.File;
  +import java.lang.reflect.Method;
  +import java.util.ArrayList;
  +import java.util.List;
  +import java.util.Vector;
  +
   /**
    * This is a stateful session bean which handles the action of deployment 
for the
    * web administration.
  @@ -554,7 +553,8 @@
                for (int i = 0; i < deployerBeans.length; i++) {
                        //check for entity beans here
                        if ("CMP_ENTITY".equals(deployerBeans[i].getType())) {
  -                             tempBean = 
SafeToolkit.loadTempClass(deployerBeans[i].getHome(), this.jarFile);
  +                TempCodebase tempCodebase = 
TempCodebase.getTempCodebase(this.jarFile);
  +                tempBean = 
tempCodebase.loadClass(deployerBeans[i].getHome());
                                htmlString.append(
                                        writeOQLForEntityBeansTable(
                                                tempBean,
  
  
  

Reply via email to