addEvent(ev);
addEvent(ev, pending);
                public void onRole(Role role) {                    Object old = null;                    if (role.isComponent() || role.isReversable()) {                        old = get(obj, role);                    }                    PropertyEvent ev;                    try {                        ev = new SetEvent(Session.this, obj, role, value);                    } catch (TypeException te) {                        te.setInternal(false);                        throw te;                    }                    if (role.isReversable()) {                        if (old != null) { reverseUpdateOld(ev, old); }                        if (value != null) { reverseUpdateNew(ev); }                    }                    addEvent(ev);                    if (role.isComponent()) {                        if (old != null) { cascadeDelete(obj, old); }                    }                }