Hi all,
I am doing some improvements for the CacheBackRegistry in carbon 4.1.0.
There I need to spawn new thread and inside the thread, I need to get
resource from registry. For that we need to set session parameters to call
the registry. In registry.core, current session parameters are retrieved
from CurrentSession class [1]

1. http://sr4.us1.wso2.com:9000/sonar/resource/index/341632?tab=source

Is it correct to set session parameters like below.

        public void run() {
>                     try {
>
>
> *                        CurrentSession.setTenantId(tenantID);
>             CurrentSession.setUser(username);
> CurrentSession.setUserRealm(userRealm);*
>
>                         Resource resource = registry.get(path);
>
>                     } catch (RegistryException exception) {
>
    .........
>
                    }
>         }
>


Please advice.
Thanks
-- 

Danesh Kuruppu
Software Engineer
WSO2 Inc,
Mobile: +94 (77) 1690552
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to