db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/core PersistenceBrokerFactoryDefaultImpl.java
Date Sun, 15 Jun 2003 12:01:06 GMT
arminw      2003/06/15 05:01:06

  Modified:    xdocs    performance.xml
               src/test/org/apache/ojb/broker AbstractExtentClassTest.java
               src/java/org/apache/ojb/broker/core
                        PersistenceBrokerFactoryDefaultImpl.java
  Log:
  - fix typo
  - add logging
  - cleanup
  
  Revision  Changes    Path
  1.11      +5 -5      db-ojb/xdocs/performance.xml
  
  Index: performance.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/performance.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- performance.xml	14 Jun 2003 22:07:00 -0000	1.10
  +++ performance.xml	15 Jun 2003 12:01:06 -0000	1.11
  @@ -209,14 +209,14 @@
        [odmg] [performance] INFO: fetching 2500 Objects: 1036 msec
        [odmg] [performance] INFO: deleting 2500 Objects: 1741 msec
   
  -     [odmg] Time: 55,186 
  +     [odmg] Time: 55,186
   ]]></source>
   </p>
   <p>
   Some notes on these test results:
   <ul>
   	<li>
  -		You see a consistently better performance in the second and third run. 
  +		You see a consistently better performance in the second and third run.
   		this is caused by warming up effects of JVM and OJB.
   	</li>
   	<li>
  @@ -317,14 +317,14 @@
   <br/>
   Call <code>bin\build.bat perf-test-jar</code> or <code>bin/build.sh perf-test-jar</code>
   to build the jar file contain all necessary classes to set up a test with an
  -arbitrary O/R mapper. After build the <code>db-ojb-XXX-performance.jar</code>
could
  +arbitrary O/R mapper. After build the <code>db-ojb-XXX-performance.jar</code>
can
   be found in <code>[db-ojb]/dist</code> directory.
   </p>
   <p>
   <b>Steps to set up the test:</b>
   <br/>
   <p>
  -You could find a example implementation called
  +You can find a example implementation called
   <code>org.apache.ojb.broker.OJBPerfTest</code> in the test-sources directory
   under <code>[db-ojb]/src/test/org/apache/ojb</code> (when using source-distribution).
   This implementation class is used to compare the PB-API with ODMG-API and to test
  
  
  
  1.4       +14 -12    db-ojb/src/test/org/apache/ojb/broker/AbstractExtentClassTest.java
  
  Index: AbstractExtentClassTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/AbstractExtentClassTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractExtentClassTest.java	13 Jun 2003 16:59:13 -0000	1.3
  +++ AbstractExtentClassTest.java	15 Jun 2003 12:01:06 -0000	1.4
  @@ -1,14 +1,13 @@
   package org.apache.ojb.broker;
   
   import junit.framework.TestCase;
  -
  -import java.util.Collection;
  -import java.util.ArrayList;
  -
  +import org.apache.commons.lang.builder.ToStringBuilder;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryFactory;
  -import org.apache.commons.lang.builder.ToStringBuilder;
  +
  +import java.util.ArrayList;
  +import java.util.Collection;
   
   /**
    *
  @@ -73,8 +72,8 @@
           // now test query
           Criteria crit = new Criteria();
           crit.addLike("name", name);
  -		Query q = QueryFactory.newQuery(AbstractIF_X.class, crit);
  -		Collection results = broker.getCollectionByQuery(q);
  +        Query q = QueryFactory.newQuery(AbstractIF_X.class, crit);
  +        Collection results = broker.getCollectionByQuery(q);
           assertNotNull(results);
           assertTrue(results.size() > 2);
       }
  @@ -102,10 +101,10 @@
   
           broker.clearCache();
           // now test query
  -		Criteria crit = new Criteria();
  +        Criteria crit = new Criteria();
           crit.addLike("name", name);
  -		Query q = QueryFactory.newQuery(AbstractIF_X.class, crit);
  -		Collection results = broker.getCollectionByQuery(q);
  +        Query q = QueryFactory.newQuery(AbstractIF_X.class, crit);
  +        Collection results = broker.getCollectionByQuery(q);
           assertNotNull(results);
           assertTrue(results.size() > 2);
       }
  @@ -118,8 +117,11 @@
       public static abstract interface AbstractIF_X
       {
           public int getContainerId();
  +
           public void setContainerId(int containerId);
  +
           public void setName(String name);
  +
           public String getName();
       }
   
  @@ -212,7 +214,7 @@
   
           private void addX(AbstractIF_X someX)
           {
  -            if(myXReferences == null) myXReferences = new ArrayList();
  +            if (myXReferences == null) myXReferences = new ArrayList();
               myXReferences.add(someX);
           }
   
  
  
  
  1.2       +2 -1      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java
  
  Index: PersistenceBrokerFactoryDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PersistenceBrokerFactoryDefaultImpl.java	26 Apr 2003 23:18:25 -0000	1.1
  +++ PersistenceBrokerFactoryDefaultImpl.java	15 Jun 2003 12:01:06 -0000	1.2
  @@ -356,6 +356,7 @@
               PersistenceBroker broker = ((PoolablePersistenceBroker) obj).getInnermostDelegate();
               if (broker instanceof PersistenceBrokerImpl)
               {
  +                log.info("Destroy PersistenceBroker instance " + obj);
                   ((PersistenceBrokerImpl) broker).destroy();
               }
           }
  
  
  

Mime
View raw message