Author: jason.greene(a)jboss.com
Date: 2008-06-11 19:23:57 -0400 (Wed, 11 Jun 2008)
New Revision: 5975
Modified:
pojo/trunk/pom.xml
pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/ObjectGraphHandler.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/LocalConcurrentTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/LocalTxTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/NewReplicatedTxTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedCircularGraphTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedObjectGraphTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedTxTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/demo/PojoCacheView.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/memory/ReplicatedTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/optimistic/AbstractOptimisticTestCase.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/region/LocalConcurrentTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/region/LocalTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/rollback/PojoCollectionRollbackTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/rollback/ReplicatedTxTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/statetransfer/ReplicatedTest.java
pojo/trunk/src/test/java/org/jboss/cache/pojo/statetransfer/StateTransferAopTestBase.java
pojo/trunk/src/test/resources/log4j.xml
Log:
Update to core cache 2.2.0.CR3
Modified: pojo/trunk/pom.xml
===================================================================
--- pojo/trunk/pom.xml 2008-06-11 14:20:32 UTC (rev 5974)
+++ pojo/trunk/pom.xml 2008-06-11 23:23:57 UTC (rev 5975)
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<properties>
<jbosscache-pojo-version>2.2.0-SNAPSHOT</jbosscache-pojo-version>
- <jbosscache-core-version>2.1.0-SNAPSHOT</jbosscache-core-version>
+ <jbosscache-core-version>2.2.0.CR3</jbosscache-core-version>
<jboss.aop.version>2.0.0-SNAPSHOT</jboss.aop.version>
</properties>
<parent>
Modified: pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/ObjectGraphHandler.java
===================================================================
--- pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/ObjectGraphHandler.java 2008-06-11
14:20:32 UTC (rev 5974)
+++ pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/ObjectGraphHandler.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -31,12 +31,12 @@
this.cache = cache;
internal_ = internal;
}
-
+
protected Fqn<?> getFqn(Object obj)
{
return null;
}
-
+
protected boolean handles(Class<?> clazz)
{
return false;
@@ -89,8 +89,8 @@
+ " Will just de-reference it.");
}
removeFromReference(fqn, referencingFqn);
-
- return null;
+
+ return null;
}
/**
@@ -133,12 +133,6 @@
private int decrementRefCount(Fqn<?> originalFqn, Fqn<?> referencingFqn)
throws CacheException
{
- int count = 0;
- if ((count = internal_.decrementRefCount(originalFqn, referencingFqn)) ==
(PojoInstance.INITIAL_COUNTER_VALUE + 1))
- {
- internal_.removeIndirectFqn(originalFqn.toString());
- }
-
- return count;
+ return internal_.decrementRefCount(originalFqn, referencingFqn);
}
}
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/LocalConcurrentTest.java
===================================================================
--- pojo/trunk/src/test/java/org/jboss/cache/pojo/LocalConcurrentTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++ pojo/trunk/src/test/java/org/jboss/cache/pojo/LocalConcurrentTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -18,7 +18,7 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.UpgradeException;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.test.Address;
import org.jboss.cache.pojo.test.Person;
import org.jboss.cache.transaction.DummyTransactionManager;
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/LocalTxTest.java
===================================================================
--- pojo/trunk/src/test/java/org/jboss/cache/pojo/LocalTxTest.java 2008-06-11 14:20:32 UTC
(rev 5974)
+++ pojo/trunk/src/test/java/org/jboss/cache/pojo/LocalTxTest.java 2008-06-11 23:23:57 UTC
(rev 5975)
@@ -24,7 +24,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.test.Address;
import org.jboss.cache.pojo.test.Person;
import org.jboss.cache.transaction.DummyTransactionManager;
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/NewReplicatedTxTest.java
===================================================================
--- pojo/trunk/src/test/java/org/jboss/cache/pojo/NewReplicatedTxTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++ pojo/trunk/src/test/java/org/jboss/cache/pojo/NewReplicatedTxTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -26,7 +26,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.test.Address;
import org.jboss.cache.pojo.test.Person;
import org.jboss.cache.transaction.DummyTransactionManager;
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedCircularGraphTest.java
===================================================================
---
pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedCircularGraphTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++
pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedCircularGraphTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -19,7 +19,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.test.Link;
import org.jboss.cache.pojo.test.NodeManager;
import org.jboss.cache.pojo.test.Person;
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedObjectGraphTest.java
===================================================================
---
pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedObjectGraphTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++
pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedObjectGraphTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -7,7 +7,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.test.Address;
import org.jboss.cache.pojo.test.Person;
import org.testng.annotations.AfterMethod;
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedTxTest.java
===================================================================
--- pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedTxTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++ pojo/trunk/src/test/java/org/jboss/cache/pojo/ReplicatedTxTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -19,7 +19,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.test.Person;
import org.jboss.cache.transaction.DummyTransactionManager;
import org.testng.annotations.AfterMethod;
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/demo/PojoCacheView.java
===================================================================
--- pojo/trunk/src/test/java/org/jboss/cache/pojo/demo/PojoCacheView.java 2008-06-11
14:20:32 UTC (rev 5974)
+++ pojo/trunk/src/test/java/org/jboss/cache/pojo/demo/PojoCacheView.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -3,7 +3,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.demo.CacheModelDelegate;
-import org.jboss.cache.demo.JBossCacheGUI;
import org.jboss.cache.demo.JBossCacheView;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
@@ -18,12 +17,6 @@
private static Log log = LogFactory.getLog(PojoCacheView.class.getName());
@Override
- protected JBossCacheGUI createCacheGUI(CacheModelDelegate cacheDelegate, boolean
useConsole) throws Exception
- {
- return new PojoCacheGUI(cacheDelegate, useConsole);
- }
-
- @Override
protected CacheModelDelegate createCacheDelegate() throws Exception
{
PojoCache pojoCache = PojoCacheFactory.createCache(getConfigurationFile(), false);
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/memory/ReplicatedTest.java
===================================================================
--- pojo/trunk/src/test/java/org/jboss/cache/pojo/memory/ReplicatedTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++ pojo/trunk/src/test/java/org/jboss/cache/pojo/memory/ReplicatedTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -19,7 +19,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.pojo.test.Address;
Modified:
pojo/trunk/src/test/java/org/jboss/cache/pojo/optimistic/AbstractOptimisticTestCase.java
===================================================================
---
pojo/trunk/src/test/java/org/jboss/cache/pojo/optimistic/AbstractOptimisticTestCase.java 2008-06-11
14:20:32 UTC (rev 5974)
+++
pojo/trunk/src/test/java/org/jboss/cache/pojo/optimistic/AbstractOptimisticTestCase.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -30,27 +30,20 @@
import javax.transaction.SystemException;
import javax.transaction.TransactionManager;
-import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.commands.ReversibleCommand;
+import org.jboss.cache.commands.VersionedDataCommand;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
-import org.jboss.cache.interceptors.Interceptor;
-import org.jboss.cache.interceptors.InvocationContextInterceptor;
-import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
-import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
-import org.jboss.cache.interceptors.OptimisticReplicationInterceptor;
-import org.jboss.cache.interceptors.TxInterceptor;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.marshall.MethodCall;
-import org.jboss.cache.marshall.MethodCallFactory;
-import org.jboss.cache.marshall.MethodDeclarations;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.optimistic.DefaultDataVersion;
import org.jboss.cache.optimistic.TestListener;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.transaction.DummyTransactionManager;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.xml.XmlHelper;
import org.testng.annotations.AfterMethod;
import org.w3c.dom.Element;
@@ -312,39 +305,6 @@
}
}
- protected Interceptor getAlteredInterceptorChain(Interceptor newLast,
CacheSPI<Object, Object> spi, boolean replicated)
- {
- Interceptor ici = new InvocationContextInterceptor();
- ici.setCache(spi);
-
- Interceptor txInterceptor = new TxInterceptor();
- txInterceptor.setCache(spi);
-
- Interceptor replicationInterceptor = new OptimisticReplicationInterceptor();
- replicationInterceptor.setCache(spi);
-
- Interceptor createInterceptor = new OptimisticCreateIfNotExistsInterceptor();
- createInterceptor.setCache(spi);
-
- Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
- nodeInterceptor.setCache(spi);
-
- ici.setNext(txInterceptor);
- if (replicated)
- {
- txInterceptor.setNext(replicationInterceptor);
- replicationInterceptor.setNext(createInterceptor);
- }
- else
- {
- txInterceptor.setNext(createInterceptor);
- }
- createInterceptor.setNext(nodeInterceptor);
- nodeInterceptor.setNext(newLast);
-
- return ici;
- }
-
public abstract class ExceptionThread extends Thread
{
protected Exception exception;
@@ -360,19 +320,25 @@
}
}
- protected List<MethodCall> injectDataVersion(List<MethodCall>
modifications)
+
+
+ protected List<ReversibleCommand>
injectDataVersion(List<ReversibleCommand> modifications)
{
List<MethodCall> newList = new LinkedList<MethodCall>();
- for (MethodCall c : modifications)
+ for (ReversibleCommand c : modifications)
{
- Object[] oa = c.getArgs();
- Object[] na = new Object[oa.length + 1];
- System.out.println("*** " + oa.length);
- System.arraycopy(oa, 0, na, 0, oa.length);
- na[oa.length] = new DefaultDataVersion();
- newList.add(MethodCallFactory.create(c.getMethodId(), na));
+ if (c instanceof VersionedDataCommand)
+ {
+ ((VersionedDataCommand) c).setDataVersion(new DefaultDataVersion());
+ }
+// Object[] oa = c.getArgs();
+// Object[] na = new Object[oa.length + 1];
+// System.out.println("*** " + oa.length);
+// System.arraycopy(oa, 0, na, 0, oa.length);
+// na[oa.length] = new DefaultDataVersion();
+//
newList.add(MethodCallFactory.create(MethodDeclarations.getVersionedMethodId(c.getMethodId()),
na));
}
- return newList;
+ return modifications;
}
}
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/region/LocalConcurrentTest.java
===================================================================
---
pojo/trunk/src/test/java/org/jboss/cache/pojo/region/LocalConcurrentTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++
pojo/trunk/src/test/java/org/jboss/cache/pojo/region/LocalConcurrentTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -17,7 +17,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.lock.UpgradeException;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.pojo.test.Address;
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/region/LocalTest.java
===================================================================
--- pojo/trunk/src/test/java/org/jboss/cache/pojo/region/LocalTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++ pojo/trunk/src/test/java/org/jboss/cache/pojo/region/LocalTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -22,7 +22,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.aop.proxy.ClassProxy;
-import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.pojo.PojoCache;
Modified:
pojo/trunk/src/test/java/org/jboss/cache/pojo/rollback/PojoCollectionRollbackTest.java
===================================================================
---
pojo/trunk/src/test/java/org/jboss/cache/pojo/rollback/PojoCollectionRollbackTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++
pojo/trunk/src/test/java/org/jboss/cache/pojo/rollback/PojoCollectionRollbackTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -19,6 +19,18 @@
import javax.transaction.TransactionManager;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.ConsoleListener;
+import org.jboss.cache.notifications.annotation.CacheListener;
+import org.jboss.cache.notifications.annotation.NodeActivated;
+import org.jboss.cache.notifications.annotation.NodeCreated;
+import org.jboss.cache.notifications.annotation.NodeModified;
+import org.jboss.cache.notifications.annotation.NodePassivated;
+import org.jboss.cache.notifications.annotation.NodeRemoved;
+import org.jboss.cache.notifications.annotation.NodeVisited;
+import org.jboss.cache.notifications.event.NodeEvent;
+import org.jboss.cache.notifications.event.NodeModifiedEvent;
+import org.jboss.cache.notifications.event.NodeVisitedEvent;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.transaction.DummyTransactionManager;
@@ -63,7 +75,6 @@
{
System.out.println("testNestedMapAndIndexWithModifyRollback");
startTest();
-
// create cached data objects
Map<String, String> obj1 = new HashMap<String, String>();
obj1.put(ID, "1");
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/rollback/ReplicatedTxTest.java
===================================================================
---
pojo/trunk/src/test/java/org/jboss/cache/pojo/rollback/ReplicatedTxTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++
pojo/trunk/src/test/java/org/jboss/cache/pojo/rollback/ReplicatedTxTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -26,7 +26,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.pojo.test.Person;
Modified: pojo/trunk/src/test/java/org/jboss/cache/pojo/statetransfer/ReplicatedTest.java
===================================================================
---
pojo/trunk/src/test/java/org/jboss/cache/pojo/statetransfer/ReplicatedTest.java 2008-06-11
14:20:32 UTC (rev 5974)
+++
pojo/trunk/src/test/java/org/jboss/cache/pojo/statetransfer/ReplicatedTest.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -26,7 +26,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheImpl;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.pojo.PojoCache;
Modified:
pojo/trunk/src/test/java/org/jboss/cache/pojo/statetransfer/StateTransferAopTestBase.java
===================================================================
---
pojo/trunk/src/test/java/org/jboss/cache/pojo/statetransfer/StateTransferAopTestBase.java 2008-06-11
14:20:32 UTC (rev 5974)
+++
pojo/trunk/src/test/java/org/jboss/cache/pojo/statetransfer/StateTransferAopTestBase.java 2008-06-11
23:23:57 UTC (rev 5975)
@@ -37,7 +37,7 @@
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.CacheLoader;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.pojo.test.Address;
Modified: pojo/trunk/src/test/resources/log4j.xml
===================================================================
--- pojo/trunk/src/test/resources/log4j.xml 2008-06-11 14:20:32 UTC (rev 5974)
+++ pojo/trunk/src/test/resources/log4j.xml 2008-06-11 23:23:57 UTC (rev 5975)
@@ -63,7 +63,7 @@
<!-- ================ -->
<category name="org.jboss.cache">
- <priority value="WARN"/>
+ <priority value="DEBUG"/>
</category>
<category name="org.jboss.tm">