[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Problem when BundleContext.getAllServiceReferences(null, null);

You can only get services for which the caller has ServicePermission(serviceName, "get"). If your bundle has no service permissions, you will get no services.

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the
OSGi Alliance

office: +1 386 848 1781
mobile: +1 386 848 3788

From: "David Conde" <dconde@xxxxxxxx>
To: "'Equinox development mailing list'" <equinox-dev@xxxxxxxxxxx>
Date: 2009/09/14 06:24
Subject: [equinox-dev] Problem when        BundleContext.getAllServiceReferences(null, null);
Sent by: equinox-dev-bounces@xxxxxxxxxxx

Hi, I am getting null object when I try to get AllServices references in Equinox framework using :
 Result = bundleContext.getAllServiceReferences(null, null);
This problem only happens when I use Equinox with security, getting all services references if I do not active the security in Equinox.
Do I need any special permission? I do not get any AccessControlException at all, so I suppoused that I did not need any permission.
Do I need to have âGETâ permission for any Service?if this is, the problem is that I donât know what Services I have in the framework.
Any idea?
Thank you in advance
equinox-dev mailing list