Index: lams_tool_whiteboard/web/pages/monitoring/summary.jsp =================================================================== diff -u -r85a2af65cb5f008ebb4f38b1431b7f9482330f4b -r07b4e1abe3959528eaeb5c819d24f3930ce6733c --- lams_tool_whiteboard/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 85a2af65cb5f008ebb4f38b1431b7f9482330f4b) +++ lams_tool_whiteboard/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 07b4e1abe3959528eaeb5c819d24f3930ce6733c) @@ -1,669 +1,90 @@ -<%@ include file="/common/taglibs.jsp"%> - - - - +package org.lamsfoundation.lams.util.hibernate; -monitoring/timeLimit.jsp - - - - - - - - +import org.apache.log4j.Logger; +import org.hibernate.Cache; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.context.internal.ManagedSessionContext; +import org.hibernate.stat.Statistics; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.springframework.orm.hibernate5.SessionHolder; +import org.springframework.transaction.support.TransactionSynchronizationManager; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; -<%@ page import="org.lamsfoundation.lams.tool.whiteboard.WhiteboardConstants"%> +/** +* Helper for Hibernate sessions. +* +* @author Marcin Cieslak +*/ +public class HibernateSessionManager { +private static SessionFactory sessionFactory; - - - - - +private static Logger log = Logger.getLogger(HibernateSessionManager.class); - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
-
-
-

- - : ${attemptedLearnersNumber}/ -

-
-
-
-
-
- -

- -

-
-
- - - - - - - - - - -
-
- - - - - - -
- - - - - -
- - -
- - -
- -
-
- - -
-
- - - - - - -
- <%-- If there is no grouping, data is loaded immediately. - If there is grouping, data is loaded on panel expand. --%> - -
-
-
- - -
-

- -

- - -   - - - -
- - -
-
- - ${ !sessionMap.isGroupedActivity || ! status.last ? '
 
' : ''} - -
- - -
-
- - - <%@ include file="reflections.jsp"%> - - - - <%@ include file="advanceoptions.jsp"%> - - -
- - <%@ include file="dateRestriction.jsp"%> - -
-
\ No newline at end of file +private static SessionFactory getSessionFactory() { +if (HibernateSessionManager.sessionFactory == null) { +WebApplicationContext wac = WebApplicationContextUtils +.getRequiredWebApplicationContext(SessionManager.getServletContext()); +HibernateSessionManager.sessionFactory = (SessionFactory) wac.getBean("coreSessionFactory"); +} +return HibernateSessionManager.sessionFactory; +} +} \ No newline at end of file