Ok, I tried to make a custom Activator for the main bundle and added a
ServiceTracker for RepositoryAdmin service...still can't get this
service, it's not available in ServiceTracker. Seems like I missing
something...
On 25.10.2014 15:40, Artem Zhirkov wrote:
Hello,
I'm trying to retrieve a reference to RepositoryAdmin service like that:
public static RepositoryAdmin getRepositoryAdmin(BundleContext ctx){
ServiceReference reference =
ctx.getServiceReference(RepositoryAdmin.class.getName());
if (reference != null){
return (RepositoryAdmin)ctx.getService(reference);
}
System.out.println("Reference null");
return null;
}
but it always prints Reference null. What I'm doing wrong?
BundleContext is received from Framework which is produced by
FrameworkFactory with no config parameters.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org