Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » CDO and SessionInvalidationListener
CDO and SessionInvalidationListener [message #62357] |
Mon, 20 November 2006 16:56 |
Eclipse User |
|
|
|
Originally posted by: yannick.lizzi.silogic.fr
Hi all,
I have the following model:
Meeting #-> User (aggregation), named "participants"
Session --> Meeting (association)
Session --> User (association), named "queue".
I have two clients and one server. My purpose is to maintain the 'queue'
relation up to date on both client sides.
When I add a user (already defined in meeting aggregation) to the queue
on one side, I see it on the other side. But when I remove a user the
other side is not notified.
I use the following session invalidation listener:
class SessionInvalidationListener implements
ResourceManager.InvalidationListener {
public void notifyInvalidation(ResourceManager manager,
List<EObject> invalidated, List<EObject> deferred) {
for (EObject o : invalidated) {
CDOPersistent cdoObj = (CDOPersistent) o;
cdoObj.load(); // Used to notify my viewer listening to model changes
// the following is for test only
if (cdoObj instanceof Session) {
Session s = (Session) cdoObj;
System.out.println("queue="+s.getQueue());
}
}
}
}
When I add a user to the queue, the queue is modified. But when a user
is removed the queue is always displaying the state before the remove.
Thanks,
Yannick
|
|
|
Re: CDO and SessionInvalidationListener [message #62381 is a reply to message #62357] |
Mon, 20 November 2006 18:27 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Yannick,
Eike is on vacation until Dec 6 so likely you won't get an answer before
then.
Yannick Lizzi wrote:
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the
> 'queue' relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the
> queue on one side, I see it on the other side. But when I remove a
> user the other side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager,
> List<EObject> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model
> changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user
> is removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
|
|
|
Re: CDO and SessionInvalidationListener [message #62634 is a reply to message #62357] |
Fri, 24 November 2006 05:35 |
Eclipse User |
|
|
|
Originally posted by: sperez.miragenetworks.com
I see the same thing (or something very similar). Specifically, in
AbstractDataRequest.receiveObject(...), I see where the new objects are
added in receiveReferences(...), but I see no place where a removed object
gets removed.
In my specific use case I am moving an object from a non-containment
reference of one object to another. When the object is moved from one list
to the other, the object apears to be in both lists.
Patiently waiting until Dec. 6,
Stephen
"Yannick Lizzi" <yannick.lizzi@silogic.fr> wrote in message
news:ejsmni$5a7$1@utils.eclipse.org...
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the 'queue'
> relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the queue on
> one side, I see it on the other side. But when I remove a user the other
> side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager, List<EObject>
> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user is
> removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
|
|
|
Re: CDO and SessionInvalidationListener [message #64612 is a reply to message #62357] |
Sat, 16 December 2006 09:36 |
Eclipse User |
|
|
|
Originally posted by: stepper.sympedia.de
Yannick, Stephen,
Sorry for the delay, but I'm starting to dig into this issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
Cheers
/Eike
Yannick Lizzi schrieb:
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the
> 'queue' relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the
> queue on one side, I see it on the other side. But when I remove a
> user the other side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager,
> List<EObject> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model
> changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user
> is removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
|
|
|
Re: CDO and SessionInvalidationListener [message #64887 is a reply to message #64612] |
Tue, 19 December 2006 15:13 |
Eclipse User |
|
|
|
Originally posted by: stepper.sympedia.de
Yannick, Stephen,
I have fixed this bug and committed the changes to branch
R0_7_maintenance. Unfortunately the build system is not usable for me at
the moment. As soon as it is I will publish new builds.
Cheers
/Eike
Eike Stepper schrieb:
> Yannick, Stephen,
>
> Sorry for the delay, but I'm starting to dig into this issue:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
>
> Cheers
> /Eike
>
>
> Yannick Lizzi schrieb:
>> Hi all,
>>
>> I have the following model:
>> Meeting #-> User (aggregation), named "participants"
>> Session --> Meeting (association)
>> Session --> User (association), named "queue".
>>
>> I have two clients and one server. My purpose is to maintain the
>> 'queue' relation up to date on both client sides.
>> When I add a user (already defined in meeting aggregation) to the
>> queue on one side, I see it on the other side. But when I remove a
>> user the other side is not notified.
>>
>> I use the following session invalidation listener:
>> class SessionInvalidationListener implements
>> ResourceManager.InvalidationListener {
>> public void notifyInvalidation(ResourceManager manager,
>> List<EObject> invalidated, List<EObject> deferred) {
>>
>> for (EObject o : invalidated) {
>> CDOPersistent cdoObj = (CDOPersistent) o;
>> cdoObj.load(); // Used to notify my viewer listening to model
>> changes
>>
>> // the following is for test only
>> if (cdoObj instanceof Session) {
>> Session s = (Session) cdoObj;
>> System.out.println("queue="+s.getQueue());
>> }
>> }
>>
>> }
>> }
>>
>> When I add a user to the queue, the queue is modified. But when a
>> user is removed the queue is always displaying the state before the
>> remove.
>>
>>
>> Thanks,
>>
>> Yannick
|
|
|
Re: CDO and SessionInvalidationListener [message #65280 is a reply to message #64887] |
Thu, 21 December 2006 11:02 |
Eclipse User |
|
|
|
Originally posted by: yannick.lizzi.silogic.fr
Eike,
Now, it works thanks.
Yannick
> Yannick, Stephen,
>
> I have fixed this bug and committed the changes to branch
> R0_7_maintenance. Unfortunately the build system is not usable for me at
> the moment. As soon as it is I will publish new builds.
>
> Cheers
> /Eike
>
>
>
> Eike Stepper schrieb:
>> Yannick, Stephen,
>>
>> Sorry for the delay, but I'm starting to dig into this issue:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
>>
>> Cheers
>> /Eike
>>
>>
>> Yannick Lizzi schrieb:
>>> Hi all,
>>>
>>> I have the following model:
>>> Meeting #-> User (aggregation), named "participants"
>>> Session --> Meeting (association)
>>> Session --> User (association), named "queue".
>>>
>>> I have two clients and one server. My purpose is to maintain the
>>> 'queue' relation up to date on both client sides.
>>> When I add a user (already defined in meeting aggregation) to the
>>> queue on one side, I see it on the other side. But when I remove a
>>> user the other side is not notified.
>>>
>>> I use the following session invalidation listener:
>>> class SessionInvalidationListener implements
>>> ResourceManager.InvalidationListener {
>>> public void notifyInvalidation(ResourceManager manager,
>>> List<EObject> invalidated, List<EObject> deferred) {
>>>
>>> for (EObject o : invalidated) {
>>> CDOPersistent cdoObj = (CDOPersistent) o;
>>> cdoObj.load(); // Used to notify my viewer listening to model
>>> changes
>>>
>>> // the following is for test only
>>> if (cdoObj instanceof Session) {
>>> Session s = (Session) cdoObj;
>>> System.out.println("queue="+s.getQueue());
>>> }
>>> }
>>>
>>> }
>>> }
>>>
>>> When I add a user to the queue, the queue is modified. But when a
>>> user is removed the queue is always displaying the state before the
>>> remove.
>>>
>>>
>>> Thanks,
>>>
>>> Yannick
|
|
|
Re: CDO and SessionInvalidationListener [message #596006 is a reply to message #62357] |
Mon, 20 November 2006 18:27 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Yannick,
Eike is on vacation until Dec 6 so likely you won't get an answer before
then.
Yannick Lizzi wrote:
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the
> 'queue' relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the
> queue on one side, I see it on the other side. But when I remove a
> user the other side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager,
> List<EObject> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model
> changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user
> is removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: CDO and SessionInvalidationListener [message #596120 is a reply to message #62357] |
Fri, 24 November 2006 05:35 |
Eclipse User |
|
|
|
Originally posted by: sperez.miragenetworks.com
I see the same thing (or something very similar). Specifically, in
AbstractDataRequest.receiveObject(...), I see where the new objects are
added in receiveReferences(...), but I see no place where a removed object
gets removed.
In my specific use case I am moving an object from a non-containment
reference of one object to another. When the object is moved from one list
to the other, the object apears to be in both lists.
Patiently waiting until Dec. 6,
Stephen
"Yannick Lizzi" <yannick.lizzi@silogic.fr> wrote in message
news:ejsmni$5a7$1@utils.eclipse.org...
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the 'queue'
> relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the queue on
> one side, I see it on the other side. But when I remove a user the other
> side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager, List<EObject>
> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user is
> removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
|
|
|
Re: CDO and SessionInvalidationListener [message #596956 is a reply to message #62357] |
Sat, 16 December 2006 09:36 |
|
Yannick, Stephen,
Sorry for the delay, but I'm starting to dig into this issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
Cheers
/Eike
Yannick Lizzi schrieb:
> Hi all,
>
> I have the following model:
> Meeting #-> User (aggregation), named "participants"
> Session --> Meeting (association)
> Session --> User (association), named "queue".
>
> I have two clients and one server. My purpose is to maintain the
> 'queue' relation up to date on both client sides.
> When I add a user (already defined in meeting aggregation) to the
> queue on one side, I see it on the other side. But when I remove a
> user the other side is not notified.
>
> I use the following session invalidation listener:
> class SessionInvalidationListener implements
> ResourceManager.InvalidationListener {
> public void notifyInvalidation(ResourceManager manager,
> List<EObject> invalidated, List<EObject> deferred) {
>
> for (EObject o : invalidated) {
> CDOPersistent cdoObj = (CDOPersistent) o;
> cdoObj.load(); // Used to notify my viewer listening to model
> changes
>
> // the following is for test only
> if (cdoObj instanceof Session) {
> Session s = (Session) cdoObj;
> System.out.println("queue="+s.getQueue());
> }
> }
>
> }
> }
>
> When I add a user to the queue, the queue is modified. But when a user
> is removed the queue is always displaying the state before the remove.
>
>
> Thanks,
>
> Yannick
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: CDO and SessionInvalidationListener [message #597090 is a reply to message #64612] |
Tue, 19 December 2006 15:13 |
|
Yannick, Stephen,
I have fixed this bug and committed the changes to branch
R0_7_maintenance. Unfortunately the build system is not usable for me at
the moment. As soon as it is I will publish new builds.
Cheers
/Eike
Eike Stepper schrieb:
> Yannick, Stephen,
>
> Sorry for the delay, but I'm starting to dig into this issue:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
>
> Cheers
> /Eike
>
>
> Yannick Lizzi schrieb:
>> Hi all,
>>
>> I have the following model:
>> Meeting #-> User (aggregation), named "participants"
>> Session --> Meeting (association)
>> Session --> User (association), named "queue".
>>
>> I have two clients and one server. My purpose is to maintain the
>> 'queue' relation up to date on both client sides.
>> When I add a user (already defined in meeting aggregation) to the
>> queue on one side, I see it on the other side. But when I remove a
>> user the other side is not notified.
>>
>> I use the following session invalidation listener:
>> class SessionInvalidationListener implements
>> ResourceManager.InvalidationListener {
>> public void notifyInvalidation(ResourceManager manager,
>> List<EObject> invalidated, List<EObject> deferred) {
>>
>> for (EObject o : invalidated) {
>> CDOPersistent cdoObj = (CDOPersistent) o;
>> cdoObj.load(); // Used to notify my viewer listening to model
>> changes
>>
>> // the following is for test only
>> if (cdoObj instanceof Session) {
>> Session s = (Session) cdoObj;
>> System.out.println("queue="+s.getQueue());
>> }
>> }
>>
>> }
>> }
>>
>> When I add a user to the queue, the queue is modified. But when a
>> user is removed the queue is always displaying the state before the
>> remove.
>>
>>
>> Thanks,
>>
>> Yannick
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: CDO and SessionInvalidationListener [message #597270 is a reply to message #64887] |
Thu, 21 December 2006 11:02 |
Eclipse User |
|
|
|
Originally posted by: yannick.lizzi.silogic.fr
Eike,
Now, it works thanks.
Yannick
> Yannick, Stephen,
>
> I have fixed this bug and committed the changes to branch
> R0_7_maintenance. Unfortunately the build system is not usable for me at
> the moment. As soon as it is I will publish new builds.
>
> Cheers
> /Eike
>
>
>
> Eike Stepper schrieb:
>> Yannick, Stephen,
>>
>> Sorry for the delay, but I'm starting to dig into this issue:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=168321
>>
>> Cheers
>> /Eike
>>
>>
>> Yannick Lizzi schrieb:
>>> Hi all,
>>>
>>> I have the following model:
>>> Meeting #-> User (aggregation), named "participants"
>>> Session --> Meeting (association)
>>> Session --> User (association), named "queue".
>>>
>>> I have two clients and one server. My purpose is to maintain the
>>> 'queue' relation up to date on both client sides.
>>> When I add a user (already defined in meeting aggregation) to the
>>> queue on one side, I see it on the other side. But when I remove a
>>> user the other side is not notified.
>>>
>>> I use the following session invalidation listener:
>>> class SessionInvalidationListener implements
>>> ResourceManager.InvalidationListener {
>>> public void notifyInvalidation(ResourceManager manager,
>>> List<EObject> invalidated, List<EObject> deferred) {
>>>
>>> for (EObject o : invalidated) {
>>> CDOPersistent cdoObj = (CDOPersistent) o;
>>> cdoObj.load(); // Used to notify my viewer listening to model
>>> changes
>>>
>>> // the following is for test only
>>> if (cdoObj instanceof Session) {
>>> Session s = (Session) cdoObj;
>>> System.out.println("queue="+s.getQueue());
>>> }
>>> }
>>>
>>> }
>>> }
>>>
>>> When I add a user to the queue, the queue is modified. But when a
>>> user is removed the queue is always displaying the state before the
>>> remove.
>>>
>>>
>>> Thanks,
>>>
>>> Yannick
|
|
|
Goto Forum:
Current Time: Wed Jan 15 07:29:48 GMT 2025
Powered by FUDForum. Page generated in 0.05189 seconds
|