db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <mccallis...@forthillcompany.com>
Subject Re: cvs commit: db-ojb/src/test/org/apache/ojb/otm PerformanceTest.java
Date Wed, 14 Apr 2004 12:48:21 GMT
Woo hoo! Welcome back, Matt!

-Brian

On Apr 12, 2004, at 2:20 PM, mattbaird@apache.org wrote:

> mattbaird    2004/04/12 11:20:37
>
>   Modified:    src/test/org/apache/ojb/otm PerformanceTest.java
>   Log:
>   You need to use transactions with the OTM.
>
>   Revision  Changes    Path
>   1.4       +2 -0      
> db-ojb/src/test/org/apache/ojb/otm/PerformanceTest.java
>
>   Index: PerformanceTest.java
>   ===================================================================
>   RCS file: 
> /home/cvs//db-ojb/src/test/org/apache/ojb/otm/PerformanceTest.java,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- PerformanceTest.java	3 Oct 2003 12:54:09 -0000	1.3
>   +++ PerformanceTest.java	12 Apr 2004 18:20:37 -0000	1.4
>   @@ -180,6 +180,7 @@
>            c.addBetween("articleId", new Integer(offsetId), new 
> Integer(offsetId + articleCount));
>            Query q = new QueryByCriteria(PerformanceArticle.class, c);
>            long start = System.currentTimeMillis();
>   +		tx.begin();
>            Iterator iter = _conn.getIteratorByQuery(q, 
> LockType.NO_LOCK);
>            int fetchCount = 0;
>            while (iter.hasNext())
>   @@ -187,6 +188,7 @@
>                fetchCount++;
>                PerformanceArticle a = (PerformanceArticle) iter.next();
>            }
>   +		tx.commit();
>            long stop = System.currentTimeMillis();
>            logger.info("fetching " + fetchCount + " Objects: " + (stop 
> - start) + " msec");
>        }
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>




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