CDO and SessionInvalidationListener [message #595991] |
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
|
|
|
Powered by
FUDForum. Page generated in 0.02704 seconds