I would like to use the UserAdmin OSGi service available in equinox 3.7. I have added the following dependency in the MANIFEST.mf file: org.eclipse.equinox.useradmin;bundle-version="1.1.300".
I try to retrieve the OSGi service with the following code:
BundleContext ctx = FrameworkUtil.getBundle(Maclasse.class).getBundleContext();
ServiceReference<UserAdmin> ref2 = ctx.getServiceReference(UserAdmin.class);
UserAdmin userAdmin = ctx.getService(ref2);
But ref2 is always equal to NULL.
When I execute the status command under the OSGi console, I get the following message:
.....
449 reference:file:plugins/org.eclipse.equinox.useradmin_1.1.300.v20110413.jar
ACTIVE org.eclipse.equinox.useradmin_1.1.300.v20110413
.....
{org.osgi.service.useradmin.UserAdmin}={service.description=OSGi User Admin service - IBM Implementation,