What framework do you use that implements the @PostPersist?
Generally you can use
|final BundleContext bundleContext=
FrameworkUtil.getBundle(this.getClass()).getBundleContext();
You then can for example create a ServiceTracker from there. This means to attach to
services "by hand" though.
OSGi fits your requirements, but I would say, do you really mean your service
implementation will change dynamically? And, if you get no service
implementation, what does it mean? Same question but if you get several
implementations... will you call all implementations... the best one? ...and
w
Christian, I'm using OpenJPA.
I implement @PostPersist method in entity event listener which I registered
by means of @EntityListeners annotation.
ServiceTracker... My API bundle will depend on OSGi framework... But I'll
try it. There will b no problems with dynamism?
My quick test solution was to
Jean-Philippe, dynamic change of services impl have many ways to use.
For example I can dynamically register calback methods, hot-update app
version without needs of app stopping, implementing point of extension
template.
In different cases there will be different requirements how to handle
servic
é : vendredi 19 juin 2015 13:42
À : user@karaf.apache.org
Objet : RE: Best way to access OSGi services from classes which object creation
I cannot handle
Jean-Philippe, dynamic change of services impl have many ways to use.
For example I can dynamically register calback methods, hot-update app
Jean-Philippe, you're reffering JPAStuff. What is it?
My JPA listener created by JPA engine, not by blueprint.
Is is possible to intercept myJPAStuff creation via blueprint?
--
View this message in context:
http://karaf.922171.n3.nabble.com/Best-way-to-access-OSGi-services-from-classes-which-o
user@karaf.apache.org
Objet : RE: Best way to access OSGi services from classes which object creation
I cannot handle
Jean-Philippe, you're reffering JPAStuff. What is it?
My JPA listener created by JPA engine, not by blueprint.
Is is possible to intercept myJPAStuff creation via blueprint?
--
Jean-Philippe, and there was original question what is the best tech to
easily retrieve OSGi service from my dynamically loaded JPA listener.
--
View this message in context:
http://karaf.922171.n3.nabble.com/Best-way-to-access-OSGi-services-from-classes-which-object-creation-I-cannot-handle-tp