db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker OJBPerfTest.java
Date Sat, 07 Jun 2003 10:15:29 GMT
brj         2003/06/07 03:15:29

  Modified:    src/test/org/apache/ojb/broker OJBPerfTest.java
  Log:
  some style fixes
  
  Revision  Changes    Path
  1.4       +11 -11    db-ojb/src/test/org/apache/ojb/broker/OJBPerfTest.java
  
  Index: OJBPerfTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/OJBPerfTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OJBPerfTest.java	10 Mar 2003 06:07:20 -0000	1.3
  +++ OJBPerfTest.java	7 Jun 2003 10:15:29 -0000	1.4
  @@ -247,7 +247,7 @@
       {
           private Implementation odmg;
           private Database db;
  -        private Transaction tx;
  +        private Transaction m_tx;
   
           public ODMGPerfHandle(PerfTest test)
           {
  @@ -261,7 +261,7 @@
                   odmg = OJB.getInstance();
                   db = odmg.newDatabase();
                   db.open(TestHelper.DEF_DATABASE_NAME, Database.OPEN_READ_WRITE);
  -                tx = odmg.newTransaction();
  +                m_tx = odmg.newTransaction();
               }
               catch (ODMGException e)
               {
  @@ -271,7 +271,7 @@
   
           public void tearDown() throws Exception
           {
  -            if(tx.isOpen()) tx.abort();
  +            if(m_tx.isOpen()) m_tx.abort();
               db.close();
           }
   
  @@ -281,12 +281,12 @@
            */
           public void insertNewArticles(PerfArticle[] arr) throws Exception
           {
  -            tx.begin();
  +            m_tx.begin();
               for (int i = 0; i < arr.length; i++)
               {
  -                tx.lock(arr[i], Transaction.WRITE);
  +                m_tx.lock(arr[i], Transaction.WRITE);
               }
  -            tx.commit();
  +            m_tx.commit();
           }
   
           /**
  @@ -306,13 +306,13 @@
   
           public Collection readArticlesByCursor(String articleName) throws Exception
           {
  -            tx.begin();
  +            m_tx.begin();
               OQLQuery query = odmg.newOQLQuery();
               String sql = "select allArticles from " + PerfArticleImpl.class.getName() +
                       " where articleName like \"" + articleName + "\"";
               query.create(sql);
               List allProducts = (List) query.execute();
  -            tx.commit();
  +            m_tx.commit();
               return allProducts;
           }
   
  @@ -322,12 +322,12 @@
            */
           public void deleteArticles(PerfArticle[] arr) throws Exception
           {
  -            tx.begin();
  +            m_tx.begin();
               for (int i = 0; i < arr.length; i++)
               {
                   db.deletePersistent(arr[i]);
               }
  -            tx.commit();
  +            m_tx.commit();
           }
   
           /**
  
  
  

Mime
View raw message