On 23/11/2016 15:47, Timothy Ward wrote:
My next recommendation would be to bracket your activate and
deactivate methods with print statements, including the
toString/identity hash code of your component, so that you can see that:
a) The methods get called,
I believe I can tell that from the log messages, unless you're
suggesting that the logging mechanism isn't as reliable as I was assuming?
b) The methods exit successfully
I don't see how Thread.start() can fail to exit and the @Activate
doesn't do anything else ... but I can put another log message after it.
c) Which objects the methods are called on
Can do, I'll add that to my list of experiments.
Something going wrong because of multiple configurations (even though
I'm not using any) seems favourite so far ...
It is likely, but I would still take a look at whether your deactivate
method is failing to stop the thread. If you do have service or
configuration dependencies then your component may be getting bounced.
This would fit with the logs that you have provided.
I believe not, because the deactivate method prints its log message
*before* attempting to stop the thread (I have been in this game for a
while!) and the log messages, two of them, only appear when Karaf is
shut down.
--
Tim Ward
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev