db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: jakarta-ojb/src/test/org/apache/ojb/odmg DListTest.java DMapTest.java LockingTest.java LockTestCommitedReads.java LockTestRepeatableReads.java LockTestSerializable.java LockTestUncommitedReads.java ManyToManyTest.java AutoIncrementWithRelatedObjectTest.java BidirectionalAssociationTest.java ContractVersionEffectivenessOQLTest.java MultiDBUsageTest.java NamedRoots.java OdmgExamples.java ODMGRollbackTest.java OneToManyTest.java OneToOneTest.java OQLTest.java PerformanceTest.java ProjectionAttributeTest.java ProxyTest.java RITest.java ScrollableQueryResultsTest.java TestThreadsNLocks.java
Date Tue, 24 Dec 2002 14:07:41 GMT
arminw      2002/12/24 06:07:41

  Modified:    src/test/org/apache/ojb/odmg DListTest.java DMapTest.java
                        LockingTest.java LockTestCommitedReads.java
                        LockTestRepeatableReads.java
                        LockTestSerializable.java
                        LockTestUncommitedReads.java ManyToManyTest.java
                        AutoIncrementWithRelatedObjectTest.java
                        BidirectionalAssociationTest.java
                        ContractVersionEffectivenessOQLTest.java
                        MultiDBUsageTest.java NamedRoots.java
                        OdmgExamples.java ODMGRollbackTest.java
                        OneToManyTest.java OneToOneTest.java OQLTest.java
                        PerformanceTest.java ProjectionAttributeTest.java
                        ProxyTest.java RITest.java
                        ScrollableQueryResultsTest.java
                        TestThreadsNLocks.java
  Log:
  update test cases
  
  Revision  Changes    Path
  1.10      +5 -15     jakarta-ojb/src/test/org/apache/ojb/odmg/DListTest.java
  
  Index: DListTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/DListTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DListTest.java	8 Dec 2002 13:40:06 -0000	1.9
  +++ DListTest.java	24 Dec 2002 14:07:40 -0000	1.10
  @@ -3,6 +3,7 @@
   import junit.framework.TestCase;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.GUID;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
  @@ -28,7 +29,7 @@
       }
   
       private static Class CLASS = DListTest.class;
  -    private String databaseName = "repository.xml";
  +    private String databaseName;
   
       /**
        * Insert the method's description here.
  @@ -45,12 +46,12 @@
   
           Article a = new Article();
           PersistenceBroker broker = ((TransactionImpl) implementation.currentTransaction()).getBroker();
  -        a.setArticleId(broker.getUniqueId(
  +        a.setArticleId(broker.serviceSequenceManager().getUniqueId(
                   broker.getClassDescriptor(Article.class).getFieldDescriptorByName("articleId")));
           a.setArticleName("New Funny Article " + a.getArticleId());
           a.setStock(234);
           a.setProductGroupId(7);
  -        
  +
           return a;
   
       }
  @@ -72,18 +73,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.7       +4 -14     jakarta-ojb/src/test/org/apache/ojb/odmg/DMapTest.java
  
  Index: DMapTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/DMapTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DMapTest.java	8 Dec 2002 13:40:06 -0000	1.6
  +++ DMapTest.java	24 Dec 2002 14:07:40 -0000	1.7
  @@ -5,6 +5,7 @@
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerException;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.odmg.*;
  @@ -39,12 +40,12 @@
   
           Article a = new Article();
           PersistenceBroker broker = ((TransactionImpl) odmg.currentTransaction()).getBroker();
  -        a.setArticleId(broker.getUniqueId(
  +        a.setArticleId(broker.serviceSequenceManager().getUniqueId(
                   broker.getClassDescriptor(Article.class).getFieldDescriptorByName("articleId")));
           a.setArticleName("New Funny Article " + a.getArticleId());
           a.setStock(234);
           a.setProductGroupId(7);
  -        
  +
           return a;
       }
   
  @@ -65,18 +66,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.3       +2 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/LockingTest.java
  
  Index: LockingTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/LockingTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LockingTest.java	5 Sep 2002 16:58:10 -0000	1.2
  +++ LockingTest.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -3,6 +3,7 @@
   
   import junit.framework.TestCase;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.odmg.OJB;
  @@ -42,18 +43,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.3       +3 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/LockTestCommitedReads.java
  
  Index: LockTestCommitedReads.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/LockTestCommitedReads.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LockTestCommitedReads.java	5 Sep 2002 16:58:10 -0000	1.2
  +++ LockTestCommitedReads.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import junit.framework.TestCase;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.odmg.OJB;
  @@ -47,18 +48,8 @@
       {
           try
           {
  -            try
  -            {
  -                databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                        .getConfigurator()
  -                        .getConfigurationFor(null))
  -                        .getRepositoryFilename();
  -            }
  -            catch (ConfigurationException e)
  -            {
  -                databaseName = "repository.xml";
  -            }
  +            databaseName = TestHelper.DEF_JCD_ALIAS;
  +
               // get facade instance
               Implementation odmg = OJB.getInstance();
               db = odmg.newDatabase();
  
  
  
  1.3       +3 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/LockTestRepeatableReads.java
  
  Index: LockTestRepeatableReads.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/LockTestRepeatableReads.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LockTestRepeatableReads.java	5 Sep 2002 16:58:10 -0000	1.2
  +++ LockTestRepeatableReads.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import junit.framework.TestCase;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.odmg.OJB;
  @@ -46,18 +47,8 @@
       {
           try
           {
  -            try
  -            {
  -                databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                        .getConfigurator()
  -                        .getConfigurationFor(null))
  -                        .getRepositoryFilename();
  -            }
  -            catch (ConfigurationException e)
  -            {
  -                databaseName = "repository.xml";
  -            }
  +            databaseName = TestHelper.DEF_JCD_ALIAS;
  +
               // get facade instance
               Implementation odmg = OJB.getInstance();
               Database db = odmg.newDatabase();
  
  
  
  1.3       +3 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/LockTestSerializable.java
  
  Index: LockTestSerializable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/LockTestSerializable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LockTestSerializable.java	5 Sep 2002 16:58:10 -0000	1.2
  +++ LockTestSerializable.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import junit.framework.TestCase;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.odmg.OJB;
  @@ -46,18 +47,8 @@
       {
           try
           {
  -            try
  -            {
  -                databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                        .getConfigurator()
  -                        .getConfigurationFor(null))
  -                        .getRepositoryFilename();
  -            }
  -            catch (ConfigurationException e)
  -            {
  -                databaseName = "repository.xml";
  -            }
  +            databaseName = TestHelper.DEF_JCD_ALIAS;
  +
               // get facade instance
               Implementation odmg = OJB.getInstance();
               Database db = odmg.newDatabase();
  
  
  
  1.3       +3 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/LockTestUncommitedReads.java
  
  Index: LockTestUncommitedReads.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/LockTestUncommitedReads.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LockTestUncommitedReads.java	5 Sep 2002 16:58:10 -0000	1.2
  +++ LockTestUncommitedReads.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import junit.framework.TestCase;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.odmg.OJB;
  @@ -46,18 +47,8 @@
       {
           try
           {
  -            try
  -            {
  -                databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                        .getConfigurator()
  -                        .getConfigurationFor(null))
  -                        .getRepositoryFilename();
  -            }
  -            catch (ConfigurationException e)
  -            {
  -                databaseName = "repository.xml";
  -            }
  +            databaseName = TestHelper.DEF_JCD_ALIAS;
  +
               // get facade instance
               Implementation odmg = OJB.getInstance();
               Database db = odmg.newDatabase();
  
  
  
  1.3       +21 -31    jakarta-ojb/src/test/org/apache/ojb/odmg/ManyToManyTest.java
  
  Index: ManyToManyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/ManyToManyTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ManyToManyTest.java	25 Jul 2002 12:46:35 -0000	1.2
  +++ ManyToManyTest.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -3,7 +3,7 @@
    * User: Matt
    * Date: Jun 10, 2002
    * Time: 9:22:44 PM
  - * To change template for new class use 
  + * To change template for new class use
    * Code Style | Class Templates options (Tools | IDE Options).
    */
   package org.apache.ojb.odmg;
  @@ -15,6 +15,7 @@
   import org.apache.ojb.broker.Fish;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.Salad;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.odmg.Database;
  @@ -27,7 +28,7 @@
   public class ManyToManyTest extends TestCase
   {
       private String databaseName;
  -    
  +
           /**
        * Insert the method's description here.
        * Creation date: (24.12.2000 00:33:40)
  @@ -43,18 +44,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  @@ -66,7 +56,7 @@
           databaseName = null;
       }
   
  -    
  +
       /**
        * this tests if polymorph collections (i.e. collections of objects
        * implementing a common interface) are treated correctly
  @@ -75,37 +65,37 @@
       {
           ODMGGourmet james = new ODMGGourmet("james");
           ODMGGourmet doris = new ODMGGourmet("doris");
  -        
  +
           Fish tuna = new Fish("tuna", 242, "salt");
           Fish trout = new Fish("trout", 52, "fresh water");
  -        
  +
           Salad radiccio = new Salad("Radiccio", 7, "red");
           Salad lolloverde = new Salad("Lollo verde", 7, "green");
   
           james.addFavoriteFood(tuna);
           james.addFavoriteFood(radiccio);
  -        
  +
           doris.addFavoriteFood(tuna);
           doris.addFavoriteFood(trout);
           doris.addFavoriteFood(lolloverde);
  - 
  - 
  +
  +
          Implementation odmg = OJB.getInstance();
  -        
  -        
  +
  +
           try
           {
               Database db = odmg.newDatabase();
               db.open(databaseName, Database.OPEN_READ_WRITE);
               Transaction tx = odmg.newTransaction();
  -            tx.begin(); 
  +            tx.begin();
               db.makePersistent(james);
               db.makePersistent(doris);
               tx.commit();
  -            
  +
               int dorisId = doris.getGourmetId();
               int jamesId = james.getGourmetId();
  -            
  +
               tx = odmg.newTransaction();
               tx.begin();
               OQLQuery query = odmg.newOQLQuery();
  @@ -118,7 +108,7 @@
               ODMGGourmet loadedDoris = (ODMGGourmet) gourmets.get(0);
               //System.err.println(loadedDoris);
               assertEquals(3, loadedDoris.getFavoriteFood().size());
  -            
  +
               tx.begin();
               query = odmg.newOQLQuery();
               query.create("select gourmets from " + ODMGGourmet.class.getName() +
  @@ -130,17 +120,17 @@
               ODMGGourmet loadedJames = (ODMGGourmet) gourmets.get(0);
               //System.err.println(loadedJames);
               assertEquals(2, loadedJames.getFavoriteFood().size());
  -                       
   
  -            
  -            
  +
  +
  +
           } catch (ODMGException e)
           {
               e.printStackTrace();
               fail("ODMGException thrown " + e.getMessage());
  -        }        
  +        }
   
   
       }
  - 
  +
   }
  
  
  
  1.4       +2 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/AutoIncrementWithRelatedObjectTest.java
  
  Index: AutoIncrementWithRelatedObjectTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/AutoIncrementWithRelatedObjectTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AutoIncrementWithRelatedObjectTest.java	23 Aug 2002 14:15:09 -0000	1.3
  +++ AutoIncrementWithRelatedObjectTest.java	24 Dec 2002 14:07:40 -0000	1.4
  @@ -8,6 +8,7 @@
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.Table_1Object;
   import org.apache.ojb.broker.Table_2Object;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.odmg.Database;
  @@ -98,18 +99,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.5       +5 -15     jakarta-ojb/src/test/org/apache/ojb/odmg/BidirectionalAssociationTest.java
  
  Index: BidirectionalAssociationTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/BidirectionalAssociationTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BidirectionalAssociationTest.java	13 Dec 2002 13:00:48 -0000	1.4
  +++ BidirectionalAssociationTest.java	24 Dec 2002 14:07:40 -0000	1.5
  @@ -9,6 +9,7 @@
   import org.apache.ojb.broker.BidirectionalAssociationObjectB;
   import org.apache.ojb.broker.ManageableCollection;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.odmg.*;
  @@ -237,7 +238,7 @@
            * create at least one A/B
            */
           testCreateWithUpdate();
  -        
  +
           Implementation odmg = OJB.getInstance();
           Database db = odmg.newDatabase();
           db.open(databaseName, Database.OPEN_READ_WRITE);
  @@ -259,7 +260,7 @@
               }
               db.deletePersistent(a);
           }
  -        
  +
           tx.commit();
       }
   
  @@ -292,7 +293,7 @@
               a = b.getRelatedA();
               if (a != null)
               {
  -                tx.lock(a, Transaction.WRITE);          
  +                tx.lock(a, Transaction.WRITE);
                   a.setRelatedB(null);    // break relationship to avoid ri violation
               }
               db.deletePersistent(b);
  @@ -312,18 +313,7 @@
   
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
       /**
        * Insert the method's description here.
  
  
  
  1.5       +3 -13     jakarta-ojb/src/test/org/apache/ojb/odmg/ContractVersionEffectivenessOQLTest.java
  
  Index: ContractVersionEffectivenessOQLTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/ContractVersionEffectivenessOQLTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ContractVersionEffectivenessOQLTest.java	8 Nov 2002 14:01:27 -0000	1.4
  +++ ContractVersionEffectivenessOQLTest.java	24 Dec 2002 14:07:40 -0000	1.5
  @@ -15,6 +15,7 @@
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.RelatedToContract;
   import org.apache.ojb.broker.Version;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.odmg.Database;
  @@ -39,7 +40,7 @@
   	public static void main(String[] args)
   	{
   		String[] arr = { CLASS.getName()};
  -		junit.textui.TestRunner.main(arr); 
  +		junit.textui.TestRunner.main(arr);
   	}
   
       /**
  @@ -48,18 +49,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.3       +4 -6      jakarta-ojb/src/test/org/apache/ojb/odmg/MultiDBUsageTest.java
  
  Index: MultiDBUsageTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/MultiDBUsageTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MultiDBUsageTest.java	24 Nov 2002 13:31:25 -0000	1.2
  +++ MultiDBUsageTest.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -6,6 +6,7 @@
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.Project;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryByCriteria;
  @@ -27,7 +28,7 @@
    */
   public class MultiDBUsageTest extends TestCase
   {
  -    private static String databaseName_2 = "repositoryFarAway.xml";
  +    private static String databaseName_2;
       private String databaseName_1;
       private Implementation odmg_1;
       private Database db_1;
  @@ -42,11 +43,8 @@
       public void setUp() throws Exception
       {
           super.setUp();
  -        databaseName_1 =
  -                ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                .getConfigurator()
  -                .getConfigurationFor(null))
  -                .getRepositoryFilename();
  +        databaseName_1 = TestHelper.DEF_JCD_ALIAS;
  +        databaseName_2 = TestHelper.FAR_AWAY_JCD_ALIAS;
   
           odmg_1 = OJB.getInstance();
           db_1 = odmg_1.newDatabase();
  
  
  
  1.6       +6 -16     jakarta-ojb/src/test/org/apache/ojb/odmg/NamedRoots.java
  
  Index: NamedRoots.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/NamedRoots.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NamedRoots.java	17 Nov 2002 06:27:45 -0000	1.5
  +++ NamedRoots.java	24 Dec 2002 14:07:40 -0000	1.6
  @@ -4,6 +4,7 @@
   import junit.framework.TestCase;
   import org.apache.ojb.broker.Identity;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.odmg.OJB;
  @@ -67,18 +68,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            fail("Could not determine default repository");
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  @@ -148,7 +138,7 @@
               assertTrue(true);
               tx.abort();
           }
  -        
  +
           try
           {
               tx.begin();
  @@ -159,7 +149,7 @@
           {
               fail("Can't unbind " + bindingName + ": "+ex.getMessage());
           }
  -        
  +
           db.close();
       }
   
  @@ -277,7 +267,7 @@
           {
               fail("Can't unbind " + bindingName + ": "+ex.getMessage());
           }
  -        
  +
           db.close();
       }
   
  
  
  
  1.7       +4 -14     jakarta-ojb/src/test/org/apache/ojb/odmg/OdmgExamples.java
  
  Index: OdmgExamples.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/OdmgExamples.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- OdmgExamples.java	8 Dec 2002 13:40:06 -0000	1.6
  +++ OdmgExamples.java	24 Dec 2002 14:07:40 -0000	1.7
  @@ -4,6 +4,7 @@
   import org.apache.ojb.broker.Identity;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.metadata.ClassDescriptor;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
  @@ -50,18 +51,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  @@ -497,7 +487,7 @@
               cld = broker.getClassDescriptor(Article.class);
               tablename = cld.getFullTableName();
               cld.setTableName("ELVIS");
  -            broker.setClassDescriptor(cld);
  +            broker.getDescriptorRepository().setClassDescriptor(cld);
   
               //broker will crash as metadata is corrupt
               a.addToStock(5);
  @@ -511,7 +501,7 @@
           finally
           {
               cld.setTableName(tablename);
  -            broker.setClassDescriptor(cld);
  +            broker.getDescriptorRepository().setClassDescriptor(cld);
           }
   
       }
  
  
  
  1.10      +2 -14     jakarta-ojb/src/test/org/apache/ojb/odmg/ODMGRollbackTest.java
  
  Index: ODMGRollbackTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/ODMGRollbackTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ODMGRollbackTest.java	20 Dec 2002 01:54:59 -0000	1.9
  +++ ODMGRollbackTest.java	24 Dec 2002 14:07:40 -0000	1.10
  @@ -5,6 +5,7 @@
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.Project;
   import org.apache.ojb.broker.Contract;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryByCriteria;
  @@ -500,20 +501,7 @@
   
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            System.err.println("Error while lookup database name, set default db name");
  -            e.printStackTrace();
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       protected void tearDown() throws Exception
  
  
  
  1.3       +14 -24    jakarta-ojb/src/test/org/apache/ojb/odmg/OneToManyTest.java
  
  Index: OneToManyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/OneToManyTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OneToManyTest.java	24 Jul 2002 14:26:55 -0000	1.2
  +++ OneToManyTest.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -22,6 +22,7 @@
   import org.apache.ojb.broker.ProductGroup;
   import org.apache.ojb.broker.ProductGroupProxy;
   import org.apache.ojb.broker.Reptile;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.odmg.Database;
  @@ -59,18 +60,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  @@ -198,33 +188,33 @@
       /**
        * this tests if polymorph collections (i.e. collections of objects
        * implementing a common interface) are treated correctly
  -     */    
  +     */
       public void testPolymorphOneToMany()
       {
  -        
  +
           ODMGZoo myZoo = new ODMGZoo("London");
           Mammal elephant = new Mammal(37,"Jumbo",4);
           Mammal cat = new Mammal(11,"Silvester",4);
           Reptile snake = new Reptile(3,"Kaa","green");
  -        
  +
           myZoo.addAnimal(snake);
           myZoo.addAnimal(elephant);
           myZoo.addAnimal(cat);
  -        
  +
           Implementation odmg = OJB.getInstance();
  -        
  -        
  +
  +
   		try
   		{
   			Database db = odmg.newDatabase();
   			db.open(databaseName, Database.OPEN_READ_WRITE);
   			Transaction tx = odmg.newTransaction();
  -			tx.begin();	
  +			tx.begin();
   			db.makePersistent(myZoo);
   			tx.commit();
  -            
  +
               int id = myZoo.getZooId();
  -            
  +
               tx = odmg.newTransaction();
               tx.begin();
               OQLQuery query = odmg.newOQLQuery();
  @@ -235,8 +225,8 @@
               assertEquals(1, zoos.size());
               ODMGZoo zoo = (ODMGZoo) zoos.get(0);
               assertEquals(3, zoo.getAnimals().size());
  -            
  -            
  +
  +
   		} catch (ODMGException e)
   		{
               e.printStackTrace();
  @@ -245,7 +235,7 @@
   
   
   
  -    }   
  +    }
   
       /**
        * Create an article with 4 product groups related to it in a 1-N relationship
  
  
  
  1.6       +21 -20    jakarta-ojb/src/test/org/apache/ojb/odmg/OneToOneTest.java
  
  Index: OneToOneTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/OneToOneTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- OneToOneTest.java	25 Aug 2002 19:35:54 -0000	1.5
  +++ OneToOneTest.java	24 Dec 2002 14:07:40 -0000	1.6
  @@ -12,6 +12,7 @@
   import junit.framework.TestCase;
   
   import org.apache.ojb.broker.Identity;
  +import org.apache.ojb.broker.TestHelper;
   import org.odmg.ODMGException;
   import org.odmg.OQLQuery;
   import org.odmg.Transaction;
  @@ -20,7 +21,7 @@
   public class OneToOneTest extends TestCase
   {
   	private static Class CLASS = OneToOneTest.class;
  -	private static final String DATABASE_NAME = "repository.xml";
  +	private static final String DATABASE_NAME = TestHelper.DEF_JCD_ALIAS;
   	private org.odmg.Implementation odmg;
   	private org.odmg.Database db;
   
  @@ -48,7 +49,7 @@
       	// get facade instance
           odmg = org.apache.ojb.odmg.OJB.getInstance();
           db = odmg.newDatabase();
  -        
  +
           //open database
           try
           {
  @@ -58,22 +59,22 @@
           catch (org.odmg.ODMGException ex)
           {
               ex.printStackTrace();
  -        }     	
  -    	
  +        }
  +
       	a = new org.apache.ojb.odmg.TestClassA();
       	b = new org.apache.ojb.odmg.TestClassB();
  -    	
  +
       	// init a
       	a.setValue1("A.One");
       	a.setValue2("B.Two");
       	a.setValue3(3);
       	a.setB(b);
  -    	
  +
       	// init b
       	b.setValue1("B.One");
       	b.setA(a);
       }
  -    
  +
       public void testSave()
       {
           org.odmg.Transaction tx = odmg.newTransaction();
  @@ -85,10 +86,10 @@
           assertTrue(a.getOid() != null);
           assertTrue(b.getOid() != null);
       }
  -    
  +
       public void testRead()
       {
  -    	
  +
       }
       /**
        * This method tests the correct assignment of a foreign
  @@ -104,14 +105,14 @@
               //get a dynamic proxy object
               TestClassBProxy b = new TestClassBProxy();
               new Identity(b);
  - 
  -        
  +
  +
               Transaction tx = odmg.newTransaction();
  -            tx.begin(); 
  +            tx.begin();
               tx.lock(b, tx.WRITE);
               tx.commit();
               String bOid = b.getOid();
  -            
  +
               //reload the object created in the previous step
               tx = odmg.newTransaction();
               tx.begin();
  @@ -121,23 +122,23 @@
               query.bind(bOid);
               List bList = (List) query.execute();
               assertEquals(1, bList.size());
  -            
  -            TestClassBProxyI bI = (TestClassBProxyI) bList.get(0);            
  -            
  +
  +            TestClassBProxyI bI = (TestClassBProxyI) bList.get(0);
  +
               //bI should now be a dynamic proxy
               assertTrue(bI instanceof Proxy);
  -            
  +
               TestClassAWithBProxy a = new TestClassAWithBProxy();
               a.setBProxy(bI);
               tx.lock(a, tx.WRITE);
               tx.commit();
  -            
  +
               //on commit the foreign key in "a" should have been set to
               //bOid
               assertEquals("foreign key should match", bOid, a.getBoid());
  -            
  +
           } catch(ODMGException ex) {
  -          fail("ODMGException" + ex);   
  +          fail("ODMGException" + ex);
           }
       }
   }
  
  
  
  1.6       +2 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/OQLTest.java
  
  Index: OQLTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/OQLTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- OQLTest.java	30 Oct 2002 19:44:36 -0000	1.5
  +++ OQLTest.java	24 Dec 2002 14:07:40 -0000	1.6
  @@ -21,6 +21,7 @@
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.Reptile;
   import org.apache.ojb.broker.Salad;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.odmg.Database;
  @@ -49,18 +50,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.6       +2 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/PerformanceTest.java
  
  Index: PerformanceTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/PerformanceTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PerformanceTest.java	21 Dec 2002 16:47:27 -0000	1.5
  +++ PerformanceTest.java	24 Dec 2002 14:07:40 -0000	1.6
  @@ -6,6 +6,7 @@
   import org.apache.ojb.broker.PerformanceArticle;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.broker.util.logging.Logger;
  @@ -94,18 +95,7 @@
        */
       public void setUp() throws PBFactoryException
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
           broker = PersistenceBrokerFactory.defaultPersistenceBroker();
           arr = new PerformanceArticle[articleCount];
           for (int i = 0; i < articleCount; i++)
  
  
  
  1.3       +2 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/ProjectionAttributeTest.java
  
  Index: ProjectionAttributeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/ProjectionAttributeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProjectionAttributeTest.java	23 Aug 2002 14:15:09 -0000	1.2
  +++ ProjectionAttributeTest.java	24 Dec 2002 14:07:40 -0000	1.3
  @@ -11,6 +11,7 @@
   import junit.framework.TestCase;
   import org.apache.ojb.broker.ManageableCollection;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.odmg.Database;
  @@ -36,18 +37,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.2       +2 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/ProxyTest.java
  
  Index: ProxyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/ProxyTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProxyTest.java	20 Jun 2002 17:07:53 -0000	1.1
  +++ ProxyTest.java	24 Dec 2002 14:07:40 -0000	1.2
  @@ -3,6 +3,7 @@
   
   import junit.framework.TestCase;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.odmg.OJB;
  @@ -38,18 +39,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.6       +2 -12     jakarta-ojb/src/test/org/apache/ojb/odmg/RITest.java
  
  Index: RITest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/RITest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RITest.java	17 Nov 2002 09:56:37 -0000	1.5
  +++ RITest.java	24 Dec 2002 14:07:40 -0000	1.6
  @@ -5,6 +5,7 @@
   import org.apache.ojb.broker.Identity;
   import org.apache.ojb.broker.ManageableCollection;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.odmg.DList;
  @@ -39,18 +40,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  
  
  
  1.13      +4 -14     jakarta-ojb/src/test/org/apache/ojb/odmg/ScrollableQueryResultsTest.java
  
  Index: ScrollableQueryResultsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/ScrollableQueryResultsTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ScrollableQueryResultsTest.java	29 Nov 2002 13:54:36 -0000	1.12
  +++ ScrollableQueryResultsTest.java	24 Dec 2002 14:07:40 -0000	1.13
  @@ -4,6 +4,7 @@
   import org.apache.ojb.broker.ManageableCollection;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
  @@ -42,18 +43,7 @@
        */
       public void setUp()
       {
  -        try
  -        {
  -            databaseName =
  -                    ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
       }
   
       /**
  @@ -349,7 +339,7 @@
   
               Connection conn =
                       broker
  -                    .getConnectionManager()
  +                    .serviceConnectionManager()
                       .getConnection();
               /**
                * only execute this test if scrolling is supported.
  
  
  
  1.2       +2 -13     jakarta-ojb/src/test/org/apache/ojb/odmg/TestThreadsNLocks.java
  
  Index: TestThreadsNLocks.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/odmg/TestThreadsNLocks.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestThreadsNLocks.java	20 Jun 2002 17:07:53 -0000	1.1
  +++ TestThreadsNLocks.java	24 Dec 2002 14:07:40 -0000	1.2
  @@ -1,6 +1,7 @@
   package org.apache.ojb.odmg;
   
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
   import org.apache.ojb.odmg.OJB;
  @@ -24,19 +25,7 @@
   
   	static
   	{
  -        try
  -        {
  -            databaseName =
  -                ((PersistenceBrokerConfiguration) PersistenceBrokerFactory
  -                    .getConfigurator()
  -                    .getConfigurationFor(null))
  -                    .getRepositoryFilename();
  -        }
  -        catch (ConfigurationException e)
  -        {
  -            databaseName = "repository.xml";
  -        }
  -	    
  +        databaseName = TestHelper.DEF_JCD_ALIAS;
   	}
   
       /**
  
  
  

Mime
View raw message