Return-Path: Delivered-To: apmail-db-ojb-dev-archive@www.apache.org Received: (qmail 53580 invoked from network); 12 Aug 2006 01:24:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Aug 2006 01:24:43 -0000 Received: (qmail 98550 invoked by uid 500); 12 Aug 2006 01:24:43 -0000 Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 98517 invoked by uid 500); 12 Aug 2006 01:24:43 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 98506 invoked by uid 500); 12 Aug 2006 01:24:42 -0000 Received: (qmail 98503 invoked by uid 99); 12 Aug 2006 01:24:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Aug 2006 18:24:42 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Aug 2006 18:24:42 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id EC1CD1A981A; Fri, 11 Aug 2006 18:24:21 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: ojb-commits@db.apache.org From: arminw@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060812012421.EC1CD1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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" > - - @@ -76,8 +74,6 @@ --> &junit; &junit_odmg; - &junit_otm; - &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