Hello.

I understand what you mean. But I think in our case it will not help :
I've opted for PAX JMS to be free to configure as many JMS CF as
needed just adding the required CFG files. We plan to generate these
files in our deployment tooling depending on each target environment
inventory (Ansible configurations), and not in Karaf features. The
only Karaf feature installs the ActiveMQ feature's repository and the
PAX dependent features, but is not aware of the CF count, name or
configuration.

Another idea to avoid the "remove header" ?

Thanks anyway !!!

Regards.

Le lun. 13 févr. 2023 à 17:31, Jean-Baptiste Onofré <[email protected]> a écrit 
:
>
> 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.

Reply via email to