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/test/org/apache/ojb/compare OJBPerfTest.java PerformanceODMGTest.java
Date Wed, 31 Aug 2005 16:30:47 GMT
arminw      2005/08/31 09:30:47

  Modified:    src/test/org/apache/ojb/compare OJBPerfTest.java
                        PerformanceODMGTest.java
  Log:
  minor improvements
  
  Revision  Changes    Path
  1.3       +10 -7     db-ojb/src/test/org/apache/ojb/compare/OJBPerfTest.java
  
  Index: OJBPerfTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/compare/OJBPerfTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OJBPerfTest.java	27 Aug 2005 12:41:20 -0000	1.2
  +++ OJBPerfTest.java	31 Aug 2005 16:30:47 -0000	1.3
  @@ -8,14 +8,13 @@
   import java.util.Collection;
   import java.util.List;
   
  +import org.apache.ojb.broker.Identity;
  +import org.apache.ojb.broker.PersistenceBroker;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.accesslayer.ConnectionFactory;
   import org.apache.ojb.broker.accesslayer.LookupException;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
  -import org.apache.ojb.broker.TestHelper;
  -import org.apache.ojb.broker.PersistenceBroker;
  -import org.apache.ojb.broker.Identity;
  -import org.apache.ojb.odmg.OJB;
   import org.apache.ojb.odmg.TransactionExt;
   import org.apache.ojb.otm.OTMConnection;
   import org.apache.ojb.otm.OTMKit;
  @@ -141,7 +140,8 @@
               {
                   PerfArticle article = arr[i];
                   // use Identity to set pk field value
  -                Identity oid = broker.serviceIdentity().buildIdentity(article);
  +                broker.serviceIdentity().buildIdentity(article);
  +
                   stmt.setLong(1, article.getArticleId().longValue());
                   stmt.setString(2, article.getArticleName());
                   stmt.setInt(3, article.getMinimumStock());
  @@ -305,6 +305,9 @@
   
           public void init() throws Exception
           {
  +            PersistenceBroker broker = ojbInstance.lookupBroker();
  +            broker.clearCache();
  +            broker.close();
           }
   
           public void tearDown() throws Exception
  @@ -521,7 +524,7 @@
           {
               try
               {
  -                odmg = OJB.getInstance();
  +                odmg = ojbInstance.instanceODMG();
                   db = odmg.newDatabase();
                   db.open(TestHelper.DEF_DATABASE_NAME, Database.OPEN_READ_WRITE);
                   m_tx = (TransactionExt) odmg.newTransaction();
  
  
  
  1.3       +1 -1      db-ojb/src/test/org/apache/ojb/compare/PerformanceODMGTest.java
  
  Index: PerformanceODMGTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/compare/PerformanceODMGTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PerformanceODMGTest.java	27 Aug 2005 12:41:20 -0000	1.2
  +++ PerformanceODMGTest.java	31 Aug 2005 16:30:47 -0000	1.3
  @@ -59,7 +59,7 @@
           // madatory to call super class method
           super.setUp();
   
  -        odmg = OJB.getInstance(ojb);
  +        odmg = ojb.instanceODMG();
           db = odmg.newDatabase();
           db.open(TestHelper.DEF_DATABASE_NAME, Database.OPEN_READ_WRITE);
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message