Re: [Dev] [Carbon Caching] Caching won't work for objects from different bundles without dynamic imports

2016-06-02 Thread Afkham Azeez
When you are creating the Cache configuration (javax.cache.configuration.MutableConfiguration) you need to setStoreByValue(false). The JCache API 1.0 by default sets storeByValue to true. On Tue, May 31, 2016 at 12:28 PM, Jayanga Kaushalya wrote: > Hi Azeez, > > I have

Re: [Dev] [Carbon Caching] Caching won't work for objects from different bundles without dynamic imports

2016-05-31 Thread Sameera Jayasoma
More importantly, it will avoid dynamic import package header from the caching bundle. On Tue, May 31, 2016 at 12:28 PM, Jayanga Kaushalya wrote: > Hi Azeez, > > I have tested the option 1 and as we discussed offline, it will be the > most suitable option for us as it removes

Re: [Dev] [Carbon Caching] Caching won't work for objects from different bundles without dynamic imports

2016-05-31 Thread Jayanga Kaushalya
Hi Azeez, I have tested the option 1 and as we discussed offline, it will be the most suitable option for us as it removes the requirement of serializing the object before caching. Thanks! *Jayanga Kaushalya* Software Engineer Mobile: +94777860160 WSO2 Inc. | http://wso2.com

Re: [Dev] [Carbon Caching] Caching won't work for objects from different bundles without dynamic imports

2016-05-31 Thread Afkham Azeez
There are two options to resolve this without adding dynamic imports: 1. Use store by reference 2. Use the following constructor in CacheManager and pass the classloader public CarbonCacheManager(CarbonCachingProvider cachingProvider, URI uri, ClassLoader classLoader,

[Dev] [Carbon Caching] Caching won't work for objects from different bundles without dynamic imports

2016-05-26 Thread Jayanga Kaushalya
Hi, As per $subject if we want to cache a object from a different bundle other than carbon-caching, it will fail while giving a ClassNotFoundException in the deserialize() [1]. This can be overcome by enabling dynamic imports. [1]