db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r430943 - in /db/ojb/trunk/src/test/org/apache/ojb: compare/CompareApiPerformanceTests.java compare/OJBPerfTest.java repository.dtd repository.xml
Date Sat, 12 Aug 2006 01:24:21 GMT
Author: arminw
Date: Fri Aug 11 18:24:20 2006
New Revision: 430943

URL: http://svn.apache.org/viewvc?rev=430943&view=rev
Log:
remove dependencies to OTM

Modified:
    db/ojb/trunk/src/test/org/apache/ojb/compare/CompareApiPerformanceTests.java
    db/ojb/trunk/src/test/org/apache/ojb/compare/OJBPerfTest.java
    db/ojb/trunk/src/test/org/apache/ojb/repository.dtd
    db/ojb/trunk/src/test/org/apache/ojb/repository.xml

Modified: db/ojb/trunk/src/test/org/apache/ojb/compare/CompareApiPerformanceTests.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/compare/CompareApiPerformanceTests.java?rev=430943&r1=430942&r2=430943&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/compare/CompareApiPerformanceTests.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/compare/CompareApiPerformanceTests.java Fri Aug 11
18:24:20 2006
@@ -58,10 +58,6 @@
         PerformanceODMGTest.iterations = iterations;
         suite.addTestSuite(PerformanceODMGTest.class);
         
-        PerformanceOTMTest.articleCount = articleCount;
-        PerformanceOTMTest.iterations = iterations;
-        suite.addTestSuite(PerformanceOTMTest.class);
-        
         return suite;
     }    
 }

Modified: db/ojb/trunk/src/test/org/apache/ojb/compare/OJBPerfTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/compare/OJBPerfTest.java?rev=430943&r1=430942&r2=430943&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/compare/OJBPerfTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/compare/OJBPerfTest.java Fri Aug 11 18:24:20 2006
@@ -6,10 +6,8 @@
 import java.sql.Statement;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 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.LookupException;
@@ -19,10 +17,6 @@
 import org.apache.ojb.broker.util.ObjectModification;
 import org.apache.ojb.odmg.OJB;
 import org.apache.ojb.odmg.TransactionExt;
-import org.apache.ojb.otm.OTMConnection;
-import org.apache.ojb.otm.OTMKit;
-import org.apache.ojb.otm.kit.SimpleKit;
-import org.apache.ojb.otm.lock.LockType;
 import org.apache.ojb.performance.PerfArticle;
 import org.apache.ojb.performance.PerfArticleImpl;
 import org.apache.ojb.performance.PerfTest;
@@ -635,170 +629,6 @@
                 db.deletePersistent(arr[i]);
                 tx.commit();
             }
-        }
-    }
-
-    // =====================================================================================
-    // Inner class, test handle using OTM-api
-    // =====================================================================================
-    public static class OTMPerfTest extends PerfTest
-    {
-        private OTMKit _kit;
-
-        private OTMConnection _conn;
-
-        private org.apache.ojb.otm.core.Transaction _tx;
-
-        public void init()
-        {
-            _kit = SimpleKit.getInstance();
-            _conn = _kit.acquireConnection(ojbInstance.getDefaultConfiguration());
-        }
-
-        public void tearDown() throws Exception
-        {
-            if((_tx != null) && _tx.isInProgress())
-            {
-                _tx.rollback();
-            }
-            _conn.close();
-        }
-
-        public String testName()
-        {
-            return "OTM";
-        }
-
-        public int articleCount()
-        {
-            Criteria c = new Criteria();
-            Query q = QueryFactory.newQuery(PerfArticleImpl.class, c);
-            int count = 0;
-            try
-            {
-                PersistenceBroker broker = ojbInstance.lookupBroker();
-                count = broker.getCount(q);
-                broker.close();
-            }
-            catch(Exception e)
-            {
-                e.printStackTrace();
-            }
-            return count;
-        }
-
-        /**
-         * A resource cumbering insert-method implementation,
-         * this was used to test implementation.
-         */
-        public void insertNewArticlesStress(PerfArticle[] arr) throws Exception
-        {
-            for(int i = 0; i < arr.length; i++)
-            {
-                _tx = _kit.getTransaction(_conn);
-                _tx.begin();
-                _conn.makePersistent(arr[i]);
-                _tx.commit();
-            }
-        }
-
-        /**
-         * A performance optimized insert-method implementation,
-         * used to test performance.
-         */
-        public void insertNewArticles(PerfArticle[] arr) throws Exception
-        {
-            _tx = _kit.getTransaction(_conn);
-            _tx.begin();
-            for(int i = 0; i < arr.length; i++)
-            {
-                _conn.makePersistent(arr[i]);
-            }
-            _tx.commit();
-        }
-
-        public Collection readArticlesByCursor(String articleName) throws Exception
-        {
-            Criteria c = new Criteria();
-            c.addLike("articleName", articleName);
-            Query q = QueryFactory.newQuery(PerfArticleImpl.class, c);
-
-            _tx = _kit.getTransaction(_conn);
-            _tx.begin();
-            Collection col = _conn.getCollectionByQuery(q, LockType.NO_LOCK);
-            _tx.commit();
-            return col;
-        }
-
-        public PerfArticle getArticleByIdentity(Long articleId) throws Exception
-        {
-            Criteria c = new Criteria();
-            c.addEqualTo("articleId", articleId);
-            Query q = QueryFactory.newQuery(PerfArticleImpl.class, c);
-
-            _tx = _kit.getTransaction(_conn);
-            _tx.begin();
-            // the getByIdeneityMethod() needs Identity and this is currently not supported
-            Collection col = _conn.getCollectionByQuery(q, LockType.NO_LOCK);
-            _tx.commit();
-            Iterator it = col.iterator();
-            return it.hasNext() ? (PerfArticle) it.next() : null;
-        }
-
-        public void updateArticles(PerfArticle[] arr) throws Exception
-        {
-            _tx = _kit.getTransaction(_conn);
-            _tx.begin();
-            for(int i = 0; i < arr.length; i++)
-            {
-                Identity oid = _conn.getIdentity(arr[i]);
-                PerfArticle a = (PerfArticle) _conn.getObjectByIdentity(oid, LockType.WRITE_LOCK);
-                a.setArticleName("" + System.currentTimeMillis());
-            }
-            _tx.commit();
-        }
-
-        public void updateArticlesStress(PerfArticle[] arr) throws Exception
-        {
-            for(int i = 0; i < arr.length; i++)
-            {
-                _tx = _kit.getTransaction(_conn);
-                _tx.begin();
-                Identity oid = _conn.getIdentity(arr[i]);
-                PerfArticle a = (PerfArticle) _conn.getObjectByIdentity(oid, LockType.WRITE_LOCK);
-                a.setArticleName("" + System.currentTimeMillis());
-                _tx.commit();
-            }
-        }
-
-        /**
-         * A resource cumbering delete-method implementation,
-         * used to test implementation
-         */
-        public void deleteArticlesStress(PerfArticle[] arr) throws Exception
-        {
-            for(int i = 0; i < arr.length; i++)
-            {
-                _tx = _kit.getTransaction(_conn);
-                _tx.begin();
-                _conn.deletePersistent(arr[i]);
-                _tx.commit();
-            }
-        }
-
-        /**
-         * A performance optimized delete-method implementation,
-         * used to test performance
-         */
-        public void deleteArticles(PerfArticle[] arr) throws Exception
-        {
-            _tx = _kit.getTransaction(_conn);
-            _tx.begin();
-            for(int i = 0; i < arr.length; i++)
-            {
-                _conn.deletePersistent(arr[i]);
-            }
-            _tx.commit();
         }
     }
 }

Modified: db/ojb/trunk/src/test/org/apache/ojb/repository.dtd
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository.dtd?rev=430943&r1=430942&r2=430943&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository.dtd (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository.dtd Fri Aug 11 18:24:20 2006
@@ -663,7 +663,6 @@
   auto-retrieve (true | false) "true"
   auto-update (none | link | object | true | false) "false"
   auto-delete (none | link | object | true | false) "false"
-  otm-dependent (true | false) "false"
 >
 
 <!--
@@ -789,7 +788,6 @@
   auto-retrieve (true | false) "true"
   auto-update (none | link | object | true | false) "false"
   auto-delete (none | link | object | true | false) "false"
-  otm-dependent (true | false) "false"
 >
 
 <!--

Modified: db/ojb/trunk/src/test/org/apache/ojb/repository.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository.xml?rev=430943&r1=430942&r2=430943&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository.xml Fri Aug 11 18:24:20 2006
@@ -42,8 +42,6 @@
 <!-- here the junit include files begin  -->
 <!ENTITY junit SYSTEM "repository_junit.xml">
 <!ENTITY junit_odmg SYSTEM "repository_junit_odmg.xml">
-<!ENTITY junit_otm SYSTEM "repository_junit_otm.xml">
-<!--ENTITY junit_dirty SYSTEM "repository_junit_dirty.xml"-->
 <!ENTITY junit_ref SYSTEM "repository_junit_reference.xml">
 <!ENTITY junit_meta_seq SYSTEM "repository_junit_meta_seq.xml">
 <!ENTITY junit_cache SYSTEM "repository_junit_cache.xml">
@@ -76,8 +74,6 @@
     -->
     &junit;
     &junit_odmg;
-    &junit_otm;
-    <!-- &junit_dirty; -->
     &junit_ref;
     &junit_meta_seq;
     &junit_cache;



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