[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sisu-dev] when is Disposable.dipose() supposed to be called?
|
On 30 Nov 2011, at 09:50, "Sievers, Jan" <jan.sievers@xxxxxxx> wrote:
> OK. Since I am using plexus in maven, should maven take care of disposing the container e.g. when the maven session ends?
Yes - the Plexus container can be embedded in all sorts of environments so it relies on the embedding/hosting code (in this case Maven) to properly dispose of the container.
> Somehow I don't feel like this is something I should handle myself...
>
> Regards,
> Jan
>
> -----Original Message-----
> From: sisu-dev-bounces@xxxxxxxxxxx [mailto:sisu-dev-bounces@xxxxxxxxxxx] On Behalf Of Stuart McCulloch
> Sent: Mittwoch, 30. November 2011 10:42
> To: Sisu project developer discussions
> Cc: sisu-dev@xxxxxxxxxxx
> Subject: Re: [sisu-dev] when is Disposable.dipose() supposed to be called?
>
> On 30 Nov 2011, at 09:06, "Sievers, Jan" <jan.sievers@xxxxxxx> wrote:
>
>> Hi,
>>
>> in tycho we have a plexus component which implements Disposable, see [1].
>>
>> I want some cleanup work to be done in dispose() but it seems this method is never called.
>
> Hi Jan,
>
> Disposables are only called when the Plexus container is itself disposed or when someone explicitly calls the container to release the component (or the map/list containing the component).
>
> If it is not getting called then that suggests no-one is disposing of the container. (Sisu-)Plexus will only act on container.dispose() - it doesn't install any shutdown hooks itself or use any form of GC/finalization to track when a component is no longer alive.
>
> --
> Cheers, Stuart
>
>> Any hints what I could be doing wrong?
>>
>> Regards,
>> Jan
>>
>> [1] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java
>> _______________________________________________
>> sisu-dev mailing list
>> sisu-dev@xxxxxxxxxxx
>> http://dev.eclipse.org/mailman/listinfo/sisu-dev
> _______________________________________________
> sisu-dev mailing list
> sisu-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/sisu-dev
> _______________________________________________
> sisu-dev mailing list
> sisu-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/sisu-dev