Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Deleting a project with open sessions
Deleting a project with open sessions [message #1256703] Tue, 25 February 2014 18:08 Go to next message
Felix Dorner is currently offline Felix Dorner
Messages: 222
Registered: March 2012
Senior Member
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)
}
Re: Deleting a project with open sessions [message #1257311 is a reply to message #1256703] Wed, 26 February 2014 09:28 Go to previous messageGo to next message
Florian Barbin is currently offline Florian Barbin
Messages: 31
Registered: August 2010
Member
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)
> }
>
>
Re: Deleting a project with open sessions [message #1257372 is a reply to message #1257311] Wed, 26 February 2014 10:54 Go to previous message
Felix Dorner is currently offline Felix Dorner
Messages: 222
Registered: March 2012
Senior Member
Salut Florian,

I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=429130

Felix
Previous Topic:Display subset of model elements
Next Topic:Sirius Roadshow
Goto Forum:
  


Current Time: Tue Sep 16 03:03:07 GMT 2014

Powered by FUDForum. Page generated in 0.01888 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software