@@ -0,0 +1,2051 @@
+%0A%0Apackage org.gridlab.gridsphere.portlets.core.admin.portlets;%0A%0Aimport org.gridlab.gridsphere.portlet.*;%0Aimport org.gridlab.gridsphere.portlet.service.PortletServiceException;%0Aimport org.gridlab.gridsphere.provider.event.FormEvent;%0Aimport org.gridlab.gridsphere.provider.portlet.ActionPortlet;%0Aimport org.gridlab.gridsphere.services.core.user.UserSessionManager;%0Aimport org.gridlab.gridsphere.services.core.user.UserManagerService;%0Aimport org.gridlab.gridsphere.portletcontainer.PortletSessionManager;%0A%0Aimport javax.servlet.UnavailableException;%0Aimport java.util.List;%0Aimport java.util.Iterator;%0Aimport java.util.ArrayList;%0A%0A/**%0A * The%0A */%0Apublic class SessionManagerPortlet extends ActionPortlet %7B%0A%0A    private UserSessionManager userSessionMgr = null;%0A    private PortletSessionManager portletSessionMgr = null;%0A%0A    private UserManagerService userManager = null;%0A%0A    public void init(PortletConfig config) throws UnavailableException %7B%0A        super.init(config);%0A        try %7B%0A            userManager = (UserManagerService)getConfig().getContext().getService(UserManagerService.class);%0A        %7D catch (PortletServiceException e) %7B%0A            log.error(%22Unable to get portlet manager instance%22, e);%0A        %7D%0A        userSessionMgr = UserSessionManager.getInstance();%0A        portletSessionMgr = PortletSessionManager.getInstance();%0A        DEFAULT_VIEW_PAGE = %22showSessions%22;%0A    %7D%0A%0A%0A    public void showSessions(FormEvent event) throws PortletException %7B%0A%0A        PortletRequest req = event.getPortletRequest();%0A        List uids = userSessionMgr.getUserIds();%0A        List names = new ArrayList();%0A        Iterator it = uids.iterator();%0A        while (it.hasNext()) %7B%0A            String uid = (String)it.next();%0A            User user = userManager.getUser(uid);%0A            names.add(user);%0A        %7D%0A        int numSessions = portletSessionMgr.getNumSessions();%0A%0A        req.setAttribute(%22num_sessions%22, String.valueOf(numSessions));%0A%0A        req.setAttribute(%22uids%22, names);%0A        setNextState(req, %22admin/session/view.jsp%22);%0A%0A%0A    %7D%0A%0A%0A%7D%0A

add portlet for dosplaying logged in users/session info