Hi,

ASFAIK there is no well defined way to delete a tenant. You can deactivate
a tenant. If you are using custom code then this error may be due to
starting a wrong tenant flow in your code.

Thanks!
Rajith

On Mon, Nov 7, 2016 at 10:46 AM, wenxzhen <[email protected]> wrote:

> Thanks to Lakshani and Kasun.
>
> Regarding the TenantMgtListener extension, any reference or example to do
> the cache clearing since our application is a WEB application?
>
> Thanks again, Wenxing
>
>
> ------------------ Original ------------------
> *From: * "KasunG Gajasinghe";<[email protected]>;
> *Send time:* Monday, Nov 7, 2016 1:43 PM
> *To:* "wenxzhen"<[email protected]>;
> *Cc:* "dev"<[email protected]>;
> *Subject: * Re: [Dev] How to clear up the Registry Cache?
>
>
> This sounds like a bug. When a tenant is deleted, the cache should be
> cleared automatically. You shouldn't have to wait for the periodic cache
> cleanup.
>
> My suggestion is to write a TenantMgtListener extension, and add it to the
> product. In there, you can add a cache clearing operation for the tenant
> pre/post delete method.
>
> On Monday, November 7, 2016, wenxzhen <[email protected]> wrote:
>
>> Dear all,
>>
>> I am trying to remove a Tenant from the WSO2, but I found the following
>> exception after removing a Tenant and then re-create it:
>>
>> Caused by: java.lang.SecurityException: Illegal access attempt to cache ]
>> owned by tenant {[testdomain7],[17]} by tenant {[testdomain7],[18]}
>>         at org.wso2.carbon.caching.impl.Util.checkAccess(Util.java:46)
>>         at org.wso2.carbon.caching.impl.CarbonCacheManager.getCache(Car
>> bonCacheManager.java:111)
>>         at org.wso2.carbon.registry.core.utils.RegistryUtils.getResourc
>> eCache(RegistryUtils.java:297)
>>         at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.ge
>> tCache(CacheBackedRegistry.java:62)
>>         at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.re
>> sourceExists(CacheBackedRegistry.java:289)
>>         at org.wso2.carbon.registry.core.session.UserRegistry.resourceE
>> xistsInternal(UserRegistry.java:770)
>>         at org.wso2.carbon.registry.core.session.UserRegistry.access$80
>> 0(UserRegistry.java:60)
>>         at org.wso2.carbon.registry.core.session.UserRegistry$9.run(Use
>> rRegistry.java:753)
>>         at org.wso2.carbon.registry.core.session.UserRegistry$9.run(Use
>> rRegistry.java:750)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at org.wso2.carbon.registry.core.session.UserRegistry.resourceE
>> xists(UserRegistry.java:750)
>>         ... 62 more
>>
>> My question is how I can remove the related Registry cache of a tenant?
>> Thank you very much.
>>
>> Regards, Wenxing
>>
>>
>
> --
>
> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> blog: http://kasunbg.org
> phone: +1 650-745-4499, 77 678 0813
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to