|
Re: Deleting a project with open sessions [message #1257311 is a reply to message #1256703] |
Wed, 26 February 2014 09:28 |
|
Hi Felix,
Thanks for your feedback. Could you please create a new issue on the
Sirius Buzilla
(https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sirius)? That is an
interesting point and I think the bugzilla is a better place to discuss
about it.
Regards,
Florian
On 25/02/2014 19:08, Felix Dorner wrote:
> Hi,
>
> I have noted that when I delete a project that contains an open session,
> the session is closed _asynchronously_ via the
> ResourceSyncClientNotifier Job. This has a "weird" implication:
>
> SessionListeners cannot assume that the session resource exists when
> they receive notifications from the SessionManager. This should be
> documented somewhere, it's a bit unexpected.
>
> Also, because of this, I don't think that it's actually safe to
> create/open a session without synchronizing against the client notifier
> job:
>
> Job.getJobManager().join(ResourceSyncClientNotifier.FAMILY)
>
> or one risks to obtain a "corrupt" session.
>
> But ResourceSyncClientNotifier.FAMILY is internal. Maybe it should be
> made public? Or perhaps even better: Have the SessionManager join the
> job internally during getSession()?
>
> I found this while running unit tests like this:
>
> for each stuff : stuffToTest {
> Import project A
> Open session A
> Do stuff
> Delete project A (without explicitly closing session A)
> }
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02668 seconds