[infinispan-dev] storeAsBinary + lookup

Ales Justin ales.justin at gmail.com
Mon Aug 5 18:31:55 EDT 2013


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 at 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 at 11787}"MarshalledValue{instance=Modules(1), serialized=false, cachedHashCode=0}@8d2e9d9"
> instance = {com.google.appengine.api.datastore.Key at 11063}"Modules(1)"
> parentKey = null
> kind = {java.lang.String at 11855}"Modules"
> appId = {java.lang.String at 11856}"tckear"
> id = 1
> name = null
> appIdNamespace = {com.google.appengine.api.datastore.AppIdNamespace at 11857}"tckear"
> checked = false
> raw = null
> serialisedSize = 128
> cachedHashCode = 0
> equalityPreferenceForInstance = true
> marshaller = {org.infinispan.marshall.CacheMarshaller at 11829}
> 
> entries = {org.infinispan.util.concurrent.BoundedConcurrentHashMap at 11794} size = 3
> [0] = {org.infinispan.util.concurrent.BoundedConcurrentHashMap$WriteThroughEntry at 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 at 11807}"MarshalledValue{instance=__namespace__(1), serialized=false, cachedHashCode=112414304}@3131088"
> value: org.infinispan.container.entries.ImmortalCacheEntry = {org.infinispan.container.entries.ImmortalCacheEntry at 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 at 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 at 11811}"MarshalledValue{instance=Modules(1), serialized=false, cachedHashCode=63491116}@3134f207"
> instance = {com.google.appengine.api.datastore.Key at 11671}"Modules(1)"
> parentKey = null
> kind = {java.lang.String at 11855}"Modules"
> appId = {java.lang.String at 11856}"tckear"
> id = 1
> name = null
> appIdNamespace = {com.google.appengine.api.datastore.AppIdNamespace at 11861}"tckear"
> checked = true
> raw = null
> serialisedSize = 128
> cachedHashCode = 63491116
> equalityPreferenceForInstance = true
> marshaller = {org.infinispan.marshall.CacheMarshaller at 11829}
> value: org.infinispan.container.entries.ImmortalCacheEntry = {org.infinispan.container.entries.ImmortalCacheEntry at 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 at 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 at 11815}"MarshalledValue{instance=__kind__("Modules"), serialized=false, cachedHashCode=1413747955}@2ab5011f"
> value: org.infinispan.container.entries.ImmortalCacheEntry = {org.infinispan.container.entries.ImmortalCacheEntry at 11816}"MarshalledValue{instance=__kind__("Modules"), serialized=false, cachedHashCode=1413747955}@2ab5011f" -> "MarshalledValue{instance=\n, serialized=false, cachedHashCode=1413747955}@1d6779db" 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20130806/e8b3fad7/attachment.html 


More information about the infinispan-dev mailing list