Hi, That sounds a lot like you’re building a persistence service with a defined API (a good thing!). As I think you’ve already realised, you will want to start by defining the persistence service and the DTOs that it is responsible for persisting/retrieving. These things should live in an API bundle which is shared by the persistence implementation and the clients.
After that I can recommend using Transaction Control in the persistence bundle to implement the persistence layer (see http://aries.apache.org/modules/transactioncontrol.html <http://aries.apache.org/modules/transactioncontrol.html>), and using Declarative Services to provide/consume services. The rest of the client bundles can then be written however you want, but again, I can recommend Declarative Services. Regards, Tim > On 6 Mar 2017, at 10:26, erwan <[email protected]> wrote: > > Thanks for your quick reply. > What I have in mind is separate a persistence implementation in a bundle, > with an interface exposed to several other bundles in a second bundle (like > a pseudo shared bundle maybe?), these several other bundles using interface > injected. > > getting back to the previous code, I wasn't able to make it working, so > probably not really good cutting dependencies > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/Multiple-bundles-dependencies-injection-pax-cdi-or-blueprint-tp4049756p4049758.html > Sent from the Karaf - User mailing list archive at Nabble.com.
