Thanks Jeewantha and Chanaka. Both worked fine.

On Fri, Mar 21, 2014 at 11:26 AM, Chanaka Fernando <[email protected]>wrote:

> Hi Susinda,
>
> You can try the following method to access the registry.
>
>
>    // if localentry "testLocalentry" defined in synapse econfig
>         Entry localEntryObj = (Entry) synapseMsgContext.getConfiguration()
>                 .getLocalRegistry().get("testLocalentry");
>         System.out.println(" value: " + localEntryObj.getValue());
>         System.out.println(" Filename : " + localEntryObj.getFileName());
>
>         // goverance/config registry
>         Registry regInstance = synapseMsgContext.getConfiguration()
>                 .getRegistry();
>         Object obj=regInstance.getResource(new
> Entry("gov:/test1.txt"),null);
>         Object obj2=regInstance.getResource(new
> Entry("conf:/test2.txt"),null);
>
>
> Thanks,
> Chanaka
>
>
> On Fri, Mar 21, 2014 at 10:51 AM, Jeewantha Dharmaparakrama <
> [email protected]> wrote:
>
>> Hi Susinda,
>>
>> Try this,
>>
>> messageContext.getEntry("conf:/foo");
>>
>> Thanks,
>> Jeewantha
>>
>>
>>
>>
>> On Thu, Mar 20, 2014 at 11:18 PM, Susinda Perera <[email protected]>wrote:
>>
>>> Any code examples on $subject? And best-practices etc..
>>>
>>> I have tried with org.wso2.carbon.mediation.registry.WSO2Registry but
>>> it gives following exception
>>> java.lang.NullPointerException: Tenant domain has not been set in 
>>> CarbonContext
>>> when executing Resource resource =  registry.getResource(key);
>>>
>>> Any ideas?
>>>
>>>
>>> Thanks
>>> /Susinda
>>>
>>> --
>>> *Susinda Perera*
>>> Software Engineer
>>> Mobile:(+94)716049075
>>>
>>> WSO2 Inc. http://wso2.com/
>>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Jeewantha Dharmaparakrama
>> Software Engineer; WSO2, Inc.; http://wso2.com/
>> Phone : (+94) 774726790
>> Skype : prasad.jeewantha
>> LinkedIn : http://www.linkedin.com/in/jeewanthad
>> Twitter: https://twitter.com/jeewamp
>> Blog: http://jeewanthad.blogspot.com/
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> --
> Chanaka Fernando
> Technical Lead
> WSO2, Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 773337238
> Blog : http://soatutorials.blogspot.com
> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
> Twitter:https://twitter.com/chanakaudaya
> Wordpress:http://chanakaudaya.wordpress.com
>
>
>
>


-- 
*Susinda Perera*
Software Engineer
Mobile:(+94)716049075

WSO2 Inc. http://wso2.com/
Tel : 94 11 214 5345 Fax :94 11 2145300
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to