public void postDelete(Membership m) throws Exception
{
if (LOG.isDebugEnabled())
LOG.debug(">>> In postDelete");
String userId = m.getUserName();
MembershipEntry expected = new MembershipEntry(m.getGroupId(), m.getMembershipType());
for (StateKey key : conversationRegistry.getStateKeys(userId))
{
ConversationState cstate = conversationRegistry.getState(key);
Identity identity = cstate.getIdentity();
Iterator<MembershipEntry> iter = identity.getMemberships().iterator();
while (iter.hasNext())
{
MembershipEntry tmp = iter.next();
if (tmp.equals(expected))
{
iter.remove();
if (LOG.isDebugEnabled())
LOG.debug("Removed membership entry " + tmp);
}