I think there is no need for the contextAdded & contextRemoved methods in
the ContextManager interface. contextUpdated should suffice.

The reason is, when a contextUpdated message is received, if it does not
exist on a particular node, it can be created. Similary, the context cleanup
mechanism will take care of cleaning up the contexts on each node, hence
removeContext is also not needed. This also simplifies the clustering
implementation, since an updateContext message can be received before a
contextAdded message due to the order in which the threads run at a
particular time. Otherwise, the sender has to ensure that always a
createContext message is sent to the channel before an updateContext message
is sent.

Thoughts?

--
Thanks
Afkham Azeez

http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Reply via email to