[jboss-cvs] JBossAS SVN: r104541 - in projects/cluster/ha-server-cache-jbc/trunk/src: test/java/org/jboss/web/tomcat/service/session/distributedcache/impl and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 6 17:57:37 EDT 2010
Author: bstansberry at jboss.com
Date: 2010-05-06 17:57:36 -0400 (Thu, 06 May 2010)
New Revision: 104541
Modified:
projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java
projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/CacheListener.java
projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/CacheListenerBase.java
projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/JBossCacheWrapper.java
projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/PassivationListener.java
projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/Util.java
projects/cluster/ha-server-cache-jbc/trunk/src/test/java/org/jboss/web/tomcat/service/session/distributedcache/impl/CacheListenerUnitTestCase.java
Log:
[JBCLUSTER-269] Properly deal with dead backup regions (there be dragons there!)
Modified: projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java 2010-05-06 21:32:24 UTC (rev 104540)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/AbstractJBossCacheService.java 2010-05-06 21:57:36 UTC (rev 104541)
@@ -579,16 +579,14 @@
for (Fqn<Object> fqn : fqns)
{
distributedCacheData = cacheWrapper_.getData(fqn, false);
- // Above call will return an empty map if fqn doesn't exist;
- // once we get a non-empty on that's the real data
- if (distributedCacheData.size() > 0)
+ if (distributedCacheData != null && distributedCacheData.size() > 0)
{
break;
}
}
}
- return getDistributableSessionData(realId, distributedCacheData, includeAttributes);
+ return distributedCacheData == null ? null : getDistributableSessionData(realId, distributedCacheData, includeAttributes);
}
/**
@@ -614,13 +612,36 @@
for (Node<Object, Object> owner : owners)
{
@SuppressWarnings("unchecked")
- Node webRoot = owner.getChild(webappFqn);
- if (webRoot != null)
+ Fqn<String> ownerFqn = owner.getFqn();
+ if (Util.isBuddyOwnerDead(ownerFqn))
{
- @SuppressWarnings("unchecked")
- Set<String> ids = webRoot.getChildrenNames();
- storeSessionOwners(ids, (String) owner.getFqn().getLastElement(), result);
+ Set<Object> ownerVersions = owner.getChildrenNames();
+ for (Object ownerVersion : ownerVersions)
+ {
+ // If we pulled node from FileCacheLoader, the type will
+ // be String, which is incorrect
+ boolean correctType = ownerVersion instanceof Integer;
+
+ Integer versionInt = correctType ?
+ (Integer) ownerVersion : Integer.valueOf(ownerVersion.toString());
+ Node<Object, Object> versionNode = owner.getChild(versionInt);
+
+ if (!correctType)
+ {
+ // We loaded a node with a bogus name type from FileCacheLoader.
+ // We need to evict it or it will screw up JBC code that assumes
+ // all names at this point in the tree are Integer
+ Fqn<Object> bogus = Fqn.fromRelativeElements(ownerFqn, ownerVersion);
+ this.cacheWrapper_.removeLocal(bogus);
+ }
+
+ storeSessionIdsForOwner(versionNode, webappFqn, result);
+ }
}
+ else
+ {
+ storeSessionIdsForOwner(owner, webappFqn, result);
+ }
}
}
}
@@ -637,6 +658,20 @@
Set<String> children = (node == null ? Collections.EMPTY_SET : node.getChildrenNames());
return children;
}
+
+ private void storeSessionIdsForOwner(Node<Object, Object> owner, Fqn<String> webappFqn, Map<String, String> result)
+ {
+ @SuppressWarnings("unchecked")
+ Node webRoot = owner.getChild(webappFqn);
+ if (webRoot != null)
+ {
+ @SuppressWarnings("unchecked")
+ Set<String> ids = webRoot.getChildrenNames();
+ @SuppressWarnings("unchecked")
+ String ownerName = Util.getBuddyOwner(owner.getFqn());
+ storeSessionOwners(ids, ownerName, result);
+ }
+ }
private void storeSessionOwners(Set<String> ids, String owner, Map<String, String> map)
{
@@ -790,6 +825,17 @@
Set<Object> buddies = plainCache_.getChildrenNames(dead); // won't return null
for (Object child : buddies)
{
+ if (!(child instanceof Integer))
+ {
+ log_.warn("Found child of type " + child.getClass() + " under fqn " + dead, new Exception("Just a stack trace"));
+ Object orig = child;
+ child = Integer.valueOf(orig.toString());
+ // In case we loaded a node with a bogus name type from FileCacheLoader
+ // we need to evict it or it will screw up JBC code that assumes
+ // all names at this point in the tree are Integer
+ Fqn<Object> bogus = Fqn.fromElements(BUDDY_BACKUP, deadBuddy, orig);
+ this.cacheWrapper_.removeLocal(bogus);
+ }
result.add(Fqn.fromElements(BUDDY_BACKUP, deadBuddy, child, SESSION, contextHostPath, sessionId));
}
return result;
Modified: projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/CacheListener.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/CacheListener.java 2010-05-06 21:32:24 UTC (rev 104540)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/CacheListener.java 2010-05-06 21:57:36 UTC (rev 104541)
@@ -78,7 +78,7 @@
@SuppressWarnings("unchecked")
Fqn<String> fqn = event.getFqn();
boolean isBuddy = isBuddyFqn(fqn);
- int baseIdx = getJSessionIndex(fqn, isBuddy);
+ int baseIdx = Util.getJSessionIndex(fqn, isBuddy);
if (!local
&& isFqnSessionRootSized(fqn, baseIdx)
@@ -114,7 +114,7 @@
@SuppressWarnings("unchecked")
Fqn<String> fqn = event.getFqn();
boolean isBuddy = isBuddyFqn(fqn);
- int baseIdx = getJSessionIndex(fqn, isBuddy);
+ int baseIdx = Util.getJSessionIndex(fqn, isBuddy);
if (!local
&& isFqnSessionRootSized(fqn, baseIdx)
@@ -128,7 +128,7 @@
if(version != null)
{
String realId = getIdFromFqn(fqn, baseIdx);
- String owner = isBuddy ? getBuddyOwner(fqn) : null;
+ String owner = isBuddy ? Util.getBuddyOwner(fqn) : null;
Long timestamp = (Long) data.get(AbstractJBossCacheService.TIMESTAMP_KEY);
if (timestamp == null)
{
@@ -181,7 +181,7 @@
@Deprecated
public static String getPojoKeyFromFqn(Fqn<String> fqn, boolean isBuddy)
{
- int index = getJSessionIndex(fqn, isBuddy);
+ int index = Util.getJSessionIndex(fqn, isBuddy);
return getPojoKeyFromFqn(fqn, index);
}
@@ -237,7 +237,7 @@
@Deprecated
public static boolean isPossibleInternalPojoFqn(Fqn<String> fqn)
{
- int index = getJSessionIndex(fqn, false);
+ int index = Util.getJSessionIndex(fqn, false);
return isPossibleInternalPojoFqn(fqn, index);
}
}
Modified: projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/CacheListenerBase.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/CacheListenerBase.java 2010-05-06 21:32:24 UTC (rev 104540)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/CacheListenerBase.java 2010-05-06 21:57:36 UTC (rev 104541)
@@ -36,10 +36,6 @@
private static final int WEBAPP_FQN_INDEX = 1;
protected static final int SESSION_ID_FQN_INDEX = 2;
private static final int SESSION_FQN_SIZE = SESSION_ID_FQN_INDEX + 1;
- private static final int BUDDY_BACKUP_ROOT_OWNER_INDEX = BuddyManager.BUDDY_BACKUP_SUBTREE_FQN.size();
- protected static final int BUDDY_BACKUP_ROOT_OWNER_SIZE = BUDDY_BACKUP_ROOT_OWNER_INDEX + 1;
- private static final String DEAD_BUDDY_SUFFIX = ":DEAD";
- private static final String JSESSION = AbstractJBossCacheService.SESSION;
protected LocalDistributableSessionManager manager_;
private String contextHostPath_;
@@ -50,33 +46,6 @@
this.contextHostPath_ = contextHostPath;
}
- public static final int getJSessionIndex(Fqn<String> fqn, boolean isBuddy)
- {
- try
- {
- if (!isBuddy && JSESSION.equals(fqn.get(0)))
- {
- return 0;
- }
- else if (isBuddy)
- {
- if (JSESSION.equals(fqn.get(BUDDY_BACKUP_ROOT_OWNER_INDEX + 1)))
- {
- return BUDDY_BACKUP_ROOT_OWNER_INDEX + 1;
- }
- else if (JSESSION.equals(fqn.get(BUDDY_BACKUP_ROOT_OWNER_INDEX + 2)))
- {
- return BUDDY_BACKUP_ROOT_OWNER_INDEX + 2;
- }
- }
- }
- catch (IndexOutOfBoundsException e)
- {
- // too small; just fall through
- }
- return -1;
- }
-
protected boolean isFqnForOurWebapp(Fqn<String> fqn, int jsessionIndex)
{
try
@@ -94,7 +63,7 @@
@Deprecated
protected boolean isFqnForOurWebapp(Fqn<String> fqn, boolean isBuddy)
{
- int index = getJSessionIndex(fqn, isBuddy);
+ int index = Util.getJSessionIndex(fqn, isBuddy);
return isFqnForOurWebapp(fqn, index);
}
@@ -106,7 +75,7 @@
@Deprecated
public static boolean isFqnSessionRootSized(Fqn<String> fqn, boolean isBuddy)
{
- int index = getJSessionIndex(fqn, isBuddy);
+ int index = Util.getJSessionIndex(fqn, isBuddy);
return (isBuddy ? index > 0 && isFqnSessionRootSized(fqn, index) : isFqnSessionRootSized(fqn, index));
}
@@ -118,7 +87,7 @@
@Deprecated
public static String getIdFromFqn(Fqn<String> fqn, boolean isBuddy)
{
- int index = getJSessionIndex(fqn, isBuddy);
+ int index = Util.getJSessionIndex(fqn, isBuddy);
return getIdFromFqn(fqn, index);
}
@@ -136,15 +105,4 @@
return false;
}
}
-
- /**
- * Extracts the owner portion of an buddy subtree Fqn.
- *
- * @param fqn An Fqn that is a child of the buddy backup root node.
- */
- public static String getBuddyOwner(Fqn<String> fqn)
- {
- String base = (String) fqn.get(BUDDY_BACKUP_ROOT_OWNER_INDEX);
- return base.endsWith(DEAD_BUDDY_SUFFIX) ? base.substring(0, base.length() - DEAD_BUDDY_SUFFIX.length()): base;
- }
}
\ No newline at end of file
Modified: projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/JBossCacheWrapper.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/JBossCacheWrapper.java 2010-05-06 21:32:24 UTC (rev 104540)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/JBossCacheWrapper.java 2010-05-06 21:57:36 UTC (rev 104541)
@@ -21,6 +21,7 @@
*/
package org.jboss.web.tomcat.service.session.distributedcache.impl.jbc;
+import java.util.Collections;
import java.util.Map;
import java.util.Random;
Modified: projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/PassivationListener.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/PassivationListener.java 2010-05-06 21:32:24 UTC (rev 104540)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/PassivationListener.java 2010-05-06 21:57:36 UTC (rev 104541)
@@ -65,7 +65,7 @@
{
@SuppressWarnings("unchecked")
Fqn<String> fqn = event.getFqn();
- int baseIdx = getJSessionIndex(fqn, isBuddyFqn(fqn));
+ int baseIdx = Util.getJSessionIndex(fqn, isBuddyFqn(fqn));
if (isFqnSessionRootSized(fqn, baseIdx)
&& isFqnForOurWebapp(fqn, baseIdx))
{
Modified: projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/Util.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/Util.java 2010-05-06 21:32:24 UTC (rev 104540)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/session/distributedcache/impl/jbc/Util.java 2010-05-06 21:57:36 UTC (rev 104541)
@@ -25,6 +25,8 @@
import org.jboss.cache.Cache;
import org.jboss.cache.CacheManager;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.buddyreplication.BuddyManager;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.ha.framework.server.CacheManagerLocator;
import org.jboss.ha.framework.server.PojoCacheManager;
@@ -42,6 +44,10 @@
*/
public class Util
{
+ private static final int BUDDY_BACKUP_ROOT_OWNER_INDEX = BuddyManager.BUDDY_BACKUP_SUBTREE_FQN.size();
+ private static final String DEAD_BUDDY_SUFFIX = ":DEAD";
+ private static final String JSESSION = AbstractJBossCacheService.SESSION;
+
public static ReplicationGranularity getReplicationGranularity(LocalDistributableSessionManager localManager)
{
ReplicationConfig config = localManager.getReplicationConfig();
@@ -230,7 +236,51 @@
}
}
+ public static final int getJSessionIndex(Fqn<String> fqn, boolean isBuddy)
+ {
+ try
+ {
+ if (!isBuddy && JSESSION.equals(fqn.get(0)))
+ {
+ return 0;
+ }
+ else if (isBuddy)
+ {
+ if (JSESSION.equals(fqn.get(BUDDY_BACKUP_ROOT_OWNER_INDEX + 1)))
+ {
+ return BUDDY_BACKUP_ROOT_OWNER_INDEX + 1;
+ }
+ else if (JSESSION.equals(fqn.get(BUDDY_BACKUP_ROOT_OWNER_INDEX + 2)))
+ {
+ return BUDDY_BACKUP_ROOT_OWNER_INDEX + 2;
+ }
+ }
+ }
+ catch (IndexOutOfBoundsException e)
+ {
+ // too small; just fall through
+ }
+ return -1;
+ }
+
+ public static boolean isBuddyOwnerDead(Fqn<String> fqn)
+ {
+ String base = (String) fqn.get(BUDDY_BACKUP_ROOT_OWNER_INDEX);
+ return base.endsWith(DEAD_BUDDY_SUFFIX);
+ }
+
/**
+ * Extracts the owner portion of an buddy subtree Fqn.
+ *
+ * @param fqn An Fqn that is a child of the buddy backup root node.
+ */
+ public static String getBuddyOwner(Fqn<String> fqn)
+ {
+ String base = (String) fqn.get(BUDDY_BACKUP_ROOT_OWNER_INDEX);
+ return base.endsWith(DEAD_BUDDY_SUFFIX) ? base.substring(0, base.length() - DEAD_BUDDY_SUFFIX.length()): base;
+ }
+
+ /**
* Prevent instantiation.
*/
private Util() {}
Modified: projects/cluster/ha-server-cache-jbc/trunk/src/test/java/org/jboss/web/tomcat/service/session/distributedcache/impl/CacheListenerUnitTestCase.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/test/java/org/jboss/web/tomcat/service/session/distributedcache/impl/CacheListenerUnitTestCase.java 2010-05-06 21:32:24 UTC (rev 104540)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/test/java/org/jboss/web/tomcat/service/session/distributedcache/impl/CacheListenerUnitTestCase.java 2010-05-06 21:57:36 UTC (rev 104541)
@@ -31,6 +31,7 @@
import org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListenerBase;
import org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.FieldBasedJBossCacheService;
import org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.SessionBasedJBossCacheService;
+import org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.Util;
/**
* A CacheListenerUnitTestCase.
@@ -64,57 +65,57 @@
public void testGetBuddyBackupOwner()
{
Fqn<String> test = BUDDY_BASE;
- assertEquals("Got correct owner", DATA_OWNER, CacheListenerBase.getBuddyOwner(test));
+ assertEquals("Got correct owner", DATA_OWNER, Util.getBuddyOwner(test));
test = DEAD_BUDDY_BASE;
- assertEquals("Got correct owner from dead tree", DATA_OWNER, CacheListenerBase.getBuddyOwner(test));
+ assertEquals("Got correct owner from dead tree", DATA_OWNER, Util.getBuddyOwner(test));
}
public void testGetJSessionIndex()
{
Fqn<String> test = BASE;
- assertEquals(0, CacheListenerBase.getJSessionIndex(test, false));
- assertEquals(-1, CacheListenerBase.getJSessionIndex(test, true));
+ assertEquals(0, Util.getJSessionIndex(test, false));
+ assertEquals(-1, Util.getJSessionIndex(test, true));
test = BUDDY_BASE;
- assertEquals(2, CacheListenerBase.getJSessionIndex(test, true));
- assertEquals(-1, CacheListenerBase.getJSessionIndex(test, false));
+ assertEquals(2, Util.getJSessionIndex(test, true));
+ assertEquals(-1, Util.getJSessionIndex(test, false));
test = DEAD_BUDDY_BASE;
- assertEquals(3, CacheListenerBase.getJSessionIndex(test, true));
- assertEquals(-1, CacheListenerBase.getJSessionIndex(test, false));
+ assertEquals(3, Util.getJSessionIndex(test, true));
+ assertEquals(-1, Util.getJSessionIndex(test, false));
- assertEquals(-1, CacheListenerBase.getJSessionIndex(Fqn.ROOT, false));
+ assertEquals(-1, Util.getJSessionIndex(Fqn.ROOT, false));
}
public void testIsFqnSessionRootSized()
{
Fqn<String> test = BASE;
- int idx = CacheListenerBase.getJSessionIndex(test, false);
+ int idx = Util.getJSessionIndex(test, false);
assertTrue("Non-buddy session root correct", CacheListenerBase.isFqnSessionRootSized(test, idx));
test = BUDDY_BASE;
- idx = CacheListenerBase.getJSessionIndex(test, true);
+ idx = Util.getJSessionIndex(test, true);
assertTrue("Buddy session root correct", CacheListenerBase.isFqnSessionRootSized(test, idx));
test = Fqn.fromRelativeElements(BASE, FieldBasedJBossCacheService.ATTRIBUTE);
- idx = CacheListenerBase.getJSessionIndex(test, false);
+ idx = Util.getJSessionIndex(test, false);
assertFalse("Non-buddy non-session root correct", CacheListenerBase.isFqnSessionRootSized(test, idx));
test = BUDDY_BASE;
test = Fqn.fromRelativeElements(test, FieldBasedJBossCacheService.ATTRIBUTE);
- idx = CacheListenerBase.getJSessionIndex(test, true);
+ idx = Util.getJSessionIndex(test, true);
assertFalse("Buddy non-session root correct", CacheListenerBase.isFqnSessionRootSized(test, idx));
test = DEAD_BUDDY_BASE;
- idx = CacheListenerBase.getJSessionIndex(test, true);
+ idx = Util.getJSessionIndex(test, true);
assertTrue("Buddy session root correct", CacheListenerBase.isFqnSessionRootSized(test, idx));
test = Fqn.fromRelativeElements(test, FieldBasedJBossCacheService.ATTRIBUTE);
- idx = CacheListenerBase.getJSessionIndex(test, true);
+ idx = Util.getJSessionIndex(test, true);
assertFalse("Buddy non-session root correct", CacheListenerBase.isFqnSessionRootSized(test, idx));
test = Fqn.ROOT;
- idx = CacheListenerBase.getJSessionIndex(test, false);
+ idx = Util.getJSessionIndex(test, false);
assertFalse("Fqn.ROOT correct", CacheListenerBase.isFqnSessionRootSized(test, idx));
}
@@ -147,20 +148,20 @@
public void testIsPossibleInternalPojoFqn()
{
Fqn<String> test = BASE;
- int idx = CacheListenerBase.getJSessionIndex(test, false);
+ int idx = Util.getJSessionIndex(test, false);
assertFalse("Session root correct", CacheListener.isPossibleInternalPojoFqn(test, idx));
test = FieldBasedJBossCacheService.getAttributeFqn(CONTEXT_HOST_PATH, "123");
- idx = CacheListenerBase.getJSessionIndex(test, false);
+ idx = Util.getJSessionIndex(test, false);
assertFalse("ATTRIBUTE fqn correct", CacheListener.isPossibleInternalPojoFqn(test, idx));
test = FieldBasedJBossCacheService.getFieldFqn(CONTEXT_HOST_PATH, "123", "person");
- idx = CacheListenerBase.getJSessionIndex(test, false);
+ idx = Util.getJSessionIndex(test, false);
assertFalse("Pojo attach point correct", CacheListener.isPossibleInternalPojoFqn(test, idx));
test = Fqn.fromRelativeElements(BASE, "_JBossInternal_");
test = Fqn.fromRelativeElements(test, "person");
- idx = CacheListenerBase.getJSessionIndex(test, false);
+ idx = Util.getJSessionIndex(test, false);
assertTrue("Internal pojo correct", CacheListener.isPossibleInternalPojoFqn(test, idx));
}
@@ -184,21 +185,21 @@
public void testGetPojoKeyFromFqn()
{
Fqn<String> test = FieldBasedJBossCacheService.getFieldFqn(CONTEXT_HOST_PATH, "123", "person");
- int idx = CacheListenerBase.getJSessionIndex(test, false);
+ int idx = Util.getJSessionIndex(test, false);
assertEquals("Non-buddy pojo field correct", "person", CacheListener.getPojoKeyFromFqn(test, idx));
test = FieldBasedJBossCacheService.getFieldFqn(CONTEXT_HOST_PATH, "123", "person");
test = Fqn.fromRelativeElements(test, "subobject");
- idx = CacheListenerBase.getJSessionIndex(test, false);
+ idx = Util.getJSessionIndex(test, false);
assertEquals("Non-buddy pojo field correct with subobject", "person", CacheListener.getPojoKeyFromFqn(test, idx));
test = Fqn.fromRelativeElements(BUDDY_BASE, FieldBasedJBossCacheService.ATTRIBUTE);
test = Fqn.fromRelativeElements(test, "person");
- idx = CacheListenerBase.getJSessionIndex(test, true);
+ idx = Util.getJSessionIndex(test, true);
assertEquals("Buddy pojo field correct", "person", CacheListener.getPojoKeyFromFqn(test, idx));
test = Fqn.fromRelativeElements(test, "subobject");
- idx = CacheListenerBase.getJSessionIndex(test, true);
+ idx = Util.getJSessionIndex(test, true);
assertEquals("Buddy pojo field correct with subobject", "person", CacheListener.getPojoKeyFromFqn(test, idx));
}
More information about the jboss-cvs-commits
mailing list