db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r495673 [2/2] - in /db/ojb/trunk/src: schema/ test/org/apache/ojb/ test/org/apache/ojb/broker/ test/org/apache/ojb/broker/cache/ test/org/apache/ojb/broker/lob/ test/org/apache/ojb/broker/metadata/ test/org/apache/ojb/broker/sequence/ test/...
Date Fri, 12 Jan 2007 18:13:11 GMT
Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/lob/LOBTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/lob/LOBTest.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/lob/LOBTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/lob/LOBTest.java Fri Jan 12 10:13:08 2007
@@ -29,9 +29,11 @@
 import org.apache.commons.lang.SerializationUtils;
 import org.apache.ojb.broker.Identity;
 import org.apache.ojb.broker.platforms.PlatformHsqldbImpl;
+import org.apache.ojb.broker.platforms.PlatformOracleImpl;
 import org.apache.ojb.broker.query.Criteria;
 import org.apache.ojb.broker.query.QueryFactory;
 import org.apache.ojb.broker.query.ReportQueryByCriteria;
+import org.apache.ojb.broker.query.Query;
 import org.apache.ojb.broker.util.ObjectModification;
 import org.apache.ojb.junit.PBTestCase;
 
@@ -103,7 +105,7 @@
 
         Criteria crit = new Criteria();
         crit.addNotNull("blob");
-        crit.addEqualTo("id", new Integer(obj.getId()));
+        crit.addEqualTo("id", obj.getId());
         ReportQueryByCriteria q = QueryFactory.newReportQuery(LobObject.class, crit);
         q.setAttributes(new String[]{"blob", "clob"});
 
@@ -241,7 +243,7 @@
         Identity oid = broker.serviceIdentity().buildIdentity(obj);
 
         // if no cache is used skip this test
-        if(broker.serviceObjectCache().lookup(oid) == null) return;
+        if(broker.serviceSessionCache().getConnector(oid.getObjectsTopLevelClass()).lookup(broker, oid) == null) return;
 
         LobObject objRead = (LobObject) broker.getObjectByIdentity(oid);
         assertNotNull("BLOB was not stored", objRead.getBlob());
@@ -271,7 +273,7 @@
 
     public void testLobAutoRefresh() throws Exception
     {
-        int size = 50;
+        int size = 2001;
 
         byte[] barr = new byte[size];
         char[] carr = new char[size];
@@ -297,7 +299,7 @@
         Identity oid = broker.serviceIdentity().buildIdentity(obj);
 
         // if no cache is used skip this test
-        if(broker.serviceObjectCache().lookup(oid) == null) return;
+        if(broker.serviceSessionCache().getConnector(oid.getObjectsTopLevelClass()).lookup(broker, oid) == null) return;
 
         LobObject objRead = (LobObject) broker.getObjectByIdentity(oid);
         assertNotNull("BLOB was not stored", objRead.getBlob());
@@ -314,7 +316,7 @@
         }
 
         broker.serviceLobHelper().refreshLob(objRead);
-        assertEquals(50, objRead.getBlob().length());
+        assertEquals(size, objRead.getBlob().length());
         broker.commitTransaction();
 
         broker.beginTransaction();
@@ -325,7 +327,7 @@
         assertNotNull("BLOB was not stored", objRead.getBlob());
         assertNotNull("CLOB was not stored", objRead.getClob());
 
-        assertEquals(50, objRead.getBlob().length());
+        assertEquals(size, objRead.getBlob().length());
         broker.commitTransaction();
     }
 
@@ -350,11 +352,10 @@
         LobObject obj = new LobObject();
         obj.setBlob(b);
         obj.setClob(c);
-
         broker.store(obj);
         broker.commitTransaction();
 
-        //broker.clearCache();
+        broker.clearCache();
         broker.beginTransaction();
         Identity oid = broker.serviceIdentity().buildIdentity(obj);
         LobObject objRead = (LobObject) broker.getObjectByIdentity(oid);
@@ -368,6 +369,39 @@
                 objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
         broker.commitTransaction();
 
+        // update object using new LOB objets
+        broker.beginTransaction();
+        byte[] barr2 = new byte[size];
+        StringBuffer buf2 = new StringBuffer();
+        for(int i = 0; i < size; i++)
+        {
+            barr2[i] = (byte) 'u';
+            buf2.append('u');
+        }
+        ByteArrayInputStream in2 = new ByteArrayInputStream(barr2);
+        StringReader reader2 = new StringReader(buf2.toString());
+        Blob b_update = broker.serviceLobHelper().newBlob(in2);
+        Clob c_update = broker.serviceLobHelper().newClob(reader2);
+        obj.setBlob(b_update);
+        obj.setClob(c_update);
+        broker.store(obj, ObjectModification.UPDATE);
+        broker.commitTransaction();
+
+        broker.clearCache();
+        broker.beginTransaction();
+        oid = broker.serviceIdentity().buildIdentity(obj);
+        objRead = (LobObject) broker.getObjectByIdentity(oid);
+        broker.serviceLobHelper().refreshLob(objRead);
+        assertNotNull("BLOB was not stored", objRead.getBlob());
+        assertNotNull("CLOB was not stored", objRead.getClob());
+        result_2 = objRead.getBlob().getBytes(1, (int) objRead.getBlob().length());
+        // System.out.println("result: " + result_2.length);
+        assertTrue(ArrayUtils.isEquals(barr2, result_2));
+        assertEquals(buf2.toString(),
+                objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
+        broker.commitTransaction();
+
+        // nullify LOB objects
         broker.beginTransaction();
         objRead.setBlob(null);
         objRead.setClob(null);
@@ -384,84 +418,126 @@
     {
         if(getPlatformClass().equals(PlatformHsqldbImpl.class.getName()))
         {
-            ojbSkipTestMessage("# Skip unsupported operation for platform: " + getPlatformClass() + " #");
+            ojbSkipTestMessage("Skip unsupported operation for platform: " + getPlatformClass() + ", Blob().setBytes(...)");
             return;
         }
-        doUpdate(UpdateSetBytesSetString);
+        boolean needLock = false;
+        boolean storeObject = true;
+        if(PlatformOracleImpl.class.isAssignableFrom(broker.serviceConnectionManager().getSupportedPlatform().getClass()))
+        {
+            needLock = true;
+            storeObject = false;
+        }
+        // test small object
+        doUpdate(UpdateSetBytesSetString, 50, needLock, storeObject);
+        // test large objects
+        doUpdate(UpdateSetBytesSetString, 4001, needLock, storeObject);
     }
 
     public void testLOBUpdateSetBlobSetClob() throws Exception
     {
         if(getPlatformClass().equals(PlatformHsqldbImpl.class.getName()))
         {
-            ojbSkipTestMessage("# Skip unsupported operation for platform: " + getPlatformClass() + " #");
+            ojbSkipTestMessage("Skip unsupported operation for platform: " + getPlatformClass() + ", setBlob(...)");
             return;
         }
-        doUpdate(UpdateSetBlobSetClob);
+        // test small object
+        doUpdate(UpdateSetBlobSetClob, 50, false, true);
+        // test large objects
+        doUpdate(UpdateSetBlobSetClob, 4001, false, true);
     }
 
     public void testLOBUpdateSetBinaryStreamSetCharacterStream() throws Exception
     {
         if(getPlatformClass().equals(PlatformHsqldbImpl.class.getName()))
         {
-            ojbSkipTestMessage("# Skip unsupported operation for platform: " + getPlatformClass() + " #");
+            ojbSkipTestMessage("Skip unsupported operation for platform: " + getPlatformClass() + ", Blob().setBinaryStream(...)");
             return;
         }
-        doUpdate(UpdateSetBinaryStreamSetCharacterStream);
+        boolean needLock = false;
+        boolean storeObject = true;
+        if(PlatformOracleImpl.class.isAssignableFrom(broker.serviceConnectionManager().getSupportedPlatform().getClass()))
+        {
+            needLock = true;
+            storeObject = false;
+        }
+        // test small object
+        doUpdate(UpdateSetBinaryStreamSetCharacterStream, 50, needLock, storeObject);
+        // test large objects
+        doUpdate(UpdateSetBinaryStreamSetCharacterStream, 4001, needLock,storeObject);
     }
 
     final int UpdateSetBlobSetClob = 1;
     final int UpdateSetBytesSetString = 2;
     final int UpdateSetBinaryStreamSetCharacterStream = 3;
 
-    public void doUpdate(int updateType) throws Exception
+    /**
+     * ==>> !!size value have to set >=10!!
+     */
+    void doUpdate(int updateType, int size, boolean needLock, boolean needObjectStore) throws Exception
     {
-        int size = 10;
-
-        byte[] barr = new byte[size];
-        String carr = "yyyyyyyyyy";
+        // prepare test
+        byte[] byteArr = new byte[size];
+        StringBuffer buf = new StringBuffer();
         for(int i = 0; i < size; i++)
         {
-            barr[i] = (byte) 'x';
+            byteArr[i] = (byte) 'x';
+            buf.append('y');
         }
+        String clobString = buf.toString();
         byte[] updateByteArr = new byte[]{'u', 'p', 'd', 'a', 't', 'e'};
-        byte[] expectedByte = new byte[]{'u', 'p', 'd', 'a', 't', 'e', 'x', 'x', 'x', 'x'};
+        byte[] byteArrUpdated = ArrayUtils.addAll(updateByteArr, ArrayUtils.subarray(byteArr, 6, byteArr.length));
         String updateString = "update";
-        String expectedString = "updateyyyy";
+        String clobStringUpdated = updateString + clobString.substring(6);
 
         byte[] updateByteArr2 = new byte[]{'u', 'p', 'd', 'a', 't', 'e', '_', '2'};
-        byte[] expectedByte2 = new byte[]{'u', 'p', 'd', 'a', 't', 'e', '_', '2', 'x', 'x'};
+        byte[] byteArrUpdated2 = ArrayUtils.addAll(updateByteArr2, ArrayUtils.subarray(byteArr, 8, byteArr.length));
         String updateString2 = "update_2";
-        String expectedString2 = "update_2yy";
+        String clobStringUpdated2 = updateString2 + clobString.substring(8);
 
-        // insert
+        // start insert
         broker.beginTransaction();
         Blob b = broker.serviceLobHelper().newBlob();
-        b.setBytes(1, barr);
+        b.setBytes(1, byteArr);
         Clob c = broker.serviceLobHelper().newClob();
-        c.setString(1, carr);
+        c.setString(1, clobString);
         LobObject obj = new LobObject();
         obj.setBlob(b);
         obj.setClob(c);
         broker.store(obj);
         broker.commitTransaction();
 
+        // check insert
         broker.clearCache();
         broker.beginTransaction();
         Identity oid = broker.serviceIdentity().buildIdentity(obj);
         LobObject objRead = (LobObject) broker.getObjectByIdentity(oid);
         assertNotNull("BLOB was not stored", objRead.getBlob());
         assertNotNull("CLOB was not stored", objRead.getClob());
+        assertEquals(byteArr.length, objRead.getBlob().length());
+        assertEquals(clobString.length(), objRead.getClob().length());
         byte[] resultArray = objRead.getBlob().getBytes(1, (int) objRead.getBlob().length());
-        assertTrue(ArrayUtils.isEquals(barr, resultArray));
-        assertEquals(carr,
-                objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
+        assertTrue(ArrayUtils.isEquals(byteArr, resultArray));
+        assertEquals(clobString, objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
         broker.commitTransaction();
 
         // update within PB-tx
         broker.beginTransaction();
-        objRead = (LobObject) broker.getObjectByIdentity(oid);
-        broker.serviceLobHelper().refreshLob(objRead);
+        if(needLock)
+        {
+            objRead = (LobObject) broker.getObjectByIdentity(oid);
+            broker.serviceLobHelper().refreshLob(objRead);
+            // workaround to lock the row
+            Query q = QueryFactory.newReportQuery(
+                    LobObject.class, new String[]{"id"}, new Criteria().addEqualTo("id", objRead.getId()), false);
+            q.setSelectForUpdate(true);
+            broker.getObjectByQuery(q);
+        }
+        else
+        {
+            objRead = (LobObject) broker.getObjectByIdentity(oid);
+            broker.serviceLobHelper().refreshLob(objRead);
+        }
         try
         {
             switch(updateType)
@@ -477,8 +553,8 @@
                     writer.close();
                     break;
                 case UpdateSetBlobSetClob:
-                    Blob blob = broker.serviceLobHelper().newBlob(expectedByte);
-                    Clob clob = broker.serviceLobHelper().newClob(expectedString);
+                    Blob blob = broker.serviceLobHelper().newBlob(byteArrUpdated);
+                    Clob clob = broker.serviceLobHelper().newClob(clobStringUpdated);
                     objRead.setBlob(blob);
                     objRead.setClob(clob);
                     break;
@@ -494,34 +570,46 @@
         {
             ojbSkipTestMessage("Skip unsupported operation for platform: "
                     + getPlatformClass() + ", message: " + e.getMessage());
+            broker.abortTransaction();
             return;
         }
-        broker.store(objRead, ObjectModification.UPDATE);
+        if(needObjectStore) broker.store(objRead, ObjectModification.UPDATE);
         broker.commitTransaction();
 
+        broker.clearCache();
         broker.beginTransaction();
         oid = broker.serviceIdentity().buildIdentity(obj);
         objRead = (LobObject) broker.getObjectByIdentity(oid);
         broker.serviceLobHelper().refreshLob(objRead);
         resultArray = objRead.getBlob().getBytes(1, (int) objRead.getBlob().length());
 //        System.out.println("");
-//        System.out.println("# exp: " + ArrayUtils.toString(expectedByte));
+//        System.out.println("# exp: " + ArrayUtils.toString(byteArrUpdated));
 //        System.out.println("# get: " + ArrayUtils.toString(resultArray));
 //        System.out.println("# set: " + updateString);
 //        System.out.println("# get: " + objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
-        assertTrue(ArrayUtils.isEquals(expectedByte, resultArray));
-        assertEquals(expectedString,
-                objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
+        assertEquals(byteArrUpdated.length, resultArray.length);
+        assertEquals(clobStringUpdated.length(), objRead.getClob().length());
+        assertTrue(ArrayUtils.isEquals(byteArrUpdated, resultArray));
+        assertEquals(clobStringUpdated, objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
         broker.commitTransaction();
 
         // try update 2
         broker.beginTransaction();
-
-        // TODO: arminw: seems that under specific conditions this test freeze
-        //here, when test testLOBUpdateSetBlobSetClob() runs against mysql
-        objRead = (LobObject) broker.getObjectByIdentity(oid);
-        broker.serviceLobHelper().refreshLob(objRead);
-
+        if(needLock)
+        {
+            objRead = (LobObject) broker.getObjectByIdentity(oid);
+            broker.serviceLobHelper().refreshLob(objRead);
+            // workaround to lock the row
+            Query q = QueryFactory.newReportQuery(
+                    LobObject.class, new String[]{"id"}, new Criteria().addEqualTo("id", objRead.getId()), false);
+            q.setSelectForUpdate(true);
+            broker.getObjectByQuery(q);
+        }
+        else
+        {
+            objRead = (LobObject) broker.getObjectByIdentity(oid);
+            broker.serviceLobHelper().refreshLob(objRead);
+        }
         try
         {
             switch(updateType)
@@ -537,8 +625,8 @@
                     writer.close();
                     break;
                 case UpdateSetBlobSetClob:
-                    Blob blob = broker.serviceLobHelper().newBlob(expectedByte2);
-                    Clob clob = broker.serviceLobHelper().newClob(expectedString2);
+                    Blob blob = broker.serviceLobHelper().newBlob(byteArrUpdated2);
+                    Clob clob = broker.serviceLobHelper().newClob(clobStringUpdated2);
                     objRead.setBlob(blob);
                     objRead.setClob(clob);
                     break;
@@ -553,19 +641,22 @@
         catch(UnsupportedOperationException e)
         {
             ojbSkipTestMessage("# Skip unsupported operation for platform: " + getPlatformClass() + ", message: " + e.getMessage() + " #");
+            broker.abortTransaction();
             return;
         }
         broker.store(objRead, ObjectModification.UPDATE);
         broker.commitTransaction();
 
+        broker.clearCache();
         broker.beginTransaction();
         oid = broker.serviceIdentity().buildIdentity(obj);
         objRead = (LobObject) broker.getObjectByIdentity(oid);
         broker.serviceLobHelper().refreshLob(objRead);
         resultArray = objRead.getBlob().getBytes(1, (int) objRead.getBlob().length());
-        assertTrue(ArrayUtils.isEquals(expectedByte2, resultArray));
-        assertEquals(expectedString2,
-                objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
+        assertEquals(byteArrUpdated2.length, resultArray.length);
+        assertEquals(clobStringUpdated2.length(), objRead.getClob().length());
+        assertTrue(ArrayUtils.isEquals(byteArrUpdated2, resultArray));
+        assertEquals(clobStringUpdated2, objRead.getClob().getSubString(1, (int) objRead.getClob().length()));
         broker.commitTransaction();
 
         broker.beginTransaction();
@@ -904,7 +995,7 @@
     //*******************************************************
     public static class LobObject implements Serializable
     {
-        private int id;
+        private Integer id;
         private Blob blob;
         private Clob clob;
 
@@ -912,12 +1003,12 @@
         {
         }
 
-        public int getId()
+        public Integer getId()
         {
             return id;
         }
 
-        public void setId(int id)
+        public void setId(Integer id)
         {
             this.id = id;
         }

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataMultithreadedTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataMultithreadedTest.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataMultithreadedTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataMultithreadedTest.java Fri Jan 12 10:13:08 2007
@@ -11,6 +11,7 @@
 import org.apache.ojb.broker.PersistenceConfiguration;
 import org.apache.ojb.broker.Person;
 import org.apache.ojb.broker.ProductGroupWithCollectionProxy;
+import org.apache.ojb.broker.InterfaceArticle;
 import org.apache.ojb.broker.accesslayer.OJBIterator;
 import org.apache.ojb.broker.query.Query;
 import org.apache.ojb.broker.query.QueryFactory;
@@ -489,11 +490,17 @@
             // profile with unrelated class-mappings).
             DescriptorRepository dr = new DescriptorRepository();
             MetadataManager.getInstance().setDescriptor(dr);
-            Article article;
+            InterfaceArticle article;
             int numArticles = 0;
             for (Iterator iterator = articles.iterator(); iterator.hasNext();)
             {
-                assertNotNull(article = (Article) iterator.next());
+                Object obj = iterator.next();
+                assertNotNull(obj);
+                if(!(obj instanceof InterfaceArticle))
+                {
+                    fail("Expected instance of class Article, but retrieved: " + obj.getClass());
+                }
+                article = (InterfaceArticle) obj;
                 assertNotNull(article.getArticleId());
                 assertFalse(new Integer(0).equals(article.getArticleId()));
                 numArticles++;

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/metadata/MetadataTest.java Fri Jan 12 10:13:08 2007
@@ -11,7 +11,7 @@
 import org.apache.ojb.broker.PersistenceBrokerException;
 import org.apache.ojb.broker.TestHelper;
 import org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl;
-import org.apache.ojb.broker.cache.CachingStrategyDefaultImpl;
+import org.apache.ojb.broker.cache.CachingPipeNoopImpl;
 import org.apache.ojb.broker.cache.ObjectCacheDefaultImpl;
 import org.apache.ojb.broker.cache.ObjectCacheEmptyImpl;
 import org.apache.ojb.broker.query.Criteria;
@@ -473,7 +473,7 @@
         </connection-factory>
 
         <object-cache class="org.apache.ojb.broker.cache.ObjectCacheEmptyImpl"
-            strategy="org.apache.ojb.broker.cache.CachingStrategyDefaultImpl"
+            strategy="org.apache.ojb.broker.cache.CachingPipeNoopImpl"
         >
             <attribute attribute-name="cacheKey1" attribute-value="cacheValue1"/>
             <attribute attribute-name="cacheKey2" attribute-value="cacheValue2"/>
@@ -530,8 +530,8 @@
         assertNotNull(ocd);
         assertNotNull(ocd.getObjectCache());
         assertEquals(ObjectCacheEmptyImpl.class, ocd.getObjectCache());
-        assertNotNull(ocd.getCachingStrategy());
-        assertEquals(CachingStrategyDefaultImpl.class, ocd.getCachingStrategy());
+        assertNotNull(ocd.getCachingPreparer());
+        assertEquals(CachingPipeNoopImpl.class, ocd.getCachingPreparer());
         assertNotNull(ocd.getAttribute("cacheKey1"));
         assertNotNull(ocd.getAttribute("cacheKey2"));
         assertEquals("cacheValue1", ocd.getAttribute("cacheKey1"));

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/DatabaseIdentityTest.java Fri Jan 12 10:13:08 2007
@@ -27,6 +27,7 @@
 import org.apache.ojb.broker.Identity;
 import org.apache.ojb.broker.PersistenceBrokerFactory;
 import org.apache.ojb.broker.TestHelper;
+import org.apache.ojb.broker.util.sequence.SequenceManagerIdentityImpl;
 import org.apache.ojb.broker.metadata.MetadataManager;
 import org.apache.ojb.broker.metadata.ObjectReferenceDescriptor;
 import org.apache.ojb.broker.metadata.SequenceDescriptor;
@@ -34,7 +35,6 @@
 import org.apache.ojb.broker.query.Criteria;
 import org.apache.ojb.broker.query.QueryByCriteria;
 import org.apache.ojb.broker.query.QueryFactory;
-import org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl;
 import org.apache.ojb.junit.PBTestCase;
 import org.apache.ojb.odmg.OJB;
 import org.apache.ojb.odmg.TransactionExt;
@@ -43,7 +43,7 @@
 import org.odmg.Transaction;
 
 /**
- * Test case for {@link org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl}. These test check
+ * Test case for {@link org.apache.ojb.broker.util.sequence.SequenceManagerIdentityImpl}. These test check
  * support for native database identity columns. Test case only works for
  * Hsql and Mysql.
  *
@@ -112,7 +112,7 @@
         SequenceDescriptor sd = mm.connectionRepository().getDescriptor(broker.getPBKey()).getSequenceDescriptor();
         oldSequenceManager = sd.getSequenceManagerClass();
         // set the sequence manager
-        sd.setSequenceManagerClass(SequenceManagerNativeImpl.class);
+        sd.setSequenceManagerClass(SequenceManagerIdentityImpl.class);
         broker.close();
 
         // check usage of correct SequenceManager implementation
@@ -120,7 +120,7 @@
         broker = persistenceConf.createPersistenceBroker();
 
         sd = mm.connectionRepository().getDescriptor(broker.getPBKey()).getSequenceDescriptor();
-        assertEquals(SequenceManagerNativeImpl.class, sd.getSequenceManagerClass());
+        assertEquals(SequenceManagerIdentityImpl.class, sd.getSequenceManagerClass());
     }
 
     public void tearDown() throws Exception

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/SequenceManagerHandle.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/SequenceManagerHandle.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/SequenceManagerHandle.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/SequenceManagerHandle.java Fri Jan 12 10:13:08 2007
@@ -2,6 +2,7 @@
 
 import org.apache.ojb.broker.PersistenceBroker;
 import org.apache.ojb.broker.PersistenceBrokerException;
+import org.apache.ojb.broker.PersistenceBrokerInternal;
 import org.apache.ojb.broker.metadata.FieldDescriptor;
 import org.apache.ojb.broker.util.sequence.SequenceManager;
 import org.apache.ojb.broker.util.sequence.SequenceManagerException;
@@ -13,21 +14,18 @@
  * Simple class, obtains sequence numbers from a SequenceManager
  * (in multi-threaded tests).
  *
- * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  * @version $Id$
  */
 public class SequenceManagerHandle implements Runnable
 {
-    private PersistenceBroker broker;
+    private PersistenceBrokerInternal broker;
     private int loops;
-    private Class targetClass;
     private FieldDescriptor field;
     private List resultList;
 
-    public SequenceManagerHandle(PersistenceBroker broker, Class targetClass, int loops)
+    public SequenceManagerHandle(PersistenceBrokerInternal broker, Class targetClass, int loops)
     {
         this.broker = broker;
-        this.targetClass = targetClass;
         this.field = broker.getClassDescriptor(targetClass).getAutoIncrementFields()[0];
         if(field == null)
         {
@@ -47,7 +45,7 @@
         {
             try
             {
-                result = sm.getUniqueValue(field);
+                result = sm.getUniqueValue(broker, field);
                 //System.err.println("result "+result);
                 resultList.add(result);
                 SequenceManagerTest.countKey();

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/SequenceManagerTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/SequenceManagerTest.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/SequenceManagerTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/sequence/SequenceManagerTest.java Fri Jan 12 10:13:08 2007
@@ -15,6 +15,7 @@
 import org.apache.ojb.broker.PBKey;
 import org.apache.ojb.broker.PersistenceBroker;
 import org.apache.ojb.broker.PersistenceBrokerException;
+import org.apache.ojb.broker.PersistenceBrokerInternal;
 import org.apache.ojb.broker.TestHelper;
 import org.apache.ojb.broker.metadata.ClassDescriptor;
 import org.apache.ojb.broker.metadata.DescriptorRepository;
@@ -74,7 +75,7 @@
 
     private int numberOfKeys = 200;
 
-    private PersistenceBroker[] brokers;
+    private PersistenceBrokerInternal[] brokers;
     private ThreadGroup threadGroup;
     private static ArrayList generatedKeys;
     private static int keyCount;
@@ -146,7 +147,7 @@
         String fieldName = "stringKey";
         PersistenceBroker broker = ojb.lookupBroker();
         FieldDescriptor field = broker.getClassDescriptor(Repository.SMKey.class).getFieldDescriptorByName(fieldName);
-        String result = SequenceManagerHelper.buildSequenceName(broker, field, true);
+        String result = SequenceManagerHelper.buildSequenceName(field, true);
 
         assertEquals(TEST_SEQUENCE_NAME, result);
         broker.close();
@@ -223,29 +224,21 @@
                 throw e;
             }
 
-            try
-            {
-                // let OJB re-initialize sequence-manager
-                broker.close();
-                ojb.releaseAllConnections();
-                /*
-                remove sequence name of autoincrement field
-                but enable automatic sequence name generation
-                --> should pass
-                */
-                field.setSequenceName(null);
-                sd.addAttribute("seq.autoNaming", "true");
-                broker = ojb.lookupBroker(tempKey);
-                SMAutoNaming obj = new SMAutoNaming("testAutoNaming_3");
-                broker.beginTransaction();
-                broker.store(obj);
-                broker.commitTransaction();
-            }
-            catch (PersistenceBrokerException e)
-            {
-                e.printStackTrace();
-                fail("Sequence key generation failed");
-            }
+            // let OJB re-initialize sequence-manager
+            broker.close();
+            ojb.releaseAllConnections();
+            /*
+            remove sequence name of autoincrement field
+            but enable automatic sequence name generation
+            --> should pass
+            */
+            field.setSequenceName(null);
+            sd.addAttribute("seq.autoNaming", "true");
+            broker = ojb.lookupBroker(tempKey);
+            SMAutoNaming obj = new SMAutoNaming("testAutoNaming_3");
+            broker.beginTransaction();
+            broker.store(obj);
+            broker.commitTransaction();
 
         }
         finally
@@ -263,11 +256,11 @@
      */
     public void testDatabaseSequenceGeneration() throws Exception
     {
-        PersistenceBroker broker = ojb.getDefaultConfiguration().createPersistenceBroker();
+        PersistenceBrokerInternal broker = ojb.getDefaultConfiguration().createPersistenceBroker();
         SequenceManager sm = broker.serviceSequenceManager();
         if (!(sm instanceof SequenceManagerNextValImpl))
         {
-            System.out.println("This test only works for SeqMan implementations using "
+            ojbSkipTestMessage("This test only works for SeqMan implementations using "
                     + SequenceManagerNextValImpl.class + " Skip test case.");
             broker.close();
             return;
@@ -277,7 +270,7 @@
                 Repository.SMDatabaseSequence.class).getAutoIncrementFields()[0];
         for (int i = 0; i < 10; i++)
         {
-            Integer val = (Integer) sm.getUniqueValue(idFld);
+            Integer val = (Integer) sm.getUniqueValue(broker, idFld);
             count += val.intValue();
             System.err.println("count " + count);
         }
@@ -459,7 +452,7 @@
 
     private void doKeyAnalysing(Class classOne, Class classTwo) throws SequenceManagerException
     {
-        PersistenceBroker broker = ojb.lookupBroker();
+        PersistenceBrokerInternal broker = ojb.lookupBroker();
         FieldDescriptor fieldOne = broker.getClassDescriptor(classOne).getAutoIncrementFields()[0];
         FieldDescriptor fieldTwo = broker.getClassDescriptor(classOne).getAutoIncrementFields()[0];
 
@@ -477,7 +470,7 @@
         broker.close();
     }
 
-    private List createKeyList(PersistenceBroker broker, FieldDescriptor field, int number)
+    private List createKeyList(PersistenceBrokerInternal broker, FieldDescriptor field, int number)
             throws SequenceManagerException
     {
         SequenceManager sm = broker.serviceSequenceManager();
@@ -485,7 +478,7 @@
         int result;
         for (int i = 0; i < number; i++)
         {
-            Integer val = (Integer) sm.getUniqueValue(field);
+            Integer val = (Integer) sm.getUniqueValue(broker, field);
             result = val.intValue();
             resultList.add(new Integer(result));
         }
@@ -497,11 +490,11 @@
      */
     public void testGetUniqueIdWithOneBroker() throws Exception
     {
-        PersistenceBroker pb = ojb.lookupBroker();
+        PersistenceBrokerInternal pb = ojb.lookupBroker();
         FieldDescriptor field = pb.getClassDescriptor(targetClass).getAutoIncrementFields()[0];
-        Integer val = (Integer) pb.serviceSequenceManager().getUniqueValue(field);
+        Integer val = (Integer) pb.serviceSequenceManager().getUniqueValue(pb, field);
         int id1 = val.intValue();
-        val = (Integer) pb.serviceSequenceManager().getUniqueValue(field);
+        val = (Integer) pb.serviceSequenceManager().getUniqueValue(pb, field);
         int id2 = val.intValue();
         assertTrue(id1 != id2);
         assertTrue(id2 > id1);
@@ -549,34 +542,34 @@
      */
     public void YYYtest_getUniqueIdWithTwoBrokers() throws Exception
     {
-        PersistenceBroker pb = ojb.lookupBroker();
-        PersistenceBroker pb2 = ojb.lookupBroker();
+        PersistenceBrokerInternal pb = ojb.lookupBroker();
+        PersistenceBrokerInternal pb2 = ojb.lookupBroker();
         FieldDescriptor field = pb.getClassDescriptor(targetClass).getAutoIncrementFields()[0];
 
-        Integer val = (Integer) pb.serviceSequenceManager().getUniqueValue(field);
+        Integer val = (Integer) pb.serviceSequenceManager().getUniqueValue(pb, field);
         int id1 = val.intValue();
 
-        val = (Integer) pb2.serviceSequenceManager().getUniqueValue(field);
+        val = (Integer) pb2.serviceSequenceManager().getUniqueValue(pb2, field);
         int id2 = val.intValue();
 
         assertTrue(id1 != id2);
         assertTrue(id2 > id1);
         assertTrue((id2 - id1) == 1);
 
-        val = (Integer) pb2.serviceSequenceManager().getUniqueValue(field);
+        val = (Integer) pb2.serviceSequenceManager().getUniqueValue(pb2, field);
         id1 = val.intValue();
 
-        val = (Integer) pb.serviceSequenceManager().getUniqueValue(field);
+        val = (Integer) pb.serviceSequenceManager().getUniqueValue(pb, field);
         id2 = val.intValue();
 
         assertTrue(id1 != id2);
         assertTrue(id2 > id1);
         assertTrue((id2 - id1) == 1);
 
-        val = (Integer) pb.serviceSequenceManager().getUniqueValue(field);
+        val = (Integer) pb.serviceSequenceManager().getUniqueValue(pb, field);
         id1 = val.intValue();
 
-        val = (Integer) pb2.serviceSequenceManager().getUniqueValue(field);
+        val = (Integer) pb2.serviceSequenceManager().getUniqueValue(pb2, field);
         id2 = val.intValue();
 
 
@@ -593,10 +586,10 @@
     {
         JdbcConnectionDescriptor jcd = ojb.getDefaultConfiguration().getJdbcConnectionDescriptor();
         SequenceDescriptor old_sd = (SequenceDescriptor) SerializationUtils.clone(jcd.getSequenceDescriptor());
-        PersistenceBroker broker;
+        PersistenceBrokerInternal broker;
         try
         {
-            jcd.setSequenceDescriptor(new SequenceDescriptor(jcd, SequenceManagerStoredProcedureImpl.class));
+            jcd.setSequenceDescriptor(new SequenceDescriptor(SequenceManagerStoredProcedureImpl.class));
             ojb.releaseAllConnections();
             broker = ojb.lookupBroker();
             SequenceManager sm = broker.serviceSequenceManager();
@@ -608,7 +601,7 @@
             }
             // now we start the tests
             FieldDescriptor field = broker.getClassDescriptor(targetClass).getAutoIncrementFields()[0];
-            sm.getUniqueValue(field);
+            sm.getUniqueValue(broker, field);
 
             generatedKeys.clear();
 // comment in
@@ -698,7 +691,7 @@
         if (loops < seqGrabSize) loops = seqGrabSize;
         if (seqGrabSize != 0) loops = (loops / seqGrabSize) * seqGrabSize;
 
-        brokers = new PersistenceBroker[instances];
+        brokers = new PersistenceBrokerInternal[instances];
         for (int i = 0; i < instances; i++)
         {
             brokers[i] = ojb.lookupBroker();
@@ -744,23 +737,23 @@
 
     public void testObjectsFromAbstractBaseClass1() throws Exception
     {
-        PersistenceBroker broker = ojb.lookupBroker();
+        PersistenceBrokerInternal broker = ojb.lookupBroker();
         try
         {
             SequenceManager sm = broker.serviceSequenceManager();
             FieldDescriptor fld_1 = broker.getClassDescriptor(SMObjectOne.class).getAutoIncrementFields()[0];
             FieldDescriptor fld_2 = broker.getClassDescriptor(SMObjectTwo.class).getAutoIncrementFields()[0];
 
-            Object result_1 = sm.getUniqueValue(fld_1);
-            Object result_2 = sm.getUniqueValue(fld_2);
+            Object result_1 = sm.getUniqueValue(broker, fld_1);
+            Object result_2 = sm.getUniqueValue(broker, fld_2);
 
             assertNotNull(result_1);
             assertNotNull(result_2);
             assertTrue(result_1 instanceof Integer);
             assertTrue(result_2 instanceof Integer);
 
-            result_1 = sm.getUniqueValue(fld_1);
-            result_2 = sm.getUniqueValue(fld_2);
+            result_1 = sm.getUniqueValue(broker, fld_1);
+            result_2 = sm.getUniqueValue(broker, fld_2);
 
             assertNotNull(result_1);
             assertNotNull(result_2);

Modified: db/ojb/trunk/src/test/org/apache/ojb/faraway-db/OJB_FarAway.script
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/faraway-db/OJB_FarAway.script?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
Binary files - no diff available.

Modified: db/ojb/trunk/src/test/org/apache/ojb/junit/PBTestCase.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/junit/PBTestCase.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/junit/PBTestCase.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/junit/PBTestCase.java Fri Jan 12 10:13:08 2007
@@ -64,7 +64,7 @@
         cleanUpBroker(broker);
         // arminw: to make tests more realistic, don't clear all resources after each test,
         // because only this way we can detect side-effects.
-        // persistenceConf.getCachingManager().clearCaches();
+        // persistenceConf.getCachingManager().evictAll();
         // persistenceConf.releaseAllInstances();
         persistenceConf = null;
         super.tearDown();

Modified: db/ojb/trunk/src/test/org/apache/ojb/odmg/CollectionsTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/odmg/CollectionsTest.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/odmg/CollectionsTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/odmg/CollectionsTest.java Fri Jan 12 10:13:08 2007
@@ -611,7 +611,7 @@
         // alternative do explicit call Database#deletePersistent for removed objects
         fetchedGat.getCollectiblesA().remove(0);
         fetchedGat.getCollectiblesB().remove(0);
-tx.getBroker().serviceObjectCache().cache(tx.getBroker().serviceIdentity().buildIdentity(fetchedGat), fetchedGat);
+//tx.getBroker().serviceObjectCache().cache(tx.getBroker().serviceIdentity().buildIdentity(fetchedGat), fetchedGat);
 //System.out.println("remove: " + tx.getBroker().serviceIdentity().buildIdentity(fetchedGat.getCollectiblesA().remove(0)));
 //System.out.println("remove: " + tx.getBroker().serviceIdentity().buildIdentity(fetchedGat.getCollectiblesB().remove(0)));
 //System.out.println("A: " + fetchedGat.getCollectiblesA());

Modified: db/ojb/trunk/src/test/org/apache/ojb/odmg/LockingMultithreadedTest.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/odmg/LockingMultithreadedTest.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/odmg/LockingMultithreadedTest.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/odmg/LockingMultithreadedTest.java Fri Jan 12 10:13:08 2007
@@ -167,7 +167,7 @@
                                 + ". This can be a result of low hardware.");
                     try
                     {
-                        Thread.sleep(50 + (long) Math.random() * 100);
+                        Thread.sleep((long) (Math.random() * 200));
                     }
                     catch(InterruptedException e1)
                     {

Modified: db/ojb/trunk/src/test/org/apache/ojb/quick-db/OJB.script
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/quick-db/OJB.script?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
Binary files - no diff available.

Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_database.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_database.xml?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_database.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_database.xml Fri Jan 12 10:13:08 2007
@@ -42,10 +42,28 @@
    		username="@USER_NAME@"
    		password="@USER_PASSWD@"
    		batch-mode="false"
-        useAutoCommit="2"
+        useAutoCommit="1"
         ignoreAutoCommitExceptions="false"
      >
 
+        <!-- ** Attributes with name prefix "platform." are used to allow database
+        platform class specific settings (PlatformXYZImpl classes) -->
+
+        <!-- If set to value >0 Oracle's implicit statement caching will be enabled by OJB (Oracle9i or higher).
+        Number of cached statements per connection using implicit caching with Oracle9i Connections.
+        See http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/jdbc30/StmtCacheSample/Readme.html-->
+        <attribute attribute-name="platform.oracle.statementCacheSize" attribute-value="15" />
+        <!-- Number of rows pre-fetched by the JDBC-driver for each executed query, when using row
+        pre-fetching with Oracle Connections (Oracle9i or higher). Note: this setting can be overridden
+        by specifying a connection-pool attribute with name="jdbc.defaultRowPrefetch".
+        See http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/RowPrefetchSample/Readme.html -->
+        <attribute attribute-name="platform.oracle.prefetchSize" attribute-value="20" />
+        <!-- If set to value >0 Oracle's native batch statement handling will be enabled by OJB
+        (Oracle9i or higher). If 0 or not specified the JDBC standard batch methods are used.
+        See http://technet.oracle.com/products/oracle9i/daily/jun07.html -->
+        <!--<attribute attribute-name="platform.oracle.batchSize" attribute-value="20" />-->
+
+
         <!-- Specify the ConnectionFactory implemenation:
         org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
         org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl
@@ -113,13 +131,14 @@
 
 
             <!-- ** Attributes with name prefix "jdbc." are passed directly to the JDBC driver. -->
-
-            <!-- Example setting (used by Oracle driver when Statement batching is enabled) -->
-            <!--<attribute attribute-name="jdbc.defaultBatchValue" attribute-value="5"/>-->
-
-            <!-- Oracle9i prefetch size. Do not mix the JDBC 2.0 fetch size API and the
-            Oracle row prefetching API in your application. You can use one or the other,
-            but not both. -->
+            <!-- Oracle specific driver setting to enable oracle's specific statement batching.
+             Oracle Docs: "The value of this property is used as the default batch
+             size when using Oracle style batching."
+             Attention: With OracleXE + thin this setting cause unexpected behavior -->
+            <!--<attribute attribute-name="jdbc.defaultExecuteBatch" attribute-value="20"/>-->
+            <!-- Oracle specific driver setting to set the default prefetch size.
+             Oracle Docs: "The value of this property is used as the default number of rows to prefetch."
+             Attention: With OracleXE + thin this setting cause unexpected behavior -->
             <!--<attribute attribute-name="jdbc.defaultRowPrefetch" attribute-value="20"/>-->
 
         </connection-factory>
@@ -132,14 +151,16 @@
             limit="50"
             validator="org.apache.ojb.broker.accesslayer.batch.ReturnValueValidatorImpl"
          >
-            <!-- property use by BatchManagerImpl -->
+            <!-- property used by BatchManagerImpl, set 'true' if the used JDBC driver
+             supports proper "int[] Statement.executeBatch()" return result arrays (many
+             driver simply return 'success' instead the number of modified rows)-->
             <attribute attribute-name="batch.supportOptimisticLocking" attribute-value="false"/>
         </batch>
 
         
-        <!-- Specify the caching strategy and the used caching implementation -->
+        <!-- Specify the caching pipe and the used caching implementation -->
         <object-cache class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"
-            strategy="org.apache.ojb.broker.cache.CachingStrategyTwoLevelImpl"
+            strategy="org.apache.ojb.broker.cache.CachingPipeFlatCopyImpl"
             timeout="-1"
         >
             <!-- attributes used by ObjectCacheDefaultImpl -->
@@ -156,7 +177,7 @@
         </object-cache>
 
 
-        <sequence-manager class="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
+        <sequence-manager class="hilo">
             <!-- The attribute 'seq.perField': If set 'true' it's possible to define per
             field-descriptor sequence manager. This way you can use different sequence
             identifier generation strategies. If set 'false' only the default sequence manager

Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_internal.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_internal.xml?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_internal.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_internal.xml Fri Jan 12 10:13:08 2007
@@ -25,10 +25,9 @@
        <object-cache class="org.apache.ojb.broker.cache.ObjectCacheEmptyImpl">
        </object-cache>
 
-       <!-- TODO: Rename column TABLENAME to NAME or SEQ_NAME -->
        <field-descriptor
          name="name"
-         column="TABLENAME"
+         column="NAME"
          jdbc-type="VARCHAR"
          primarykey="true"
       />

Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_junit_inheritance.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_junit_inheritance.xml?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_junit_inheritance.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_junit_inheritance.xml Fri Jan 12 10:13:08 2007
@@ -426,7 +426,7 @@
 
 <class-descriptor
     class="org.apache.ojb.broker.InheritanceMultipleTableTest$First"
-    table="FIRST_"
+    table="TPS_FIRST"
 >
     <field-descriptor
         name="id"
@@ -437,7 +437,7 @@
     />
     <field-descriptor
         name="name"
-        column="NAME"
+        column="NAME_"
         jdbc-type="VARCHAR"
     />
 </class-descriptor>
@@ -445,18 +445,18 @@
 
 <class-descriptor
     class="org.apache.ojb.broker.InheritanceMultipleTableTest$Second"
-    table="SECOND_"
+    table="TPS_SECOND"
 >
     <field-descriptor
         name="id"
         column="ID_"
         jdbc-type="INTEGER"
         primarykey="true"
-        autoincrement="true"
+        autoincrement="false"
     />
     <field-descriptor
         name="second"
-        column="SECOND"
+        column="SECOND_"
         jdbc-type="VARCHAR"
     />
     <field-descriptor
@@ -474,19 +474,51 @@
 
 <class-descriptor
     class="org.apache.ojb.broker.InheritanceMultipleTableTest$Third"
-    table="THIRD_"
+    table="TPS_THIRD"
 >
     <field-descriptor
         name="id"
         column="ID_"
         jdbc-type="INTEGER"
         primarykey="true"
-        autoincrement="true"
+        autoincrement="false"
     />
 
     <field-descriptor
         name="third"
-        column="THIRD"
+        column="THIRD_"
+        jdbc-type="VARCHAR"
+    />
+
+    <field-descriptor
+        name="secondFk"
+        column="SECOND_FK"
+        jdbc-type="INTEGER"
+        access="anonymous"
+    />
+
+    <reference-descriptor name="super"
+        class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Second"
+    >
+        <foreignkey field-ref="secondFk"/>
+    </reference-descriptor>
+</class-descriptor>
+
+<class-descriptor
+    class="org.apache.ojb.broker.InheritanceMultipleTableTest$FourthA"
+    table="TPS_FOURTH_A"
+>
+    <field-descriptor
+        name="id"
+        column="ID_A"
+        jdbc-type="INTEGER"
+        primarykey="true"
+        autoincrement="true"
+    />
+
+    <field-descriptor
+        name="fourth"
+        column="FOURTH_"
         jdbc-type="VARCHAR"
     />
 
@@ -498,7 +530,39 @@
     />
 
     <reference-descriptor name="super"
-        class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Second"
+        class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Third"
+    >
+        <foreignkey field-ref="thirdFk"/>
+    </reference-descriptor>
+</class-descriptor>
+
+<class-descriptor
+    class="org.apache.ojb.broker.InheritanceMultipleTableTest$FourthB"
+    table="TPS_FOURTH_B"
+>
+    <field-descriptor
+        name="id"
+        column="ID_"
+        jdbc-type="INTEGER"
+        primarykey="true"
+        autoincrement="false"
+    />
+
+    <field-descriptor
+        name="fourth"
+        column="FOURTH_"
+        jdbc-type="VARCHAR"
+    />
+
+    <field-descriptor
+        name="thirdFk"
+        column="THIRD_FK"
+        jdbc-type="INTEGER"
+        access="anonymous"
+    />
+
+    <reference-descriptor name="super"
+        class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Third"
     >
         <foreignkey field-ref="thirdFk"/>
     </reference-descriptor>

Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_junit_meta_seq.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_junit_meta_seq.xml?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_junit_meta_seq.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_junit_meta_seq.xml Fri Jan 12 10:13:08 2007
@@ -793,7 +793,7 @@
         jdbc-type="INTEGER" primarykey="true"
         autoincrement="true" access="readonly">
 
-        <sequence-manager className="identity"/>
+        <sequence-manager class="identity"/>
     </field-descriptor>
 
     <field-descriptor
@@ -801,7 +801,7 @@
         jdbc-type="INTEGER" primarykey="true"
         autoincrement="true">
 
-        <sequence-manager className="memory"/>
+        <sequence-manager class="memory"/>
     </field-descriptor>
 
     <field-descriptor
@@ -809,7 +809,7 @@
         jdbc-type="INTEGER" primarykey="true"
         autoincrement="true">
 
-        <sequence-manager className="hilo"/>
+        <sequence-manager class="hilo"/>
     </field-descriptor>
 
     <field-descriptor
@@ -817,7 +817,7 @@
         jdbc-type="INTEGER" primarykey="true"
         autoincrement="true">
 
-        <sequence-manager className="nextval"/>
+        <sequence-manager class="sequence"/>
     </field-descriptor>
 
     <field-descriptor
@@ -825,7 +825,7 @@
         jdbc-type="INTEGER" primarykey="true"
         autoincrement="true">
 
-        <sequence-manager className="seqhilo"/>
+        <sequence-manager class="seqhilo"/>
     </field-descriptor>
 
     <field-descriptor

Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_junit_reference.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_junit_reference.xml?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_junit_reference.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_junit_reference.xml Fri Jan 12 10:13:08 2007
@@ -2124,6 +2124,61 @@
         </collection-descriptor>
     </class-descriptor>
 
+    <class-descriptor
+        class="org.apache.ojb.broker.OneToOneWithoutFKTest$Passport"
+        table="ONE_TO_ONE_PASS">
+        <field-descriptor
+                name="id"
+                column="ID_"
+                jdbc-type="INTEGER"
+                primarykey="true"
+                nullable="false"/>
+
+        <field-descriptor
+                name="number"
+                column="NUMBER_"
+                jdbc-type="VARCHAR"
+                nullable="false"
+                />
+
+        <reference-descriptor
+                name="person"
+                class-ref="org.apache.ojb.broker.OneToOneWithoutFKTest$Person"
+                auto-update="none"
+                auto-delete="none"
+                proxy="true">
+                        <foreignkey field-ref="id"/>
+       </reference-descriptor>
+    </class-descriptor>
+
+    <class-descriptor
+        class="org.apache.ojb.broker.OneToOneWithoutFKTest$Person"
+        table="ONE_TO_ONE_PERS">
+        <field-descriptor
+                name="id"
+                column="ID_"
+                jdbc-type="INTEGER"
+                primarykey="true"
+                nullable="false"
+                autoincrement="true"
+                />
+        <field-descriptor
+                name="name"
+                column="NAME_"
+                jdbc-type="VARCHAR"
+                nullable="false"
+                />
+        <reference-descriptor
+                name="passport"
+                class-ref="org.apache.ojb.broker.OneToOneWithoutFKTest$Passport"
+                auto-update="none"
+                auto-delete="none"
+                proxy="true">
+                        <foreignkey field-ref="id"/>
+       </reference-descriptor>
+    </class-descriptor>
+
+
 
 
     <!-- ************************************************* -->

Modified: db/ojb/trunk/src/test/org/apache/ojb/spy.properties
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/spy.properties?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/spy.properties (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/spy.properties Fri Jan 12 10:13:08 2007
@@ -58,7 +58,7 @@
 # realdriver=oracle.jdbc.driver.OracleDriver
 
 # mysql Connector/J driver
-#realdriver=com.mysql.jdbc.Driver
+# realdriver=com.mysql.jdbc.Driver
 
 # informix driver
 # realdriver=com.informix.jdbc.IfxDriver
@@ -76,9 +76,9 @@
 realdriver=org.hsqldb.jdbcDriver
 
 #specifies another driver to use
-realdriver2=
+realdriver2=com.sap.dbtech.jdbc.DriverSapDB
 #specifies a third driver to use
-realdriver3=
+realdriver3=org.gjt.mm.mysql.Driver
 
 ################################################################
 # P6LOG SPECIFIC PROPERTIES                                    #
@@ -185,8 +185,8 @@
 #                                                               #
 # Replace the real DataSource class in your application server  #
 # configuration with the name com.p6spy.engine.spy.P6DataSource,#
-# then add the JNDI name and class name of the real 		#
-# DataSource here	            				#
+# then add the JNDI name and class name of the real 		    #
+# DataSource here	            				                #
 #                                                               #
 # Values set in this item cannot be reloaded using the          #
 # reloadproperties variable.  Once it is loaded, it remains     #
@@ -221,7 +221,7 @@
 # do not use these properties, and the DataSource lookup will   #
 # use the naming context defined by the app server.             #
 #                                                               #
-# The two standard elements of the naming environment are	#
+# The two standard elements of the naming environment are	    #
 # jndicontextfactory and jndicontextproviderurl. If you need    #
 # additional elements, use the jndicontextcustom property.      #
 # You can define multiple properties in jndicontextcustom,      #
@@ -238,4 +238,4 @@
 #jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces
 
 #jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory
-#jndicontextproviderurl=iiop://localhost:900
\ No newline at end of file
+#jndicontextproviderurl=iiop://localhost:900

Modified: db/ojb/trunk/src/xdoclet/test/xdoclet/modules/ojb/tests/TestObjectCache.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/xdoclet/test/xdoclet/modules/ojb/tests/TestObjectCache.java?view=diff&rev=495673&r1=495672&r2=495673
==============================================================================
--- db/ojb/trunk/src/xdoclet/test/xdoclet/modules/ojb/tests/TestObjectCache.java (original)
+++ db/ojb/trunk/src/xdoclet/test/xdoclet/modules/ojb/tests/TestObjectCache.java Fri Jan 12 10:13:08 2007
@@ -15,8 +15,11 @@
  * limitations under the License.
  */
 
+import java.util.List;
+
 import org.apache.ojb.broker.Identity;
 import org.apache.ojb.broker.cache.ObjectCache;
+import org.apache.ojb.broker.cache.InvalidationListener;
 
 /**
  * Object cache class used in some of the unit tests.
@@ -51,6 +54,23 @@
     }
 
     public void remove(Identity oid)
+    {
+    }
+
+    public void addInvalidationListener(InvalidationListener listener)
+    {
+    }
+
+    public void removeInvalidationListener(InvalidationListener listener)
+    {
+    }
+
+    public List getAllInvalidationListener()
+    {
+        return null;
+    }
+
+    public void invalidateObject(Identity oid)
     {
     }
 }



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