java - Get service properties or other bundles using Glassfish and CDI -
I use the Glassfish 4 OSGi console to manage the bundles. So, if I want to get a bundle from someone else, then I am using @inject and @ OSGISas annotation. When I register the service in the context, I enter the property with it:
context.registerService (ServiceClass.class.getName ()), new service class (), prop); Can I get these properties in bundle some way, when I can inject it?
Can I get bundle references using CDI?
There are different implementations of some interfaces between bundles and I want to get them with properties by code, how can I get it?
Try @Intext bundle context context; Do Inject @ OSGIService @ Filter ("myprop = a") MyService service to inject the bundle contact; To inject a service with some properties.
It is from weld docks, but most of all it should work for glassfish too.
For more information see this:
>
Comments
Post a Comment