Donnerstag, 8. August 2013

CQ5 get service without annotation

BundleContext context = FrameworkUtil.getBundle(MyService.class).getBundleContext(); ServiceReference reference = context.getServiceReference(MyService.class.getName()); MyService myService = (MyService) context.getService(reference);