Feb 26th, 2010, 09:01 AM
Checking service availability given proxy
Is there an easy way to detect whether or not the underlying service of an osgi:reference bean is available without having to register as a listener? For example casting to Spring's proxy interface and calling a method isBound or something?
This would be useful for initially disabling a user interface element when using Spring-DM on the client side (Eclipse RCP).
Mar 1st, 2010, 07:32 AM
((ImportedOsgiServiceProxy)yourRef).getServiceRefe rence().getTargetServiceReference() == null)