Iterator loggedOnUserSessions = LogonControllerFactory.getInstance().getActiveSessions().values()
.iterator();
while (loggedOnUserSessions.hasNext()) {
SessionInfo element = (SessionInfo) loggedOnUserSessions.next();
if (element.getUser().equals(user)) {
element.invalidate();
}
}
// Revoke all polices from the user
PolicyDatabaseFactory.getInstance().revokeAllPoliciesFromPrincipal(user);
udb.deleteAccount(user);