Guillaume’s feature example doesn’t look to me like it requires the pax-jdbc-config bundle as a dependency or prerequisite or content (not sure of the correct karaf terminology). However, as long as the pax bundle is installed, it will in fact make that feature provide the datasource(s). This would not be my preferred approach, see below.
The “official” use of service requirement/capabilities expressly and intentionally does not include any service properties such as the jndi name. I would therefore leave it off. In my opinion the pax-jdbc-config bundle should declare that it provides Datasource and XADatasource services, since it will set these up based on config admin configuration. This is entirely in line with how the service capabilities are supposed to work. For instance, DS services may have configuration policy REQUIRE so they may provide 0….n instances of the service depending on what configurations are present, but they still declare a single capability for the service. thanks david jencks > On Sep 14, 2016, at 7:56 PM, oski_bear <[email protected]> wrote: > > OK but in this case it's actually pax-jdbc-config that is > providing/registering the service and the feature that I am defining that > requires the service. Are you proposing that I workaround this problem by > having the feature that requires the service also declare that it provides > it as a capability? > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/Features-Core-bundle-stuck-in-Resolved-state-tp4047964p4048056.html > Sent from the Karaf - User mailing list archive at Nabble.com.
