Hi, However, I would not bother, making your server loop resilient by reinitializing after a failure is much more robust against many more error cases. The chance that you get overlapping T1.deactivate/T2.activate is in my experience magnitudes smaller than getting a network problem, which in the end can be handled with the same code. The chance might even be zero but I’ve no time to crawl through the spec to proof that right now.
If you really feel strong about this race condition then you should file a bug on the public OSGi Bugzilla, the expert group will then take a look if the DS specification should be amended. I’ve seen this overlapping in the field and it can actually happen. My solution was to synchronize activte/deactive although I really would like to have a better solution since in weird situations I’ve even seen deadlocks with this kind of pattern. Best regards Jens Kübler
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev