On Wed, Jul 10, 2013 at 2:33 PM, Afkham Azeez <[email protected]> wrote:

> Prabath said that the UserRealm does not have to be in a replicated cache,
> so I introduced the concept of a local cache to the caching implementation.
> In order to get a local cache, the cache name has to start with the
> following;
>
>     public static final String LOCAL_CACHE_PREFIX = "$__local__$.";
>
>
> So RealCache code was changed to provide the cache name as follows:
>
> public static final String CUSTOM_TENANT_CACHE =
>             CachingConstants.LOCAL_CACHE_PREFIX + "CUSTOM_TENANT_CACHE";
>

For local things why it is required to add to distributed cache? We can
keep them in a map or some place within the OSGI service.

thanks,
Amila.

>
>
> On Wed, Jul 10, 2013 at 1:20 PM, Amila Suriarachchi <[email protected]>wrote:
>
>> IMHO we should not cache whole user realm. Only thing we need to cache is
>> the authorisation details.
>>
>> The problem with authorisation details this that when one node
>> enable/disable them it has to appear on all nodes. User realm is some thing
>> we need to build from the configuration and keep in local memory.
>>
>> thanks
>> Amila.
>>
>>
>> On Wed, Jul 10, 2013 at 12:49 PM, Afkham Azeez <[email protected]> wrote:
>>
>>> [2013-07-10 12:47:30,491]  WARN
>>> {org.wso2.carbon.user.core.common.DefaultRealm} -  You cannot disable the
>>> primary user store.
>>> [2013-07-10 12:47:30,554] ERROR
>>> {org.wso2.carbon.user.core.common.DefaultRealmService} -
>>>  java.io.NotSerializableException:
>>> org.wso2.carbon.user.core.common.DefaultRealm
>>> com.hazelcast.nio.HazelcastSerializationException:
>>> java.io.NotSerializableException:
>>> org.wso2.carbon.user.core.common.DefaultRealm
>>> at
>>> com.hazelcast.nio.AbstractSerializer.toByte(AbstractSerializer.java:111)
>>>  at
>>> com.hazelcast.nio.AbstractSerializer.toByteArray(AbstractSerializer.java:139)
>>> at com.hazelcast.nio.Serializer.writeObject(Serializer.java:56)
>>>  at com.hazelcast.impl.ThreadContext.toData(ThreadContext.java:131)
>>> at com.hazelcast.nio.IOUtil.toData(IOUtil.java:139)
>>>  at
>>> com.hazelcast.impl.BaseManager$RequestBasedCall.setLocal(BaseManager.java:512)
>>> at
>>> com.hazelcast.impl.BaseManager$ResponseQueueCall.setLocal(BaseManager.java:544)
>>>  at
>>> com.hazelcast.impl.ConcurrentMapManager$MPut.txnalPut(ConcurrentMapManager.java:1876)
>>> at
>>> com.hazelcast.impl.ConcurrentMapManager$MPut.txnalPut(ConcurrentMapManager.java:1830)
>>>  at
>>> com.hazelcast.impl.ConcurrentMapManager$MPut.put(ConcurrentMapManager.java:1692)
>>> at com.hazelcast.impl.MProxyImpl$MProxyReal.put(MProxyImpl.java:634)
>>>  at com.hazelcast.impl.MProxyImpl$MProxyReal.put(MProxyImpl.java:608)
>>> at com.hazelcast.impl.MProxyImpl.put(MProxyImpl.java:173)
>>>  at com.hazelcast.impl.MProxyImpl.put(MProxyImpl.java:124)
>>> at org.wso2.carbon.caching.impl.CacheImpl.put(CacheImpl.java:301)
>>>  at
>>> org.wso2.carbon.user.core.common.RealmCache.addToCache(RealmCache.java:121)
>>> at
>>> org.wso2.carbon.user.core.common.RealmCache.addToCache(RealmCache.java:86)
>>>  at
>>> org.wso2.carbon.user.core.common.DefaultRealmService.getTenantUserRealm(DefaultRealmService.java:170)
>>>
>>>
>>> --
>>> *Afkham Azeez*
>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>> Member; Apache Software Foundation; http://www.apache.org/
>>> * <http://www.apache.org/>**
>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>> *
>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>> *
>>> *
>>> *Lean . Enterprise . Middleware*
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Amila Suriarachchi*
>>
>> Software Architect
>> WSO2 Inc. ; http://wso2.com
>> lean . enterprise . middleware
>>
>> phone : +94 71 3082805
>>
>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * <http://www.apache.org/>**
> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
> *
> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
> *
> *
> *Lean . Enterprise . Middleware*
>



-- 
*Amila Suriarachchi*

Software Architect
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 71 3082805
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to