Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [osgi-users] DS Singleton deactivation

a) the equinox DS impl is deprecated and no longer maintained for a couple of years at least (and no longer used in Eclipse products either, in fact it was just pulled from the build yesterday). You should migrate to Felix SCR
b) in practice this means you get the default timeout specified by the implementation (0 in the case of Felix), and if you're lucky you have a property to tune it. In the Felix SCR case you have `ds.delayed.keepInstances`[1]

[1] https://github.com/apache/felix-dev/blob/master/scr/README.md#configuration

On Thu, Jan 21, 2021 at 11:56 AM Alain Picard <picard@xxxxxxxxxxxxxx> wrote:
I'm looking for the best way to deactivate a singleton DS component. Looking at the spec under 112.5.4 Delayed Component it states: " If the service has the scope attribute set to singleton or bundle, SCR must deactivate a component configuration when it stops being used as a service object after a delay since the component configuration may be reused as a service object in the near future. This allows SCR implementations to reclaim component configurations not in use while attempting to avoid deactivating a component configuration only to have to quickly activate a new component configuration for a new service request. The delay amount is implementation specific and may be zero"

What does this mean in practice and what is the contract for implementations? (I'm using Equinox if that is relevant).

Thanks
Alain

_______________________________________________
osgi-users mailing list
osgi-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/osgi-users


--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
OSGi Fellow

Back to the top