Re: [Dev] Introducing getOSGiService() method to CarbonContext

2014-10-29 Thread Sameera Jayasoma
+1. We've also improve the APIs by allowing users to pass a dictionary of properties. This allows users to filter OSGi service in a more granular fashion. Thanks, Sameera. On Wed, Oct 29, 2014 at 12:30 PM, Afkham Azeez az...@wso2.com wrote: Rename the file to

Re: [Dev] Introducing getOSGiService() method to CarbonContext

2014-10-29 Thread Afkham Azeez
Where is the security check in this code to ensure that only the services declared in the carboncontext-osgi-service.properties file are allowed to be accessed? On Tue, Oct 28, 2014 at 9:40 PM, Nipuni Perera nip...@wso2.com wrote: Hi, I am working on $subject. Please find the implementation

Re: [Dev] Introducing getOSGiService() method to CarbonContext

2014-10-29 Thread Afkham Azeez
On Wed, Oct 29, 2014 at 12:41 AM, Afkham Azeez az...@wso2.com wrote: Here you go. This is the implementation we require. I have not tested this but the logic flow should be correct. /** * Obtain the first OSGi service found for interface or class codeclazz/code * @param

Re: [Dev] Introducing getOSGiService() method to CarbonContext

2014-10-29 Thread Nipuni Perera
Hi, @Azeez I have updated the getOSGiService(Class clazz) method to getOSGiService(Class clazz, HashtableString, String props) so that we can pass properties when access to osgi services registered under a specific interface and matching a given filter. I have updated the name of the file to

Re: [Dev] Introducing getOSGiService() method to CarbonContext

2014-10-29 Thread Afkham Azeez
A property file with a single property? Why have a property file in the first place? On Wed, Oct 29, 2014 at 1:16 AM, Nipuni Perera nip...@wso2.com wrote: Hi, @Azeez I have updated the getOSGiService(Class clazz) method to getOSGiService(Class clazz, HashtableString, String props) so that

Re: [Dev] Introducing getOSGiService() method to CarbonContext

2014-10-29 Thread Afkham Azeez
OK then, go ahead. But we don't know what other properties we will add to carbon-context.properties, and most probably we will not add any other properties in the future. On Wed, Oct 29, 2014 at 4:57 AM, Sameera Jayasoma same...@wso2.com wrote: Hi Azeez, We've been using this pattern in the