commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bali...@apache.org
Subject cvs commit: jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/tools Enhancer.java
Date Tue, 07 May 2002 20:16:17 GMT
baliuka     02/05/07 13:16:17

  Modified:    simplestore build.xml
               simplestore/src/java/org/apache/commons/simplestore/jdbc
                        DriverDataSource.java
               simplestore/src/java/org/apache/commons/simplestore/tools
                        Enhancer.java
  Log:
  
  
  Revision  Changes    Path
  1.22      +4 -1      jakarta-commons-sandbox/simplestore/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/simplestore/build.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- build.xml	29 Apr 2002 18:01:59 -0000	1.21
  +++ build.xml	7 May 2002 20:16:17 -0000	1.22
  @@ -2,7 +2,7 @@
   
   <!--
           "simplestore" component of the Jakarta Commons Subproject
  -        $Id: build.xml,v 1.21 2002/04/29 18:01:59 baliuka Exp $
  +        $Id: build.xml,v 1.22 2002/05/07 20:16:17 baliuka Exp $
   -->
   
   <!-- ========== Executable Targets ======================================== -->
  @@ -170,6 +170,9 @@
     <target name="test" depends="build-test" description="runs (junit) unit tests">
       <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}" 
        maxmemory="${maxmemory}">
  +  <!-- jvmarg value="-Xrunhprof:cpu=times,file=debug.txt" / -->
  +  <jvmarg value="-verbose:gc" /> 
  +  <jvmarg value="-verbose:class" /> 
        <sysproperty key="DEBUG" value="false"/> 
         <arg value="${test.entry}"/>
           <classpath>
  
  
  
  1.12      +13 -5     jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/jdbc/DriverDataSource.java
  
  Index: DriverDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/jdbc/DriverDataSource.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DriverDataSource.java	13 Apr 2002 21:51:44 -0000	1.11
  +++ DriverDataSource.java	7 May 2002 20:16:17 -0000	1.12
  @@ -78,7 +78,7 @@
   /**
    *@author     Juozas Baliuka <a href="mailto:baliuka@mwm.lt">
    *      baliuka@mwm.lt</a>
  - *@version    $Id: DriverDataSource.java,v 1.11 2002/04/13 21:51:44 baliuka Exp $
  + *@version    $Id: DriverDataSource.java,v 1.12 2002/05/07 20:16:17 baliuka Exp $
    *
    */
   public class DriverDataSource implements ConnectionFactory {
  @@ -87,8 +87,7 @@
       
       private ConnectionWrapper connection[] = null;
       
  -    private int counter = 0;
  -    
  +      
       private Driver driver;
       
       /** Holds value of property user. */
  @@ -173,13 +172,22 @@
           }
           
           try {
  -            this.driver = (Driver) Class.forName(driver).newInstance();
  +            this.driver = (Driver) Class.forName(driver,true, 
  +                                this.getClass().getClassLoader() ).newInstance();
           } catch (Exception e) {
               e.printStackTrace();
               throw new SimplestoreException(e.getMessage());
           }
       }
       
  +    public void setDriver(Driver driver) {
  +        if (this.driver != null) {
  +            throw new IllegalStateException();
  +        }
  +        this.driver = driver;
  +    }
  +    
  +    
       
       /**
        * Getter for property user.
  @@ -223,7 +231,7 @@
               while ( true ) { //  must loop and wait not used connection
                   if (connection[i] != null) {           
                       if (!connection[i].isLocked()) {    
  -                        counter = i;                  
  +                                    
                           
                           if (connection[ i ].isClosed()) { // expired ?
                               try {
  
  
  
  1.25      +8 -7      jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/tools/Enhancer.java
  
  Index: Enhancer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/tools/Enhancer.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Enhancer.java	30 Apr 2002 18:04:35 -0000	1.24
  +++ Enhancer.java	7 May 2002 20:16:17 -0000	1.25
  @@ -135,7 +135,7 @@
    * </pre>
    *@author     Juozas Baliuka <a href="mailto:baliuka@mwm.lt">
    *      baliuka@mwm.lt</a>
  - *@version    $Id: Enhancer.java,v 1.24 2002/04/30 18:04:35 baliuka Exp $
  + *@version    $Id: Enhancer.java,v 1.25 2002/05/07 20:16:17 baliuka Exp $
    */
   public class Enhancer implements org.apache.bcel.Constants ,
   Constants{
  @@ -240,7 +240,8 @@
           StringBuffer keyBuff = new StringBuffer(cls.getName() + ";");
           if(interfaces != null){
               for(int i = 0; i< interfaces.length; i++ ){
  -                keyBuff.append(interfaces[i].getName() + ";");
  +                keyBuff
  +                .append(interfaces[i].getName() + ";");
               }
           }
          String key = keyBuff.toString(); 
  @@ -829,7 +830,7 @@
           int argArray = loaded;
           int resutFromBefore = ++loaded;
           il.append(new ASTORE(argArray));
  -        if (!abstractM) { // invoke before
  +      //  if (!abstractM) { // invoke before
               il.append(new ALOAD(0));
               il.append(
               factory.createFieldAccess(
  @@ -842,10 +843,10 @@
               il.append(new ALOAD(argArray));
               il.append(new INVOKEINTERFACE(before, 4));
               il.append(new ASTORE(resutFromBefore));
  -        } else {
  -            il.append(new ACONST_NULL());
  -            il.append(new ASTORE(resutFromBefore));
  -        }
  +    //    } else {
  +    //        il.append(new ACONST_NULL());
  +     //       il.append(new ASTORE(resutFromBefore));
  +    //    }
           //locals
           il.append(new ACONST_NULL());
           int resultFromSuper = ++loaded;
  
  
  

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