New JCache returning hollow objects

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

New JCache returning hollow objects

Lon Varscsak
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
Reply | Threaded
Open this post in threaded view
|

Re: New JCache returning hollow objects

Lon Varscsak
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: New JCache returning hollow objects

Andrus Adamchik
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 <[hidden email]> 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 <[hidden email]> 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
>>