There seem to be 2 ways to get the Configuration Admin service from the OSGi service registry. One by instantiating BundleContext, then getting ServiceReference from that, then ConfigurationAdmin from that:
BundleContext bc = FrameworkUtil.getBundle(ManagedService.class).getBundleContext();
ServiceReference ca = bc.getServiceReference(ConfigurationAdmin.class);
ConfigurationAdmin configAdmin = (ConfigurationAdmin) context.getService(ca);
Another by using Blueprint and simply creating a reference to ConfigurationAdmin, as shown below, then referencing that in a bean:
<reference id="configAdmin" interface="org.osgi.service.cm.ConfigurationAdmin" />
Are these 2 approaches equivalent? Or does the former approach provide anything the latter doesn't? And is there any Blueprint reference documentation that describes what it's doing to instantiate ConfigurationAdmin (can't seem to find any)?