Hi Aruna & All,

The requirement is that we need to provide a simple API to invoke a method
in an OSGi Service from the JavaScript(Nashorn). As per the offline
discussion with Aruna, JNDI is the recommended way to invoke OSGi services
in C5.

@Nipuni
On the JNDI approach; are all OSGi services getting registered through a
unique URI(eg. "java:comp/env/osgi-service-a") at the service startup?

Thanks,
Rasika

On Tue, Apr 26, 2016 at 1:31 PM, Aruna Karunarathna <[email protected]> wrote:

>
>
> On Tue, Apr 26, 2016 at 12:33 PM, Rasika Perera <[email protected]> wrote:
>
>> ​Hi All,
>>
>> Before C5, we had a method "getOSGiService(Class clazz, Hashtable<String,
>> String> props)​ to retrieve an OSGi service[1]. In latest C5, I couldn't
>> find any similar feature in [2].
>>
>
> Can you elaborate more on your requirement here?. AFAIK there is no such
> way in C5 to retrieve OSGi services as in [1]
>
>>
>> ​What is the correct way to retrieve an OSGi service in C5?
>>
>> Or do we need to get it through directly from a "ServiceTracker" ?
>>
>> ​[1]
>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/context/CarbonContext.java#L322
>> [2]
>> https://github.com/wso2/carbon-kernel/blob/master/core/src/main/java/org/wso2/carbon/kernel/context/PrivilegedCarbonContext.java
>> ​
>>
>> --
>> With Regards,
>>
>> *Rasika Perera*
>> Software Engineer
>> M: +94 71 680 9060 E: [email protected]
>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
>
> *Aruna Sujith Karunarathna *
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 9040362 | Work: +94 112145345
> Email: [email protected] | Web: www.wso2.com
>
>
> On Tue, Apr 26, 2016 at 12:33 PM, Rasika Perera <[email protected]> wrote:
>
>> ​Hi All,
>>
>> Before C5, we had a method "getOSGiService(Class clazz, Hashtable<String,
>> String> props)​ to retrieve an OSGi service[1]. In latest C5, I couldn't
>> find any similar feature in [2].
>>
>> ​What is the correct way to retrieve an OSGi service in C5?
>>
>> Or do we need to get it through directly from a "ServiceTracker" ?
>>
>> ​[1]
>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/context/CarbonContext.java#L322
>> [2]
>> https://github.com/wso2/carbon-kernel/blob/master/core/src/main/java/org/wso2/carbon/kernel/context/PrivilegedCarbonContext.java
>> ​
>>
>> --
>> With Regards,
>>
>> *Rasika Perera*
>> Software Engineer
>> M: +94 71 680 9060 E: [email protected]
>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
>
> *Aruna Sujith Karunarathna *
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 9040362 | Work: +94 112145345
> Email: [email protected] | Web: www.wso2.com
>
>



-- 
With Regards,

*Rasika Perera*
Software Engineer
M: +94 71 680 9060 E: [email protected]
LinkedIn: http://lk.linkedin.com/in/rasika90

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to