Hi, you can create "meta" feature that provide the capability. For instance: https://github.com/apache/karaf/blob/main/examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml#L28
Regards JB On Mon, Feb 13, 2023 at 1:49 PM Ephemeris Lappis <[email protected]> wrote: > > Hello. > > I've already asked for help about a similar problem, but I'd probably > not understood it all well... > > I had before a handmade feature with a blueprint to manage a JMS > connection factory, and my feature.xml had this declaration : > > <capability>osgi.service;objectClass=javax.jms.ConnectionFactory);effective:=active</capability> > > All my applicative features, that install bundles with a blueprint > that have a reference on a connection factory worked as expected, > resolving the OSGi service and the capability exposed by my JMS > feature. > > Now I've opted to use PAX JMS to provide connection factories, and my > applicative features do not install, failing to resolve the capability > : > > osgi.service; effective:=active; > filter:="(&(objectClass=javax.jms.ConnectionFactory)(osgi.jndi.service.name=jms/name))" > > I know that I can add > "<_removeheaders>Import-Service</_removeheaders>" in my bundle s build > options, but I'd prefer a cleaner solution, if it exists... > > So, what should be the best solution to resolve services managed by > PAX (JMS or JDBC as well) on deployment based on Karaf features ? > > Thanks for your help. > > Regards.
