final SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
if (clientIdentity != null) {
if (logger.isDebugEnabled()) {
logger.debug("Logging out: " + clientIdentity);
}
securityService.logout(clientIdentity);
ClientSecurity.setIdentity(null);
}
} catch (final LoginException e) {
throw new OpenEJBRuntimeException("User could not be logged out.", e);
}