CQ5 get service without annotation (snippet)

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

cq52013

13 Words

2013-08-08 20:26 +0200