db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker/sequence NativeIdentifierTest.java SequenceManagerTest.java
Date Tue, 14 Sep 2004 16:43:49 GMT
arminw      2004/09/14 09:43:49

  Modified:    src/java/org/apache/ojb/dirty DelegatingDirtyBroker.java
               src/test/org/apache/ojb/broker/cache ObjectCacheTest.java
               src/test/org/apache/ojb/broker/metadata/torque
                        TableDescriptorTest.java
                        TorqueRepositoryGeneratorTest.java
                        TorqueTableGeneratorTest.java
               src/test/org/apache/ojb/broker/metadata
                        CustomAttributesTest.java MetadataTest.java
                        ReadonlyTest.java ReferenceMapTest.java
                        RepositoryElementsTest.java
                        RepositoryPersistorTest.java
                        RuntimeConfigurationTest.java
               src/test/org/apache/ojb/broker/sequence
                        NativeIdentifierTest.java SequenceManagerTest.java
  Log:
  - add new batch handling
  - update/refactoring Statement classes
  - add new PB.update(Object obj, String[] fields)
  - change insert order of m:n relations
  - change repository.dtd, add element 'batch', rename element
  'connection-pool' to 'connection-factory', remove implementation
  dependent attributes and add custom-attributes instead
  - remove unused classes
  
  Revision  Changes    Path
  1.3       +3 -280    db-ojb/src/java/org/apache/ojb/dirty/DelegatingDirtyBroker.java
  
  Index: DelegatingDirtyBroker.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/dirty/DelegatingDirtyBroker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DelegatingDirtyBroker.java	27 Aug 2004 01:14:55 -0000	1.2
  +++ DelegatingDirtyBroker.java	14 Sep 2004 16:43:48 -0000	1.3
  @@ -15,297 +15,20 @@
   package org.apache.ojb.dirty;
   
   import org.apache.ojb.broker.PersistenceBroker;
  -import org.apache.ojb.broker.IdentityFactory;
  -import org.apache.ojb.broker.PersistenceBrokerEvent;
  -import org.apache.ojb.broker.PBLifeCycleEvent;
  -import org.apache.ojb.broker.PBStateEvent;
  -import org.apache.ojb.broker.PersistenceBrokerException;
  -import org.apache.ojb.broker.PBListener;
  -import org.apache.ojb.broker.TransactionNotInProgressException;
  -import org.apache.ojb.broker.TransactionInProgressException;
  -import org.apache.ojb.broker.TransactionAbortedException;
  -import org.apache.ojb.broker.PBKey;
  -import org.apache.ojb.broker.PersistenceConfiguration;
  -import org.apache.ojb.broker.MtoNImplementor;
  -import org.apache.ojb.broker.ManageableCollection;
  -import org.apache.ojb.broker.Identity;
  -import org.apache.ojb.broker.query.Query;
  -import org.apache.ojb.broker.metadata.DescriptorRepository;
  -import org.apache.ojb.broker.metadata.ClassDescriptor;
  -import org.apache.ojb.broker.cache.ObjectCache;
  -import org.apache.ojb.broker.util.sequence.SequenceManager;
  -import org.apache.ojb.broker.util.BrokerHelper;
  -import org.apache.ojb.broker.util.ObjectModification;
  -import org.apache.ojb.broker.util.configuration.Configuration;
  -import org.apache.ojb.broker.util.configuration.ConfigurationException;
  -import org.apache.ojb.broker.accesslayer.StatementManagerIF;
  -import org.apache.ojb.broker.accesslayer.ConnectionManagerIF;
  -import org.apache.ojb.broker.accesslayer.JdbcAccess;
  -import org.apache.ojb.broker.accesslayer.OJBIterator;
  -import org.apache.ojb.broker.accesslayer.sql.SqlGenerator;
  -import org.apache.commons.grafolia.Unit;
  +import org.apache.ojb.broker.core.DelegatingPersistenceBroker;
   
  -import java.util.Collection;
  -import java.util.Enumeration;
  -
  -public class DelegatingDirtyBroker implements DirtyPersistenceBroker
  +public class DelegatingDirtyBroker extends DelegatingPersistenceBroker implements DirtyPersistenceBroker
   {
       private final ObjectTransaction tx;
  -    private final PersistenceBroker base;
   
       public DelegatingDirtyBroker(final ObjectTransaction tx, final PersistenceBroker base)
       {
  +        super(base);
           this.tx = tx;
  -        this.base = base;
       }
   
       public ObjectTransaction getObjectTransaction()
       {
           return tx;
  -    }
  -
  -    public StatementManagerIF serviceStatementManager()
  -    {
  -        return base.serviceStatementManager();
  -    }
  -
  -    public ConnectionManagerIF serviceConnectionManager()
  -    {
  -        return base.serviceConnectionManager();
  -    }
  -
  -    public SqlGenerator serviceSqlGenerator()
  -    {
  -        return base.serviceSqlGenerator();
  -    }
  -
  -    public JdbcAccess serviceJdbcAccess()
  -    {
  -        return base.serviceJdbcAccess();
  -    }
  -
  -    public SequenceManager serviceSequenceManager()
  -    {
  -        return base.serviceSequenceManager();
  -    }
  -
  -    public BrokerHelper serviceBrokerHelper()
  -    {
  -        return base.serviceBrokerHelper();
  -    }
  -
  -    public ObjectCache serviceObjectCache()
  -    {
  -        return base.serviceObjectCache();
  -    }
  -
  -    public IdentityFactory serviceIdentity()
  -    {
  -        return base.serviceIdentity();
  -    }
  -
  -    public void fireBrokerEvent(final PersistenceBrokerEvent event)
  -    {
  -        base.fireBrokerEvent(event);
  -    }
  -
  -    public void fireBrokerEvent(final PBLifeCycleEvent event)
  -    {
  -        base.fireBrokerEvent(event);
  -    }
  -
  -    public void fireBrokerEvent(final PBStateEvent event)
  -    {
  -        base.fireBrokerEvent(event);
  -    }
  -
  -    public void removeAllListeners() throws PersistenceBrokerException
  -    {
  -        base.removeAllListeners();
  -    }
  -
  -    public void removeAllListeners(final boolean permanent) throws PersistenceBrokerException
  -    {
  -        base.removeAllListeners(permanent);
  -    }
  -
  -    public void addListener(final PBListener listener) throws PersistenceBrokerException
  -    {
  -        base.addListener(listener);
  -    }
  -
  -    public void addListener(final PBListener listener, final boolean permanent) throws
PersistenceBrokerException
  -    {
  -        base.addListener(listener, permanent);
  -    }
  -
  -    public void removeListener(final PBListener listener) throws PersistenceBrokerException
  -    {
  -        base.removeListener(listener);
  -    }
  -
  -    public void abortTransaction() throws TransactionNotInProgressException
  -    {
  -        base.abortTransaction();
  -    }
  -
  -    public void beginTransaction()
  -            throws TransactionInProgressException, TransactionAbortedException
  -    {
  -        base.beginTransaction();
  -    }
  -
  -    public void commitTransaction()
  -            throws TransactionNotInProgressException, TransactionAbortedException
  -    {
  -        base.commitTransaction();
  -    }
  -
  -    public boolean isInTransaction() throws PersistenceBrokerException
  -    {
  -        return base.isInTransaction();
  -    }
  -
  -    public boolean close()
  -    {
  -        return base.close();
  -    }
  -
  -    public boolean isClosed()
  -    {
  -        return base.isClosed();
  -    }
  -
  -    public DescriptorRepository getDescriptorRepository()
  -    {
  -        return base.getDescriptorRepository();
  -    }
  -
  -    public PBKey getPBKey()
  -    {
  -        return base.getPBKey();
  -    }
  -
  -    public ClassDescriptor getClassDescriptor(Class clazz) throws PersistenceBrokerException
  -    {
  -        return base.getClassDescriptor(clazz);
  -    }
  -
  -    public boolean hasClassDescriptor(Class clazz)
  -    {
  -        return base.hasClassDescriptor(clazz);
  -    }
  -
  -    public Class getTopLevelClass(Class clazz) throws PersistenceBrokerException
  -    {
  -        return base.getTopLevelClass(clazz);
  -    }
  -
  -    public PersistenceConfiguration getConfiguration()
  -    {
  -        return base.getConfiguration();
  -    }
  -
  -    public void clearCache() throws PersistenceBrokerException
  -    {
  -        base.clearCache();
  -    }
  -
  -    public void removeFromCache(Object objectOrIdentity) throws PersistenceBrokerException
  -    {
  -        base.removeFromCache(objectOrIdentity);
  -    }
  -
  -    public void store(Object obj,
  -                      final ObjectModification modification) throws PersistenceBrokerException
  -    {
  -        base.store(obj, modification);
  -    }
  -
  -    public void store(Object obj) throws PersistenceBrokerException
  -    {
  -        base.store(obj);
  -    }
  -
  -    public void delete(Object obj) throws PersistenceBrokerException
  -    {
  -        base.delete(obj);
  -    }
  -
  -    public void deleteMtoNImplementor(final MtoNImplementor m2nImpl) throws PersistenceBrokerException
  -    {
  -        base.deleteMtoNImplementor(m2nImpl);
  -    }
  -
  -    public void addMtoNImplementor(MtoNImplementor m2nImpl) throws PersistenceBrokerException
  -    {
  -        base.addMtoNImplementor(m2nImpl);
  -    }
  -
  -    public void deleteByQuery(Query query) throws PersistenceBrokerException
  -    {
  -        base.deleteByQuery(query);
  -    }
  -
  -    public void retrieveAllReferences(Object pInstance) throws PersistenceBrokerException
  -    {
  -        base.retrieveAllReferences(pInstance);
  -    }
  -
  -    public void retrieveReference(Object pInstance, String pAttributeName) throws PersistenceBrokerException
  -    {
  -        base.retrieveReference(pInstance, pAttributeName);
  -    }
  -
  -    public int getCount(Query query) throws PersistenceBrokerException
  -    {
  -        return base.getCount(query);
  -    }
  -
  -    public Collection getCollectionByQuery(Query query) throws PersistenceBrokerException
  -    {
  -        return base.getCollectionByQuery(query);
  -    }
  -
  -    public ManageableCollection getCollectionByQuery(Class collectionClass, Query query)
  -            throws PersistenceBrokerException
  -    {
  -        return base.getCollectionByQuery(collectionClass, query);
  -    }
  -
  -    public OJBIterator getIteratorByQuery(Query query) throws PersistenceBrokerException
  -    {
  -        return base.getIteratorByQuery(query);
  -    }
  -
  -    public OJBIterator getReportQueryIteratorByQuery(Query query) throws PersistenceBrokerException
  -    {
  -        return base.getReportQueryIteratorByQuery(query);
  -    }
  -
  -    public Object getObjectByIdentity(Identity id) throws PersistenceBrokerException
  -    {
  -        return base.getObjectByIdentity(id);
  -    }
  -
  -    public Object getObjectByQuery(Query query) throws PersistenceBrokerException
  -    {
  -        return base.getObjectByQuery(query);
  -    }
  -
  -    public Enumeration getPKEnumerationByQuery(Class PrimaryKeyClass, Query query)
  -            throws PersistenceBrokerException
  -    {
  -        return base.getPKEnumerationByQuery(PrimaryKeyClass, query);
  -    }
  -
  -    public void configure(Configuration pConfig) throws ConfigurationException
  -    {
  -        base.configure(pConfig);
  -    }
  -
  -    public org.odbms.Query query()
  -    {
  -        return base.query();
       }
   }
  
  
  
  1.3       +4 -7      db-ojb/src/test/org/apache/ojb/broker/cache/ObjectCacheTest.java
  
  Index: ObjectCacheTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/cache/ObjectCacheTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ObjectCacheTest.java	11 Aug 2004 00:39:42 -0000	1.2
  +++ ObjectCacheTest.java	14 Sep 2004 16:43:48 -0000	1.3
  @@ -3,16 +3,12 @@
   import java.io.Serializable;
   import java.util.Properties;
   
  -import org.apache.ojb.broker.Article;
   import org.apache.ojb.broker.Identity;
  -import org.apache.ojb.broker.InterfaceArticle;
   import org.apache.ojb.broker.PBKey;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.PersistenceConfiguration;
  -import org.apache.ojb.broker.PBFactoryException;
  -import org.apache.ojb.broker.PersistenceBrokerException;
   import org.apache.ojb.broker.core.PersistenceBrokerImpl;
   import org.apache.ojb.broker.core.DelegatingPersistenceBroker;
   import org.apache.ojb.broker.metadata.ConnectionRepository;
  @@ -20,7 +16,6 @@
   import org.apache.ojb.broker.metadata.ObjectCacheDescriptor;
   import org.apache.ojb.broker.query.QueryByIdentity;
   import org.apache.ojb.broker.sequence.Repository;
  -import org.apache.ojb.broker.util.GUID;
   import org.apache.ojb.broker.util.configuration.impl.OjbConfiguration;
   import org.apache.ojb.broker.util.configuration.impl.OjbConfigurator;
   import org.apache.ojb.junit.PBTestCase;
  @@ -355,8 +350,10 @@
            * enable per class and per package out-filtering of objects.
            * @throws Exception
            */
  -        public void XXXtestCacheFilterFunctions() throws Exception
  +        public void testCacheFilterFunctions() throws Exception
           {
  +            if(ojbSkipKnownIssueProblem("TODO: needs implementation or remove feature"))
return;
  +            
               getConfig().setCacheFilters(cacheFilter);
               ojb.getMetadataManager().getRepository().
                       addAttribute(CacheFilterPackageImpl.EXCLUDE_PACKAGES, EXCLUDE_PACKAGE);
  
  
  
  1.4       +0 -2      db-ojb/src/test/org/apache/ojb/broker/metadata/torque/TableDescriptorTest.java
  
  Index: TableDescriptorTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/torque/TableDescriptorTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TableDescriptorTest.java	11 Aug 2004 00:39:43 -0000	1.3
  +++ TableDescriptorTest.java	14 Sep 2004 16:43:48 -0000	1.4
  @@ -1,11 +1,9 @@
   package org.apache.ojb.broker.metadata.torque;
   
   import junit.framework.Test;
  -import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
   import org.apache.ojb.broker.metadata.FieldDescriptor;
  -import org.apache.ojb.broker.metadata.torque.TableDescriptor;
   import org.apache.ojb.junit.OJBTestCase;
   
   import java.util.Vector;
  
  
  
  1.4       +4 -6      db-ojb/src/test/org/apache/ojb/broker/metadata/torque/TorqueRepositoryGeneratorTest.java
  
  Index: TorqueRepositoryGeneratorTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/torque/TorqueRepositoryGeneratorTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TorqueRepositoryGeneratorTest.java	11 Aug 2004 00:39:43 -0000	1.3
  +++ TorqueRepositoryGeneratorTest.java	14 Sep 2004 16:43:48 -0000	1.4
  @@ -1,17 +1,15 @@
   package org.apache.ojb.broker.metadata.torque;
   
  +import java.io.File;
  +import java.io.FileReader;
  +
   import junit.framework.Test;
  -import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.metadata.DescriptorRepository;
   import org.apache.ojb.broker.metadata.RepositoryPersistor;
  -import org.apache.ojb.broker.metadata.torque.TorqueRepositoryGenerator;
  -import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.junit.OJBTestCase;
  -
  -import java.io.File;
  -import java.io.FileReader;
   
   public class TorqueRepositoryGeneratorTest extends OJBTestCase {
   
  
  
  
  1.5       +1 -4      db-ojb/src/test/org/apache/ojb/broker/metadata/torque/TorqueTableGeneratorTest.java
  
  Index: TorqueTableGeneratorTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/torque/TorqueTableGeneratorTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TorqueTableGeneratorTest.java	11 Aug 2004 00:39:43 -0000	1.4
  +++ TorqueTableGeneratorTest.java	14 Sep 2004 16:43:48 -0000	1.5
  @@ -1,16 +1,13 @@
   package org.apache.ojb.broker.metadata.torque;
   
   import junit.framework.Test;
  -import junit.framework.TestCase;
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
  +import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.metadata.ClassDescriptor;
   import org.apache.ojb.broker.metadata.DescriptorRepository;
   import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.metadata.RepositoryPersistor;
  -import org.apache.ojb.broker.metadata.torque.TableDescriptor;
  -import org.apache.ojb.broker.metadata.torque.TorqueTableGenerator;
  -import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.junit.OJBTestCase;
   
   public class TorqueTableGeneratorTest extends OJBTestCase {
  
  
  
  1.7       +0 -2      db-ojb/src/test/org/apache/ojb/broker/metadata/CustomAttributesTest.java
  
  Index: CustomAttributesTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/CustomAttributesTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CustomAttributesTest.java	11 Aug 2004 00:39:43 -0000	1.6
  +++ CustomAttributesTest.java	14 Sep 2004 16:43:48 -0000	1.7
  @@ -1,7 +1,5 @@
   package org.apache.ojb.broker.metadata;
   
  -import junit.framework.TestCase;
  -
   import org.apache.ojb.broker.Article;
   import org.apache.ojb.broker.PBKey;
   import org.apache.ojb.junit.OJBTestCase;
  
  
  
  1.18      +47 -58    db-ojb/src/test/org/apache/ojb/broker/metadata/MetadataTest.java
  
  Index: MetadataTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/MetadataTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- MetadataTest.java	11 Aug 2004 00:39:44 -0000	1.17
  +++ MetadataTest.java	14 Sep 2004 16:43:48 -0000	1.18
  @@ -2,7 +2,6 @@
   
   import java.util.Iterator;
   
  -import junit.framework.TestCase;
   import org.apache.ojb.broker.Identity;
   import org.apache.ojb.broker.ObjectRepository;
   import org.apache.ojb.broker.PBKey;
  @@ -10,15 +9,17 @@
   import org.apache.ojb.broker.PersistenceBrokerException;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.TestHelper;
  +import org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl;
   import org.apache.ojb.broker.cache.ObjectCacheDefaultImpl;
   import org.apache.ojb.broker.cache.ObjectCacheEmptyImpl;
  +import org.apache.ojb.broker.cache.CacheStrategyEmptyImpl;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryFactory;
   import org.apache.ojb.broker.sequence.Repository;
  -import org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl;
  -import org.apache.ojb.odmg.OJB;
  +import org.apache.ojb.broker.util.sequence.SequenceManagerInMemoryImpl;
   import org.apache.ojb.junit.OJBTestCase;
  +import org.apache.ojb.odmg.OJB;
   import org.odmg.Database;
   import org.odmg.Implementation;
   import org.odmg.OQLQuery;
  @@ -389,49 +390,49 @@
           /* descriptor snip
   
           <jdbc-connection-descriptor
  -        jcd-alias="testConnection"
  -        default-connection="false"
  -        platform="Oracle"
  -        jdbc-level="1.0"
  -        driver="a driver"
  -        protocol="a protocol"
  -        subprotocol="a subprotocol"
  -        dbalias="myDbalias"
  -        username="a user"
  -        password="a password"
  -        eager-release="true"
  -        batch-mode="true"
  -        useAutoCommit="0"
  -        ignoreAutoCommitExceptions="true"
  +        jcd-alias="runtime_2"
  +        platform="Hsqldb"
  +        jdbc-level="2.0"
  +        driver="org.hsqldb.jdbcDriver"
  +        protocol="jdbc"
  +        subprotocol="hsqldb"
  +        dbalias="../OJB_FarAway"
  +        username="sa"
  +        password=""
  +        batch-mode="false"
       >
   
  -        <object-cache class="org.apache.ojb.broker.cache.ObjectCacheEmptyImpl">
  -            <attribute attribute-name="cacheKey1" attribute-value="cacheValue1"/>
  -            <attribute attribute-name="cacheKey2" attribute-value="cacheValue2"/>
  +        <object-cache class="org.apache.ojb.broker.cache.ObjectCacheEmptyImpl"
  +            strategy="org.apache.ojb.broker.cache.CacheStrategyEmptyImpl"
  +        >
  +            <attribute attribute-name="attr_con" attribute-value="555"/>
           </object-cache>
   
  -        <connection-pool
  -            maxActive="1"
  -            maxIdle="2"
  -            maxWait="3"
  -            minEvictableIdleTimeMillis="4"
  -            numTestsPerEvictionRun="5"
  -            testOnBorrow="true"
  -            testOnReturn="true"
  -            testWhileIdle="true"
  -            timeBetweenEvictionRunsMillis="6"
  -            whenExhaustedAction="2"
  -            validationQuery="a query"
  -            logAbandoned="true"
  -            removeAbandoned="true"
  -            removeAbandonedTimeout="8"
  -        />
  -
  -        <sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
  -            <attribute attribute-name="key1" attribute-value="value1"/>
  -            <attribute attribute-name="key2" attribute-value="value2"/>
  +        <connection-factory
  +            class="org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl"
  +            validationQuery="select count(*) from OJB_HL_SEQ"
  +        >
  +            <attribute attribute-name="maxActive" attribute-value="5"/>
  +            <attribute attribute-name="whenExhaustedAction" attribute-value="0"/>
  +        </connection-factory>
  +
  +        <sequence-manager class="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
  +            <attribute attribute-name="grabSize" attribute-value="5"/>
           </sequence-manager>
  +
  +        <!-- add some custom attributes -->
  +        <attribute
  +            attribute-name="attribute-connection-1"
  +            attribute-value="attribute-connection-test-value-1">
  +        </attribute>
  +
  +        <attribute
  +            attribute-name="attribute-connection-2"
  +            attribute-value="attribute-connection-test-value-2">
  +        </attribute>
  +
       </jdbc-connection-descriptor>
  +
           */
           // don't set it to true!!! This may break everything (2 default connections)
           assertEquals(false, jcd.isDefaultConnection());
  @@ -458,8 +459,6 @@
           assertNotNull(jcd.getPassWord());
           assertEquals("a password", jcd.getPassWord());
   
  -        assertEquals(true, jcd.getEagerRelease());
  -
           assertEquals(true, jcd.getBatchMode());
   
           assertEquals(0, jcd.getUseAutoCommit());
  @@ -468,33 +467,23 @@
           ObjectCacheDescriptor ocd = jcd.getObjectCacheDescriptor();
           assertNotNull(ocd);
           assertNotNull(ocd.getObjectCache());
  -        assertEquals(ocd.getObjectCache(), ObjectCacheEmptyImpl.class);
  +        assertEquals(ObjectCacheEmptyImpl.class, ocd.getObjectCache());
  +        assertNotNull(ocd.getCacheStrategy());
  +        assertEquals(CacheStrategyEmptyImpl.class, ocd.getCacheStrategy());
           assertNotNull(ocd.getAttribute("cacheKey1"));
           assertNotNull(ocd.getAttribute("cacheKey2"));
           assertEquals("cacheValue1", ocd.getAttribute("cacheKey1"));
           assertEquals("cacheValue2", ocd.getAttribute("cacheKey2"));
   
           ConnectionPoolDescriptor cpd = jcd.getConnectionPoolDescriptor();
  -        assertEquals(1, cpd.getMaxActive());
  -        assertEquals(2, cpd.getMaxIdle());
  -        assertEquals(3, cpd.getMaxWait());
  -        assertEquals(4, cpd.getMinEvictableIdleTimeMillis());
  -        assertEquals(5, cpd.getNumTestsPerEvictionRun());
  -        assertEquals(true, cpd.isTestOnBorrow());
  -        assertEquals(true, cpd.isTestOnReturn());
  -        assertEquals(true, cpd.isTestWhileIdle());
  -        assertEquals(6, cpd.getTimeBetweenEvictionRunsMillis());
  -        assertEquals(2, cpd.getWhenExhaustedAction());
   
  +        assertNotNull(cpd.getConnectionFactory());
  +        assertEquals(ConnectionFactoryNotPooledImpl.class, cpd.getConnectionFactory());
           assertNotNull(cpd.getValidationQuery());
           assertEquals("a query", cpd.getValidationQuery());
   
  -        assertEquals(true, cpd.isLogAbandoned());
  -        assertEquals(true, cpd.isRemoveAbandoned());
  -        assertEquals(8, cpd.getRemoveAbandonedTimeout());
  -
           SequenceDescriptor seq = jcd.getSequenceDescriptor();
  -        assertEquals(SequenceManagerHighLowImpl.class.getName(), seq.getSequenceManagerClass().getName());
  +        assertEquals(SequenceManagerInMemoryImpl.class.getName(), seq.getSequenceManagerClass().getName());
   
           assertNotNull(seq.getAttribute("key1"));
           assertEquals("value1", seq.getAttribute("key1"));
  
  
  
  1.3       +1 -6      db-ojb/src/test/org/apache/ojb/broker/metadata/ReadonlyTest.java
  
  Index: ReadonlyTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/ReadonlyTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReadonlyTest.java	11 Aug 2004 00:39:44 -0000	1.2
  +++ ReadonlyTest.java	14 Sep 2004 16:43:48 -0000	1.3
  @@ -1,10 +1,5 @@
   package org.apache.ojb.broker.metadata;
   
  -import junit.framework.TestCase;
  -import org.apache.ojb.broker.PersistenceBroker;
  -import org.apache.ojb.broker.PBFactoryException;
  -import org.apache.ojb.broker.PersistenceBrokerFactory;
  -import org.apache.ojb.broker.PersistenceBrokerException;
   import org.apache.ojb.broker.Identity;
   import org.apache.ojb.junit.PBTestCase;
   
  
  
  
  1.3       +0 -1      db-ojb/src/test/org/apache/ojb/broker/metadata/ReferenceMapTest.java
  
  Index: ReferenceMapTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/ReferenceMapTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReferenceMapTest.java	11 Aug 2004 00:39:44 -0000	1.2
  +++ ReferenceMapTest.java	14 Sep 2004 16:43:48 -0000	1.3
  @@ -1,6 +1,5 @@
   package org.apache.ojb.broker.metadata;
   
  -import junit.framework.TestCase;
   import org.apache.ojb.broker.util.ReferenceMap;
   import org.apache.ojb.junit.OJBTestCase;
   
  
  
  
  1.3       +0 -1      db-ojb/src/test/org/apache/ojb/broker/metadata/RepositoryElementsTest.java
  
  Index: RepositoryElementsTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/RepositoryElementsTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RepositoryElementsTest.java	11 Aug 2004 00:39:44 -0000	1.2
  +++ RepositoryElementsTest.java	14 Sep 2004 16:43:48 -0000	1.3
  @@ -1,7 +1,6 @@
   package org.apache.ojb.broker.metadata;
   
   import junit.framework.Test;
  -import junit.framework.TestCase;
   import junit.framework.TestSuite;
   
   import java.lang.reflect.Field;
  
  
  
  1.14      +0 -1      db-ojb/src/test/org/apache/ojb/broker/metadata/RepositoryPersistorTest.java
  
  Index: RepositoryPersistorTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/RepositoryPersistorTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- RepositoryPersistorTest.java	11 Aug 2004 00:39:44 -0000	1.13
  +++ RepositoryPersistorTest.java	14 Sep 2004 16:43:48 -0000	1.14
  @@ -3,7 +3,6 @@
   import java.util.Iterator;
   import java.io.FileOutputStream;
   
  -import junit.framework.TestCase;
   import org.apache.ojb.broker.TestHelper;
   import org.apache.ojb.broker.PBKey;
   import org.apache.ojb.junit.OJBTestCase;
  
  
  
  1.6       +1 -2      db-ojb/src/test/org/apache/ojb/broker/metadata/RuntimeConfigurationTest.java
  
  Index: RuntimeConfigurationTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/RuntimeConfigurationTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RuntimeConfigurationTest.java	11 Aug 2004 00:39:44 -0000	1.5
  +++ RuntimeConfigurationTest.java	14 Sep 2004 16:43:48 -0000	1.6
  @@ -1,6 +1,5 @@
   package org.apache.ojb.broker.metadata;
   
  -import junit.framework.TestCase;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.ObjectRepository;
  
  
  
  1.15      +5 -5      db-ojb/src/test/org/apache/ojb/broker/sequence/NativeIdentifierTest.java
  
  Index: NativeIdentifierTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/sequence/NativeIdentifierTest.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- NativeIdentifierTest.java	11 Aug 2004 00:39:44 -0000	1.14
  +++ NativeIdentifierTest.java	14 Sep 2004 16:43:49 -0000	1.15
  @@ -277,7 +277,7 @@
           changeAutoSetting(MainObject.class, "allReferences", true, true, true, false);
           changeAutoSetting(CollectionReference.class, "singleReference", true, true, true,
false);
           changeAutoSetting(SingleReference.class, "mainObject", true, true, true, false);
  -        doTtestSimpleInsert();
  +        doTestSimpleInsert();
       }
   
       public void testSimpleInsert_2() throws Exception
  @@ -287,10 +287,10 @@
           changeAutoSetting(MainObject.class, "allReferences", true, true, true, true);
           changeAutoSetting(CollectionReference.class, "singleReference", true, true, true,
true);
           changeAutoSetting(SingleReference.class, "mainObject", true, true, true, true);
  -        doTtestSimpleInsert();
  +        doTestSimpleInsert();
       }
   
  -    public void doTtestSimpleInsert() throws Exception
  +    public void doTestSimpleInsert() throws Exception
       {
           if (skipTest()) return;
   
  @@ -901,7 +901,7 @@
           assertEquals(0, result_2);
       }
   
  -//    public void XXXtestAllInOne() throws Exception
  +//    public void testAllInOne() throws Exception
   //    {
   //        // sleep thread to make timestamp based tests work
   //        testSimpleInsert();
  
  
  
  1.28      +1 -2      db-ojb/src/test/org/apache/ojb/broker/sequence/SequenceManagerTest.java
  
  Index: SequenceManagerTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/sequence/SequenceManagerTest.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- SequenceManagerTest.java	11 Aug 2004 00:39:44 -0000	1.27
  +++ SequenceManagerTest.java	14 Sep 2004 16:43:49 -0000	1.28
  @@ -1,6 +1,5 @@
   package org.apache.ojb.broker.sequence;
   
  -import junit.framework.TestCase;
   import org.apache.commons.lang.SerializationUtils;
   import org.apache.ojb.broker.*;
   import org.apache.ojb.broker.metadata.ClassDescriptor;
  
  
  

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