Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO and SessionInvalidationListener
CDO and SessionInvalidationListener [message #595991] Mon, 20 November 2006 16:56
Eclipse UserFriend
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
Previous Topic:Client/Server App with EMF and Teneo
Next Topic:[emf.validation.ocl] Custom EnvironmentFactory for OCL constraints
Goto Forum:
  


Current Time: Sat Apr 27 04:25:46 GMT 2024

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

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

Back to the top