I have a problem of the OSGi bundle not working. When first upload and install the package which contain the bundle, all the functions from the bundle was working and status is "active". And then I didn't touch the bundle for few days, then some functions of this bundle are not working until I stop then start the bundle again.
Please let me know how to resolve this permanently, because restarting the bundle is not an option for this. Any help would be appreciated.
The bundle is started but the event might not be active. It should get activated when the service is actually used. We can use the @Component(immediate=true) annotation to activate the component when the bundle gets started
Like you said, I found that there is no immediate=true inside @Component, however, the function inside the component was working correctly when first install the package, but I leave this bundle for a few days and do a re-test, this function is not working anymore.
That does not seem to be a product thing, but rather your code might run into some trouble (exception?) and stop working. You should check the log and search for messages pertaining to the services in your bundle.