Forgot to mention:
Put was done in 1st .war,
where get is done in 2nd .war.
@Test
@InSequence(1)
@OperateOnModule("m1")
public void testPut() throws Exception {
Key key = ds.put(new Entity(MODULES_KIND, 1));
Assert.assertNotNull(key);
}
@Test
@InSequence(2)
@OperateOnModule("m2")
public void testGet() throws Exception {
Key key = KeyFactory.createKey(MODULES_KIND, 1);
Entity e = ds.get(key);
Assert.assertNotNull(e);
}
-Ales
On Aug 6, 2013, at 12:22 AM, Ales Justin <ales.justin(a)gmail.com> wrote:
> Anything obvious on why this lookup doesn't find its match?
>
> Some background:
> * I have .ear, with 2 .war sub-deployments
> * each .war has own Key class in own gae.jar (in WEB-INF/lib)
>
> I do set storeAsBinary on the cache, which is shared between both .wars.
>
> This first key is the key for 2nd lookup.
> Below are entries of previous puts.
>
> As you can see, entry under [1] should match lookup key.
> But DataContainer returns null -- no match.
>
> -Ales
>
> ---
>
> • key =
{org.infinispan.marshall.MarshalledValue@11787}"MarshalledValue{instance=Modules(1),
serialized=false, cachedHashCode=0}@8d2e9d9"
> • instance = {com.google.appengine.api.datastore.Key@11063}"Modules(1)"
> • parentKey = null
> • kind = {java.lang.String@11855}"Modules"
> • appId = {java.lang.String@11856}"tckear"
> • id = 1
> • name = null
> • appIdNamespace =
{com.google.appengine.api.datastore.AppIdNamespace@11857}"tckear"
> • checked = false
> • raw = null
> • serialisedSize = 128
> • cachedHashCode = 0
> • equalityPreferenceForInstance = true
> • marshaller = {org.infinispan.marshall.CacheMarshaller@11829}
>
> • entries = {org.infinispan.util.concurrent.BoundedConcurrentHashMap@11794} size =
3
> • [0] =
{org.infinispan.util.concurrent.BoundedConcurrentHashMap$WriteThroughEntry@11833}"MarshalledValue{instance=__namespace__(1),
serialized=false, cachedHashCode=112414304}@3131088" ->
"MarshalledValue{instance=__namespace__(1), serialized=false,
cachedHashCode=112414304}@3131088" -> "MarshalledValue{instance=
> • key: org.infinispan.marshall.MarshalledValue =
{org.infinispan.marshall.MarshalledValue@11807}"MarshalledValue{instance=__namespace__(1),
serialized=false, cachedHashCode=112414304}@3131088"
> • value: org.infinispan.container.entries.ImmortalCacheEntry =
{org.infinispan.container.entries.ImmortalCacheEntry@11808}"MarshalledValue{instance=__namespace__(1),
serialized=false, cachedHashCode=112414304}@3131088" ->
"MarshalledValue{instance=\n, serialized=false,
cachedHashCode=112414304}@7c2aef8c"
> • [1] =
{org.infinispan.util.concurrent.BoundedConcurrentHashMap$WriteThroughEntry@11835}"MarshalledValue{instance=Modules(1),
serialized=false, cachedHashCode=63491116}@3134f207" ->
"MarshalledValue{instance=Modules(1), serialized=false,
cachedHashCode=63491116}@3134f207" -> "MarshalledValue{instance=\n,
serialized=fa...
> • key: org.infinispan.marshall.MarshalledValue =
{org.infinispan.marshall.MarshalledValue@11811}"MarshalledValue{instance=Modules(1),
serialized=false, cachedHashCode=63491116}@3134f207"
> • instance = {com.google.appengine.api.datastore.Key@11671}"Modules(1)"
> • parentKey = null
> • kind = {java.lang.String@11855}"Modules"
> • appId = {java.lang.String@11856}"tckear"
> • id = 1
> • name = null
> • appIdNamespace =
{com.google.appengine.api.datastore.AppIdNamespace@11861}"tckear"
> • checked = true
> • raw = null
> • serialisedSize = 128
> • cachedHashCode = 63491116
> • equalityPreferenceForInstance = true
> • marshaller = {org.infinispan.marshall.CacheMarshaller@11829}
> • value: org.infinispan.container.entries.ImmortalCacheEntry =
{org.infinispan.container.entries.ImmortalCacheEntry@11812}"MarshalledValue{instance=Modules(1),
serialized=false, cachedHashCode=63491116}@3134f207" ->
"MarshalledValue{instance=\n, serialized=false,
cachedHashCode=63491116}@1f7425f2"
> • [2] =
{org.infinispan.util.concurrent.BoundedConcurrentHashMap$WriteThroughEntry@11836}"MarshalledValue{instance=__kind__("Modules"),
serialized=false, cachedHashCode=1413747955}@2ab5011f" ->
"MarshalledValue{instance=__kind__("Modules"), serialized=false,
cachedHashCode=1413747955}@2ab5011f" -> "MarshalledValue{instance=
> • key: org.infinispan.marshall.MarshalledValue =
{org.infinispan.marshall.MarshalledValue@11815}"MarshalledValue{instance=__kind__("Modules"),
serialized=false, cachedHashCode=1413747955}@2ab5011f"
> • value: org.infinispan.container.entries.ImmortalCacheEntry =
{org.infinispan.container.entries.ImmortalCacheEntry@11816}"MarshalledValue{instance=__kind__("Modules"),
serialized=false, cachedHashCode=1413747955}@2ab5011f" ->
"MarshalledValue{instance=\n, serialized=false,
cachedHashCode=1413747955}@1d6779db"
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev