[jitsi-dev] getting Configuration service


#1

Hi Dev,

I am using following code to get the Configuration service But getting
null...What is the issue
/**
     * Returns the <tt>ConfigurationService</tt>.

···

*
     * @return the <tt>ConfigurationService</tt>
     */
    public static ConfigurationService getConfigService()
    {
        if (configService != null)
            return configService;

        ServiceReference configServiceRef =
            bundleContext.getServiceReference(ConfigurationService.class
                .getName());

        configService =
            (ConfigurationService)
bundleContext.getService(configServiceRef);

        return configService;
    }

Regards,
Haridas


#2

Hi Haridas,

Your code looks ok.

So, are you sure that the configuration service is already registered in the bundle context at the moment you're trying to obtain it? Have you checked the bundles order in the felix.client.run.properties?

Cheers,
Yana

···

On Oct 14, 2013, at 3:47 PM, haridas karunakaran Pillai <haridaskpillai@gmail.com> wrote:

Hi Dev,

I am using following code to get the Configuration service But getting null...What is the issue
/**
     * Returns the <tt>ConfigurationService</tt>.
     *
     * @return the <tt>ConfigurationService</tt>
     */
    public static ConfigurationService getConfigService()
    {
        if (configService != null)
            return configService;

        ServiceReference configServiceRef =
            bundleContext.getServiceReference(ConfigurationService.class
                .getName());

        configService =
            (ConfigurationService) bundleContext.getService(configServiceRef);

        return configService;
    }

Regards,
Haridas
_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

Hi,
I got it.
Thanks

···

On 17 Oct 2013 03:46, "Yana Stamcheva" <yana@jitsi.org> wrote:

Hi Haridas,

Your code looks ok.

So, are you sure that the configuration service is already registered in
the bundle context at the moment you're trying to obtain it? Have you
checked the bundles order in the felix.client.run.properties?

Cheers,
Yana

On Oct 14, 2013, at 3:47 PM, haridas karunakaran Pillai < > haridaskpillai@gmail.com> wrote:

> Hi Dev,
>
> I am using following code to get the Configuration service But getting
null...What is the issue
> /**
> * Returns the <tt>ConfigurationService</tt>.
> *
> * @return the <tt>ConfigurationService</tt>
> */
> public static ConfigurationService getConfigService()
> {
> if (configService != null)
> return configService;
>
> ServiceReference configServiceRef =
> bundleContext.getServiceReference(ConfigurationService.class
> .getName());
>
> configService =
> (ConfigurationService)
bundleContext.getService(configServiceRef);
>
> return configService;
> }
>
> Regards,
> Haridas
> _______________________________________________
> dev mailing list
> dev@jitsi.org
> Unsubscribe instructions and other list options:
> http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev