You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Steinar Bang <sb...@dod.no> on 2019/05/01 09:01:45 UTC

Re: What's the lifecycle of a bundle in a feature vs a bundle loaded directly by a feature?

>>>>> Christian Schneider <ch...@die-schneider.net>:

> Generally the karaf feature mechanism tries to load and start bundles only
> once.
> Unfortunately there are cases when bundles have to be refreshed and
> restarted.

In this case I got lucky.  I created a karaf feature for the PostgreSQL
JDBC driver
 https://github.com/steinarb/postgresql-jdbc-karaf-feature/blob/master/README.org

Using that feature, instead of a compile reference to the bundle, in the
first loaded application
 https://github.com/steinarb/postgresql-jdbc-karaf-feature/blob/master/README.org
caused the PostgreSQL JDBC driver not to reload when this application
(with a <scope>compile</scope> maven dependency to the PostgreSQL JDBC
driver, and not a feature dependency) was loaded
 https://github.com/steinarb/ukelonn

I'm guessing the PostgreSQL JDBC bundle didn't reload when I installed
the ukelonn feature, was that all of the PostgreSQL JDBC bundle required
runtime dependencies were satisfied by the new feature, and didn't need
to change when the features of ukelonn tried to satisfy its
dependencies...?