Hi Sriragu,
Otherwise you can add the following annotation (before class) and the
methods for bind and unbind the registry service to the components
implementation class.
@scr.reference name="registry.service"
interface="org.wso2.carbon.registry.core.service.RegistryService"
* cardinality="1..1" policy="dynamic" bind="setRegistryService"
unbind="unsetRegistryService"
protected void setRegistryService(RegistryService registryService) {
this.registryService = registryService;
}
protected void unsetRegistryService(RegistryService registryService) {
this.registryService = null;
}
There are many classes doing this in registry and governance modules. You
can refer components/governance/org.wso2.carbon.registry.extensions
RegistryResourcePermissionsServiceComponent class which do that.
thanks
Eranda
On Thu, Jan 10, 2013 at 11:23 PM, Ajanthan Balachandran
<[email protected]>wrote:
>
> Hi,
>
> On Thu, Jan 10, 2013 at 11:07 PM, Sriragu Arudsothy <[email protected]>wrote:
>
>> Hai All,
>>
>>
>> I already developed a CXF web app which should access the OSGI
>> registry service. Is it Possible to access the OSGi service ? If so please
>> give me an idea that how can I get it done?
>>
>> Here is how to do it.
> <your OSGIServiceInterfaceName> service=(<your
> OSGIServiceInterfaceName>)SuperTenantCarbonContext.getCurrentContext().getOSGiService(<your
> OSGIServiceInterfaceName>.class);
> Thanks.
>
>> Thanks!
>> Sriragu
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> ajanthan
> --
> Ajanthan Balachandiran
> Software Engineer; WSO2, Inc.; http://wso2.com/
> email: ajanthan <http://goog_595075977>@wso2.com; cell: +94775581497
> blog: http://bkayts.blogspot.com/
>
> Lean . Enterprise . Middleware
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
*Eranda Sooriyabandara
*Software Engineer;
Integration Technologies Team;
WSO2 Inc.; http://wso2.com
*
*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev