createInstance method in my module class called very late

asked 2017-02-16 10:23:15 -0700

anonymous user



We have osgi-api, osgi and ODL bundles in our application. For all the ODL bundles, we have config file and in the auto generated module class we have overwritten createInstance(). In the createInstance method we are registering one of our ODL class into OSGI service registry, as the class we are registering is needed by some OSGI bundles.

Hence some of our OSGI bundles which are waiting for the service that is getting registered in ODL bundle goes to GracePeriod and fails with TimeoutException. We observe ODL/Karaf calls createInstance() only when all features defined in features.xml is started. Is it possible to start ODL/MDSAL config pusher to call our bundle createInstance method as soon as the ODL bundle is "Active" instead of waiting for all the features to be started.

We are using Beryllium-SR2


edit retag flag offensive close merge delete