You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Lon Varscsak <lo...@gmail.com> on 2017/03/09 20:40:53 UTC

New JCache returning hollow objects

Hey guys,

This morning I switched to the new JCache implementation (using EHCache 3
as the provider) however, when it returns objects from the cache I’m
getting hollow objects.  Any ideas?

-Lon

Re: New JCache returning hollow objects

Posted by Andrus Adamchik <an...@objectstyle.org>.
I was worried for a second :)

BTW, we just discovered a limitation specific to JCache, which may or may not be relevant to you:

https://issues.apache.org/jira/browse/CAY-2259

I am working on addressing it in M6 (and hopefully before that in Bootique).

Andrus

> On Mar 10, 2017, at 1:02 AM, Lon Varscsak <lo...@gmail.com> wrote:
> 
> Never mind, problem solved.  I turned out I had another bit of code using
> JCache (for something else) with the same cache name.  It was creating the
> cache first and specifying it should storeByValue = true (thereby causing
> copying of the CayenneDataObject on the second reference).
> 
> Whew. :P
> 
> -Lon
> 
> On Thu, Mar 9, 2017 at 1:40 PM, Lon Varscsak <lo...@gmail.com> wrote:
> 
>> Hey guys,
>> 
>> This morning I switched to the new JCache implementation (using EHCache 3
>> as the provider) however, when it returns objects from the cache I’m
>> getting hollow objects.  Any ideas?
>> 
>> -Lon
>> 


Re: New JCache returning hollow objects

Posted by Lon Varscsak <lo...@gmail.com>.
Never mind, problem solved.  I turned out I had another bit of code using
JCache (for something else) with the same cache name.  It was creating the
cache first and specifying it should storeByValue = true (thereby causing
copying of the CayenneDataObject on the second reference).

Whew. :P

-Lon

On Thu, Mar 9, 2017 at 1:40 PM, Lon Varscsak <lo...@gmail.com> wrote:

> Hey guys,
>
> This morning I switched to the new JCache implementation (using EHCache 3
> as the provider) however, when it returns objects from the cache I’m
> getting hollow objects.  Any ideas?
>
> -Lon
>