PortletDescription portletDescription = producer.getPortletDescription(portletKey.getPortletHandle());
GroupSession groupSession = userSession.getGroupSession(portletDescription.getGroupID());
PortletSession portletSession = groupSession.getPortletSession(portletInstanceKey);
SessionContext sessionContext = portletSession.getSessionContext();
WSRPPortlet wsrpportlet = consumerEnvironment.getPortletRegistry().getPortlet(portletKey);
PortletDriver portletDriver = consumerEnvironment.getPortletDriverRegistry().getPortletDriver(wsrpportlet);
if (sessionContext != null) {
String[] sessions = new String[1];
sessions[0] = new String (sessionContext.getSessionID());
portletDriver.releaseSessions(sessions, user.getUserID());
}
userSession.removeGroupSession(portletDescription.getGroupID());
} catch (WSRPException e) {
this.getLogger().error("session deregister()", e);