throw new InvalidRelationException("Could not find relationship with id " + relation.getId());
}
// We update the persisted relation
em.getTransaction().begin();
PersistentRelation storedRelation = relations.get(0);
storedRelation.setStatus(relation.getStatus());
em.getTransaction().commit();
em.close();
// We cleanup and notifiy the relation for the recipient
storedRelation.setAclRules(null);
storedRelation.setComment(null);
notify(userJID, storedRelation);
}