RE: Best way to access OSGi services from classes which object creation I cannot handle

2015-06-24 Thread ellirael
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:

RE: Best way to access OSGi services from classes which object creation I cannot handle

2015-06-22 Thread ellirael
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:

RE: Best way to access OSGi services from classes which object creation I cannot handle

2015-06-22 Thread CLEMENT Jean-Philippe
@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? -- View

RE: Best way to access OSGi services from classes which object creation I cannot handle

2015-06-22 Thread CLEMENT Jean-Philippe
which means no service was found at that time. JP [@@ OPEN @@] -Message d'origine- De : ellirael [mailto:ellir...@mail.ru] Envoyé : 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

RE: Best way to access OSGi services from classes which object creation I cannot handle

2015-06-19 Thread CLEMENT Jean-Philippe
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

Re: Best way to access OSGi services from classes which object creation I cannot handle

2015-06-19 Thread ellirael
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

RE: Best way to access OSGi services from classes which object creation I cannot handle

2015-06-19 Thread ellirael
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

Re: Best way to access OSGi services from classes which object creation I cannot handle

2015-06-18 Thread Christian Schneider
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.