[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/pojo/passivation ...
Jason Thomas Greene
jgreene at jboss.com
Wed May 16 14:29:18 EDT 2007
User: jgreene
Date: 07/05/16 14:29:18
Modified: tests/functional/org/jboss/cache/pojo/passivation
ReplicatedTest.java
Log:
Move object refs from subnodes to fields
Revision Changes Path
1.3 +27 -1 JBossCache/tests/functional/org/jboss/cache/pojo/passivation/ReplicatedTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ReplicatedTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/passivation/ReplicatedTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ReplicatedTest.java 18 Feb 2007 07:16:29 -0000 1.2
+++ ReplicatedTest.java 16 May 2007 18:29:18 -0000 1.3
@@ -22,6 +22,8 @@
package org.jboss.cache.pojo.passivation;
+import java.util.Map;
+
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
@@ -29,6 +31,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.AbstractCacheListener;
import org.jboss.cache.Fqn;
+import org.jboss.cache.CacheListener.ModificationType;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.pojo.test.Address;
@@ -63,7 +66,7 @@
cache_.start();
- cache1_ = PojoCacheFactory.createCache(configFile, toStart);
+ cache1_ = PojoCacheFactory.createCache("META-INF/pojocache-passivation-service2.xml", toStart);
cache1_.getCache().getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.BatchModeTransactionManagerLookup");
listener_ = new MyCacheListener();
@@ -220,7 +223,10 @@
Thread.sleep(9100);
// Remove pojo joe will relocate the address field to ben's
+ System.out.println("=== DETACH====");
cache_.detach("/person/joe");
+ Thread.sleep(3000);
+ System.out.println("=== FIND === ");
add2 = (Address) ((Person) cache1_.find("/person/ben")).getAddress();
// assertEquals("City ", "Santa Clara", add2.getCity());
}
@@ -272,6 +278,26 @@
passivation = 0;
}
+
+ @Override
+ public void nodeCreated(Fqn fqn, boolean pre, boolean isLocal)
+ {
+ System.out.println("Created: " + fqn + " [" + pre + "][" + isLocal + "]");
+ }
+
+ @Override
+ public void nodeEvicted(Fqn fqn, boolean pre, boolean isLocal)
+ {
+ if (!pre)
+ System.out.println("nodeEvicted: " + fqn);
+ }
+
+ @Override
+ public void nodeModified(Fqn fqn, boolean pre, boolean isLocal, ModificationType modType, Map data)
+ {
+ System.out.println("Modified: " + fqn + " [" + pre + "][" + isLocal + "] " + modType + " " + data);
+ }
+
public void nodeActivated(Fqn fqn, boolean pre)
{
if (!pre)
More information about the jboss-cvs-commits
mailing list