You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(275) |
Jul
(81) |
Aug
(19) |
Sep
(26) |
Oct
(190) |
Nov
(118) |
Dec
(16) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(9) |
Feb
(318) |
Mar
(251) |
Apr
(354) |
May
(209) |
Jun
(261) |
Jul
(226) |
Aug
(136) |
Sep
(156) |
Oct
(30) |
Nov
(5) |
Dec
(13) |
| 2009 |
Jan
(26) |
Feb
(35) |
Mar
(63) |
Apr
(21) |
May
(26) |
Jun
(33) |
Jul
(55) |
Aug
(71) |
Sep
(23) |
Oct
(40) |
Nov
(18) |
Dec
(13) |
| 2010 |
Jan
(17) |
Feb
(98) |
Mar
(39) |
Apr
(25) |
May
(107) |
Jun
(257) |
Jul
(270) |
Aug
(206) |
Sep
(237) |
Oct
(187) |
Nov
(302) |
Dec
(187) |
| 2011 |
Jan
(63) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Tomas M. <to...@us...> - 2010-11-29 18:09:42
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv3602/JavaSource/org/unitime/timetable/action Modified Files: Tag: dev_curriculum HibernateQueryTestAction.java Log Message: Test HQL - allow to change the maximal number of displayed lines by setting the tmtbl.test_hql.max_line application property Index: HibernateQueryTestAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/HibernateQueryTestAction.java,v retrieving revision 1.5.2.3 retrieving revision 1.5.2.4 diff -C2 -d -r1.5.2.3 -r1.5.2.4 *** HibernateQueryTestAction.java 9 Nov 2010 12:25:49 -0000 1.5.2.3 --- HibernateQueryTestAction.java 29 Nov 2010 18:09:34 -0000 1.5.2.4 *************** *** 56,59 **** --- 56,60 ---- import org.unitime.commons.hibernate.util.PrettyFormatter; import org.unitime.commons.web.Web; + import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.form.HibernateQueryTestForm; import org.unitime.timetable.model.dao._RootDAO; *************** *** 111,114 **** --- 112,116 ---- if(errors.size()==0) { try { + int limit = Integer.parseInt(ApplicationProperties.getProperty("tmtbl.test_hql.max_line", "100")); String query = frm.getQuery(); _RootDAO rdao = new _RootDAO(); *************** *** 120,124 **** int line = 0; for (Iterator i=l.iterator();i.hasNext();line++) { ! if (line>=100) { s.append("<tr><td>...</td></tr>"); break; } --- 122,126 ---- int line = 0; for (Iterator i=l.iterator();i.hasNext();line++) { ! if (limit > 0 && line >= limit) { s.append("<tr><td>...</td></tr>"); break; } |
|
From: Nightly B. <no...@un...> - 2010-11-25 00:18:50
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Nightly B. <no...@un...> - 2010-11-24 23:52:34
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Tomas M. <to...@us...> - 2010-11-24 17:45:38
|
Update of /cvsroot/unitime/UniTime/WebContent/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13588/WebContent/help Modified Files: Release-Notes.xml Log Message: added recent changes Index: Release-Notes.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/help/Release-Notes.xml,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** Release-Notes.xml 12 Nov 2010 20:30:27 -0000 1.70 --- Release-Notes.xml 24 Nov 2010 17:45:30 -0000 1.71 *************** *** 36,39 **** --- 36,42 ---- <line>This should fix the ObjectNotFoundException on the Class Assignment page</line> </line> + <line>Student sectioning: check for LazyInitializationException during save</line> + <line>Remote solver server: added ability to override database connection string by the tmtbl.solver.connection.url property</line> + <line>Examination verification report: limit the length of the scheduling note to fit within one line</line> </description> </item> |
|
From: Tomas M. <to...@us...> - 2010-11-24 17:45:04
|
Update of /cvsroot/unitime/UniTime/WebContent/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13097/WebContent/help Modified Files: Tag: dev_curriculum Release-Notes.xml Log Message: added recent changes Index: Release-Notes.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/help/Release-Notes.xml,v retrieving revision 1.62.2.17 retrieving revision 1.62.2.18 diff -C2 -d -r1.62.2.17 -r1.62.2.18 *** Release-Notes.xml 17 Nov 2010 15:32:00 -0000 1.62.2.17 --- Release-Notes.xml 24 Nov 2010 17:44:56 -0000 1.62.2.18 *************** *** 141,144 **** --- 141,146 ---- <line>Added query log (Page Statistics page)</line> <line>Examinations: Added ability to automatically put a preference on an original building (i.e., building of a room in which the related class took place)</line> + <line>Course timetabling solver: handling of meet with constraint improved</line> + <line>Course offerings: course number can be in lower case (automatic conversion to upper case is disabled when tmtbl.courseNumber.upperCase property is set to false)</line> </description> </item> *************** *** 213,216 **** --- 215,221 ---- <line>This should fix the ObjectNotFoundException on the Class Assignment page</line> </line> + <line>Student sectioning: check for LazyInitializationException during save</line> + <line>Remote solver server: added ability to override database connection string by the tmtbl.solver.connection.url property</line> + <line>Examination verification report: limit the length of the scheduling note to fit within one line</line> </description> </item> |
|
From: Tomas M. <to...@us...> - 2010-11-24 17:32:03
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10979/JavaSource/org/unitime/timetable/tags Added Files: Tag: dev_curriculum Copyright.java Log Message: Copyright notice - unified copyright messages to <tt:copy/> tag - added text "distributed under GNU General Public License" (with the link to http://www.unitime.org/uct_license.php) - added the following message in the source code, where the tt:copy tag is used: <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> --- NEW FILE: Copyright.java --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.unitime.timetable.tags; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; import org.unitime.commons.Debug; public class Copyright extends BodyTagSupport { private static final long serialVersionUID = -4463420165596054395L; public int doStartTag() throws JspException { return EVAL_BODY_BUFFERED; } public int doEndTag() throws JspException { // WARNING: Changing or removing the following copyright notice will violate the license terms. // If you need a different licensing, please contact us at su...@un... String body = "<a class='unitime-FooterLink' href='http://www.unitime.org'>© 2008 - 2010 UniTime LLC</a>"; body += ", <a class='unitime-FooterLink' href='http://www.unitime.org/uct_license.php'>distributed under GNU General Public License.</a>"; try { pageContext.getOut().print(body); } catch (Exception e) { Debug.error("Could not display copyright notice: " + e.getMessage()); } return EVAL_PAGE; } } |
|
From: Tomas M. <to...@us...> - 2010-11-24 17:32:03
|
Update of /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10979/WebContent/WEB-INF/tld Modified Files: Tag: dev_curriculum timetable.tld Log Message: Copyright notice - unified copyright messages to <tt:copy/> tag - added text "distributed under GNU General Public License" (with the link to http://www.unitime.org/uct_license.php) - added the following message in the source code, where the tt:copy tag is used: <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> Index: timetable.tld =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/tld/timetable.tld,v retrieving revision 1.11.2.4 retrieving revision 1.11.2.5 diff -C2 -d -r1.11.2.4 -r1.11.2.5 *** timetable.tld 9 Nov 2010 12:25:52 -0000 1.11.2.4 --- timetable.tld 24 Nov 2010 17:31:55 -0000 1.11.2.5 *************** *** 457,459 **** --- 457,465 ---- </attribute> </tag> + + <tag> + <name>copy</name> + <tag-class>org.unitime.timetable.tags.Copyright</tag-class> + <body-content>JSP</body-content> + </tag> </taglib> |
|
From: Tomas M. <to...@us...> - 2010-11-24 17:32:03
|
Update of /cvsroot/unitime/UniTime/WebContent In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10979/WebContent Modified Files: Tag: dev_curriculum main.jsp error.jsp initializationError.jspf gwt.jsp login.jsp Log Message: Copyright notice - unified copyright messages to <tt:copy/> tag - added text "distributed under GNU General Public License" (with the link to http://www.unitime.org/uct_license.php) - added the following message in the source code, where the tt:copy tag is used: <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> Index: gwt.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/Attic/gwt.jsp,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -C2 -d -r1.1.2.10 -r1.1.2.11 *** gwt.jsp 9 Nov 2010 12:25:48 -0000 1.1.2.10 --- gwt.jsp 24 Nov 2010 17:31:55 -0000 1.1.2.11 *************** *** 82,88 **** <table class="unitime-Footer"> <tr> ! <td width="33%" align="left" nowrap="nowrap"><span id="UniTimeGWT:Version"></span></td> ! <td width="34%" align="center" nowrap="nowrap"><a class='unitime-FooterLink' href='http://www.unitime.org'>© 2010 UniTime LLC</a></td> ! <td width="33%" align="right" nowrap="nowrap"><tt:registration/></td> </tr> <tt:hasProperty name="tmtbl.page.disclaimer"> --- 82,89 ---- <table class="unitime-Footer"> <tr> ! <td width="33%" align="left" nowrap="nowrap" valign="top"><span id="UniTimeGWT:Version"></span></td> ! <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> ! <td width="34%" align="center" valign="top" style="max-width: 300px;"><tt:copy/></td> ! <td width="33%" align="right" valign="top" style="max-width: 300px;"><tt:registration/></td> </tr> <tt:hasProperty name="tmtbl.page.disclaimer"> Index: initializationError.jspf =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/Attic/initializationError.jspf,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** initializationError.jspf 9 Nov 2010 12:25:48 -0000 1.1.2.3 --- initializationError.jspf 24 Nov 2010 17:31:55 -0000 1.1.2.4 *************** *** 21,25 **** <%@page import="org.unitime.timetable.util.Constants"%> <% if (InitServlet.getInitializationException() != null) { %> ! <table align="center" class="unitime-Footer"> <tr> <td align="center" style="color:red;"> --- 21,25 ---- <%@page import="org.unitime.timetable.util.Constants"%> <% if (InitServlet.getInitializationException() != null) { %> ! <table align="center" class="unitime-Footer" style="margin-top: 50px; padding-left: 100px;"> <tr> <td align="center" style="color:red;"> Index: error.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/error.jsp,v retrieving revision 1.4.2.8 retrieving revision 1.4.2.9 diff -C2 -d -r1.4.2.8 -r1.4.2.9 *** error.jsp 9 Nov 2010 12:25:48 -0000 1.4.2.8 --- error.jsp 24 Nov 2010 17:31:55 -0000 1.4.2.9 *************** *** 18,21 **** --- 18,22 ---- --%> <%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8" isErrorPage="true"%> + <%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %> <%@ page import="org.unitime.commons.web.WebOutputStream"%> <%@ page import="java.io.PrintWriter"%> *************** *** 48,51 **** --- 49,53 ---- <link type="text/css" rel="stylesheet" href="styles/unitime.css"> <LINK rel="stylesheet" type="text/css" href="styles/timetabling.css" /> + <script type="text/javascript" language="javascript" src="unitime/unitime.nocache.js"></script> <meta http-equiv="X-UA-Compatible" content="chrome=1"> </HEAD> *************** *** 116,123 **** <table class="unitime-Footer"> <tr> ! <td width="33%" align="left"></td> ! <td width="34%" align="center" nowrap="nowrap"><a class='unitime-FooterLink' href='http://www.unitime.org'>© 2010 UniTime.org</a></td> ! <td width="33%" align="right"></td> ! </tr> </table> </td></tr></table> --- 118,126 ---- <table class="unitime-Footer"> <tr> ! <td width="33%" align="left" valign="top"><span id="UniTimeGWT:Version"></span></td> ! <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> ! <td width="34%" align="center" valign="top" style="max-width: 300px;"><tt:copy/></td> ! <td width="33%" align="right" valign="top" style="max-width: 300px;"><tt:registration/></td> ! </tr> </table> </td></tr></table> Index: main.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/main.jsp,v retrieving revision 1.4.2.12 retrieving revision 1.4.2.13 diff -C2 -d -r1.4.2.12 -r1.4.2.13 *** main.jsp 9 Nov 2010 12:25:48 -0000 1.4.2.12 --- main.jsp 24 Nov 2010 17:31:55 -0000 1.4.2.13 *************** *** 84,88 **** <div id="contentMain"> ! <table align="center" > <tr> <td valign="top" rowspan="2"> --- 84,88 ---- <div id="contentMain"> ! <table align="center"> <tr> <td valign="top" rowspan="2"> *************** *** 109,114 **** </td></tr> </table> ! </td></tr><tr><td style="min-width: 800px"> ! <TABLE width="800" height="600" align="center"> <TR> <% --- 109,114 ---- </td></tr> </table> ! </td></tr><tr><td> ! <TABLE width="800px" height="600px" align="center"> <TR> <% *************** *** 162,167 **** <tr> <td width="33%" align="left" valign="top" nowrap="nowrap"><span id="UniTimeGWT:Version"></span></td> ! <td width="34%" align="center" valign="top" nowrap="nowrap"><a class='unitime-FooterLink' href='http://www.unitime.org'>© 2008 - 2010 UniTime LLC</a></td> ! <td width="33%" align="right" nowrap="nowrap"><tt:registration update="true"/></td> </tr> <tt:hasProperty name="tmtbl.page.disclaimer"> --- 162,173 ---- <tr> <td width="33%" align="left" valign="top" nowrap="nowrap"><span id="UniTimeGWT:Version"></span></td> ! <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> ! <td width="34%" align="center" valign="top" style="max-width: 300px;"><tt:copy/></td> ! <td width="33%" align="right" valign="top" style="max-width: 300px;"><tt:registration update="true"/></td> ! </tr> ! <tr> ! <td colspan='3' align='center'> ! ! </td> </tr> <tt:hasProperty name="tmtbl.page.disclaimer"> Index: login.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/login.jsp,v retrieving revision 1.5.2.8 retrieving revision 1.5.2.9 diff -C2 -d -r1.5.2.8 -r1.5.2.9 *** login.jsp 9 Nov 2010 12:25:48 -0000 1.5.2.8 --- login.jsp 24 Nov 2010 17:31:55 -0000 1.5.2.9 *************** *** 19,22 **** --- 19,24 ---- <%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8" errorPage="/error.jsp"%> <%@ page import="org.unitime.timetable.ApplicationProperties" %> + <%@page import="net.sf.cpsolver.ifs.util.JProf"%> + <%@page import="java.text.NumberFormat"%> <%@ taglib uri="/WEB-INF/tld/timetable.tld" prefix="tt" %> *************** *** 113,130 **** <%@ include file="/initializationError.jspf"%> ! <BR> ! ! <BR> ! ! ! <tt:hasProperty name="tmtbl.page.disclaimer"> ! <table align="center" class="unitime-Footer"> ! <tr> ! <td colspan="3" align="center" style="color:#777777;"> ! <tt:property name="tmtbl.page.disclaimer"/> ! </td> </tr> </table> - </tt:hasProperty> --- 115,131 ---- <%@ include file="/initializationError.jspf"%> ! <table class="unitime-Footer" style="margin-top: 50px; padding-left: 100px;"> ! <tr> ! <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> ! <td align="center" nowrap="nowrap"><span id="UniTimeGWT:Version"></span><tt:copy/></td> </tr> + <tt:hasProperty name="tmtbl.page.disclaimer"> + <tr> + <td align="center" style="color:#777777;"> + <tt:property name="tmtbl.page.disclaimer"/> + </td> + </tr> + </tt:hasProperty> </table> |
|
From: Tomas M. <to...@us...> - 2010-11-24 17:32:03
|
Update of /cvsroot/unitime/UniTime/WebContent/layouts In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10979/WebContent/layouts Modified Files: Tag: dev_curriculum pageLayout.jsp Log Message: Copyright notice - unified copyright messages to <tt:copy/> tag - added text "distributed under GNU General Public License" (with the link to http://www.unitime.org/uct_license.php) - added the following message in the source code, where the tt:copy tag is used: <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> Index: pageLayout.jsp =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/layouts/pageLayout.jsp,v retrieving revision 1.11.2.17 retrieving revision 1.11.2.18 diff -C2 -d -r1.11.2.17 -r1.11.2.18 *** pageLayout.jsp 9 Nov 2010 12:25:54 -0000 1.11.2.17 --- pageLayout.jsp 24 Nov 2010 17:31:55 -0000 1.11.2.18 *************** *** 180,186 **** <table class="unitime-Footer"> <tr> ! <td width="33%" align="left" nowrap="nowrap"><span id="UniTimeGWT:Version"></span></td> ! <td width="34%" align="center" nowrap="nowrap"><a class='unitime-FooterLink' href='http://www.unitime.org'>© 2008 - 2010 UniTime LLC</a></td> ! <td width="33%" align="right" nowrap="nowrap"> <logic:notEmpty scope="request" name="TimeStamp"> <% --- 180,184 ---- <table class="unitime-Footer"> <tr> ! <td width="33%" align="left" nowrap="nowrap" valign="top"><span id="UniTimeGWT:Version"></span> <logic:notEmpty scope="request" name="TimeStamp"> <% *************** *** 194,205 **** </logic:notEmpty> </td> </tr> - <tt:notHasProperty name="tmtbl.page.disclaimer"> - <tr> - <td colspan="3" class="unitime-Disclaimer"> - <tt:registration/> - </td> - </tr> - </tt:notHasProperty> <tt:hasProperty name="tmtbl.page.disclaimer"> <tr> --- 192,199 ---- </logic:notEmpty> </td> + <!-- WARNING: Changing or removing the copyright notice will violate the license terms. If you need a different licensing, please contact us at su...@un... --> + <td width="34%" align="center" valign="top" style="max-width: 300px;"><tt:copy/></td> + <td width="33%" align="right" valign="top" style="max-width: 300px;"><tt:registration/></td> </tr> <tt:hasProperty name="tmtbl.page.disclaimer"> <tr> |
|
From: Tomas M. <to...@us...> - 2010-11-24 17:27:31
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv9955/JavaSource/org/unitime/timetable/tags Modified Files: Tag: dev_curriculum Registration.java Log Message: fixed NullPointerException when user is not logged in Index: Registration.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/tags/Attic/Registration.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** Registration.java 9 Nov 2010 19:41:37 -0000 1.1.2.4 --- Registration.java 24 Nov 2010 17:27:23 -0000 1.1.2.5 *************** *** 44,47 **** --- 44,48 ---- import org.dom4j.io.XMLWriter; import org.restlet.resource.ClientResource; + import org.unitime.commons.User; import org.unitime.commons.web.Web; import org.unitime.timetable.ApplicationProperties; *************** *** 155,159 **** switch (iMethod) { case hasMessage: ! if (!Web.getUser(pageContext.getSession()).isAdmin()) return SKIP_BODY; try { --- 156,161 ---- switch (iMethod) { case hasMessage: ! User user = Web.getUser(pageContext.getSession()); ! if (user == null || !user.isAdmin()) return SKIP_BODY; try { *************** *** 174,178 **** case message: try { ! if (Registration.sNote != null && Web.getUser(pageContext.getSession()).isAdmin()) pageContext.getOut().println(Registration.sNote); } catch (Exception e) {} --- 176,181 ---- case message: try { ! User user = Web.getUser(pageContext.getSession()); ! if (Registration.sNote != null && user != null && user.isAdmin()) pageContext.getOut().println(Registration.sNote); } catch (Exception e) {} *************** *** 182,186 **** if (sMessage != null) { pageContext.getOut().println(sMessage); ! if (isUpdate() && Web.getUser(pageContext.getSession()).isAdmin()) { String backUrl = URLEncoder.encode(((HttpServletRequest)pageContext.getRequest()).getRequestURL().toString() + "?refresh=1", "ISO-8859-1"); pageContext.getOut().println( --- 185,190 ---- if (sMessage != null) { pageContext.getOut().println(sMessage); ! User user = Web.getUser(pageContext.getSession()); ! if (isUpdate() && user != null && user.isAdmin()) { String backUrl = URLEncoder.encode(((HttpServletRequest)pageContext.getRequest()).getRequestURL().toString() + "?refresh=1", "ISO-8859-1"); pageContext.getOut().println( |
|
From: Tomas M. <to...@us...> - 2010-11-24 17:27:08
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv9850/JavaSource/org/unitime/timetable/gwt/client Modified Files: Tag: dev_curriculum ToolBox.java Log Message: copyright notice corrected Index: ToolBox.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/Attic/ToolBox.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** ToolBox.java 9 Nov 2010 12:25:50 -0000 1.1.2.3 --- ToolBox.java 24 Nov 2010 17:26:59 -0000 1.1.2.4 *************** *** 157,161 **** "<table class=\"unitime-Footer\"><tr>" + "<td width=\"33%\" align=\"left\" nowrap=\"nowrap\">Printed from UniTime 3.2 | University Timetabling Application</td>" + ! "<td width=\"34%\" align=\"center\">© 2010 UniTime.org</td>" + "<td width=\"33%\" align=\"right\">" + DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM).format(new Date()) + "</td>" + "</tr></table></td></tr></table>" + --- 157,161 ---- "<table class=\"unitime-Footer\"><tr>" + "<td width=\"33%\" align=\"left\" nowrap=\"nowrap\">Printed from UniTime 3.2 | University Timetabling Application</td>" + ! "<td width=\"34%\" align=\"center\">© 2008 - 2010 UniTime LLC</td>" + "<td width=\"33%\" align=\"right\">" + DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM).format(new Date()) + "</td>" + "</tr></table></td></tr></table>" + |
|
From: Tomas M. <to...@us...> - 2010-11-24 10:05:51
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12001/JavaSource/org/unitime/timetable/model Modified Files: Tag: dev_curriculum QueryLog.java Log Message: Encode the charts data series using the extended encoding format to avoid too long URLs (there is a 2K limit on the URL length). Index: QueryLog.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model/Attic/QueryLog.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** QueryLog.java 23 Nov 2010 19:11:15 -0000 1.1.2.5 --- QueryLog.java 24 Nov 2010 10:05:43 -0000 1.1.2.6 *************** *** 22,25 **** --- 22,26 ---- import java.text.DecimalFormat; import java.text.SimpleDateFormat; + import java.util.ArrayList; import java.util.Calendar; import java.util.Date; *************** *** 141,144 **** --- 142,164 ---- } + private static String sExtendedEncoding = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-."; + private static int sExtendedEncodingMax = sExtendedEncoding.length() * sExtendedEncoding.length(); + + private static String encode(List<Double> data, double max) { + StringBuffer ret = new StringBuffer(); + for (Double val: data) { + int scaled = (int)Math.floor(sExtendedEncodingMax * val / max); + if (scaled >= sExtendedEncodingMax) { + ret.append(".."); + } else if (scaled < 0) { + ret.append("__"); + } else { + ret.append(sExtendedEncoding.charAt(scaled / sExtendedEncoding.length())); + ret.append(sExtendedEncoding.charAt(scaled % sExtendedEncoding.length())); + } + } + return ret.toString(); + } + public static String getChart(ChartWindow w, ChartType t) { Date ts = new Date(); *************** *** 153,157 **** break; case FIFTEEN_MINUTES: ! from.add(Calendar.HOUR, - 24); break; } --- 173,177 ---- break; case FIFTEEN_MINUTES: ! from.add(Calendar.DAY_OF_YEAR, - 1); break; } *************** *** 163,167 **** break; case THREE_HOUR: ! to.add(Calendar.HOUR, + 3); break; case FIFTEEN_MINUTES: --- 183,187 ---- break; case THREE_HOUR: ! to.add(Calendar.HOUR_OF_DAY, + 3); break; case FIFTEEN_MINUTES: *************** *** 169,195 **** break; } ! String data[] = new String[] {"", "", "", "", ""}; ! DecimalFormat df = new DecimalFormat("0.0"); double max[] = new double[] { 0, 0}; while (to.getTime().compareTo(ts) <= 0) { ! if (!data[1].isEmpty()) { ! data[0] += "|"; ! for (int i = 1; i < data.length; i++) ! data[i] += ","; } switch (w) { case SEVEN_DAYS: if (from.get(Calendar.DAY_OF_MONTH) == 1) ! data[0] += new SimpleDateFormat("MMM/dd").format(from.getTime()); break; case THREE_HOUR: if (from.get(Calendar.HOUR_OF_DAY) < 3) ! data[0] += new SimpleDateFormat("MM/dd").format(from.getTime()).toLowerCase(); ! //else if (from.get(Calendar.HOUR_OF_DAY) == 7 || from.get(Calendar.HOUR_OF_DAY) == 12 || from.get(Calendar.HOUR_OF_DAY) == 17) ! // data[0] += new SimpleDateFormat("H").format(from.getTime()).toLowerCase(); break; case FIFTEEN_MINUTES: if (from.get(Calendar.MINUTE) < 15) ! data[0] += new SimpleDateFormat("H").format(from.getTime()).toLowerCase(); break; } --- 189,212 ---- break; } ! String axe = ""; ! List<Double>[] data = new List[] { new ArrayList<Double>(), new ArrayList<Double>(), new ArrayList<Double>(), new ArrayList<Double>()}; double max[] = new double[] { 0, 0}; + int index = 0; while (to.getTime().compareTo(ts) <= 0) { ! if (index > 0) { ! axe += "|"; } switch (w) { case SEVEN_DAYS: if (from.get(Calendar.DAY_OF_MONTH) == 1) ! axe += new SimpleDateFormat("MMM/dd").format(from.getTime()); break; case THREE_HOUR: if (from.get(Calendar.HOUR_OF_DAY) < 3) ! axe += new SimpleDateFormat("MM/dd").format(from.getTime()).toLowerCase(); break; case FIFTEEN_MINUTES: if (from.get(Calendar.MINUTE) < 15) ! axe += new SimpleDateFormat("H").format(from.getTime()).toLowerCase(); break; } *************** *** 202,210 **** "select count(distinct uniqueId) from QueryLog where timeStamp > :from and timeStamp <= :to and type = :type") .setTimestamp("from", from.getTime()).setTimestamp("to", to.getTime()).setInteger("type", Type.GWT.ordinal()).uniqueResult()).doubleValue(); ! int distinctUsers = ((Number)o[0]).intValue(); ! data[1] += distinctUsers; ! int distinctSessions = ((Number)o[1]).intValue(); ! data[2] += distinctSessions; ! max[0] = Math.max(max[0], distinctSessions); double callsPerMinute = ((Number)o[2]).doubleValue(); switch (w) { --- 219,227 ---- "select count(distinct uniqueId) from QueryLog where timeStamp > :from and timeStamp <= :to and type = :type") .setTimestamp("from", from.getTime()).setTimestamp("to", to.getTime()).setInteger("type", Type.GWT.ordinal()).uniqueResult()).doubleValue(); ! double distinctUsers = ((Number)o[0]).doubleValue(); ! data[0].add(distinctUsers); ! double distinctSessions = ((Number)o[1]).doubleValue(); ! data[1].add(distinctSessions); ! max[0] = Math.max(max[0], Math.max(distinctUsers, distinctSessions)); double callsPerMinute = ((Number)o[2]).doubleValue(); switch (w) { *************** *** 222,229 **** break; } ! data[3] += df.format(callsPerMinute); ! max[1] = Math.max(max[1], callsPerMinute); ! data[4] += df.format(gwtCallsPerMinute); ! max[1] = Math.max(max[1], gwtCallsPerMinute); break; case TIME: --- 239,245 ---- break; } ! data[2].add(callsPerMinute); ! data[3].add(gwtCallsPerMinute); ! max[1] = Math.max(max[1], Math.max(callsPerMinute, gwtCallsPerMinute)); break; case TIME: *************** *** 234,249 **** "select avg(q.timeSpent), max(q.timeSpent) from QueryLog q where q.timeStamp > :from and q.timeStamp <= :to and type = :type") .setTimestamp("from", from.getTime()).setTimestamp("to", to.getTime()).setInteger("type", Type.GWT.ordinal()).uniqueResult(); ! int avgTime = (o[0] == null ? 0 : ((Number)o[0]).intValue()); ! data[1] += avgTime; ! max[0] = Math.max(max[0], avgTime); ! double maxTime = (o[1] == null ? 0 : ((Number)o[1]).intValue()) / 1000.0; ! data[2] += maxTime; ! max[1] = Math.max(max[1], maxTime); ! int gwtAvgTime = (p[0] == null ? 0 : ((Number)p[0]).intValue()); ! data[3] += gwtAvgTime; ! max[0] = Math.max(max[0], gwtAvgTime); ! double gwtMaxTime = (p[1] == null ? 0 : ((Number)p[1]).intValue()) / 1000.0; ! data[4] += gwtMaxTime; ! max[1] = Math.max(max[1], gwtMaxTime); break; } --- 250,263 ---- "select avg(q.timeSpent), max(q.timeSpent) from QueryLog q where q.timeStamp > :from and q.timeStamp <= :to and type = :type") .setTimestamp("from", from.getTime()).setTimestamp("to", to.getTime()).setInteger("type", Type.GWT.ordinal()).uniqueResult(); ! double avgTime = (o[0] == null ? 0 : ((Number)o[0]).doubleValue()); ! double maxTime = (o[1] == null ? 0 : ((Number)o[1]).doubleValue()) / 1000.0; ! double gwtAvgTime = (p[0] == null ? 0 : ((Number)p[0]).doubleValue()); ! double gwtMaxTime = (p[1] == null ? 0 : ((Number)p[1]).doubleValue()) / 1000.0; ! data[0].add(avgTime); ! data[1].add(maxTime); ! data[2].add(gwtAvgTime); ! data[3].add(gwtMaxTime); ! max[0] = Math.max(max[0], Math.max(avgTime, gwtAvgTime)); ! max[1] = Math.max(max[1], Math.max(maxTime, gwtMaxTime)); break; } *************** *** 254,264 **** break; case THREE_HOUR: ! from.add(Calendar.HOUR, +3); ! to.add(Calendar.HOUR, + 3); case FIFTEEN_MINUTES: from.add(Calendar.MINUTE, +15); to.add(Calendar.MINUTE, + 15); ! } } double range[] = new double[] { 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000, 10000, 20000, 50000, 100000, 1000000, 10000000}; double step[] = new double[] { 1, 1}; --- 268,280 ---- break; case THREE_HOUR: ! from.add(Calendar.HOUR_OF_DAY, +3); ! to.add(Calendar.HOUR_OF_DAY, + 3); case FIFTEEN_MINUTES: from.add(Calendar.MINUTE, +15); to.add(Calendar.MINUTE, + 15); ! } ! index++; } + DecimalFormat df = new DecimalFormat("0.0"); double range[] = new double[] { 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000, 10000, 20000, 50000, 100000, 1000000, 10000000}; double step[] = new double[] { 1, 1}; *************** *** 272,277 **** case USERS: return "http://chart.apis.google.com/chart?" + ! "cht=lc&chd=t:" + data[1] + "|" + data[2] + "|" + data[3] + "|" + data[4] + ! "&chs=400x300&chl=" + data[0] + "&chxt=x,y,y,r,r&chxr=1,0," + df.format(max[0]) + "," + df.format(step[0]) + "|3,0," + df.format(max[1]) + "," + df.format(step[1]) + "&chdl=Distinct+Users|Distinct+HTTP+Sessions|Pages+per+Minute|GWT+Calls+per+Minute&chco=0000FF,00FF00,FF0000,FFA500" + "&chdlp=t&chds=0," + df.format(max[0]) + ",0," + df.format(max[0]) + ",0," + df.format(max[1]) + ",0," + df.format(max[1]) + --- 288,293 ---- case USERS: return "http://chart.apis.google.com/chart?" + ! "cht=lc&chd=e:" + encode(data[0], max[0]) + "," + encode(data[1], max[0]) + "," + encode(data[2], max[1]) + "," + encode(data[3], max[1]) + ! "&chs=400x300&chl=" + axe + "&chxt=x,y,y,r,r&chxr=1,0," + df.format(max[0]) + "," + df.format(step[0]) + "|3,0," + df.format(max[1]) + "," + df.format(step[1]) + "&chdl=Distinct+Users|Distinct+HTTP+Sessions|Pages+per+Minute|GWT+Calls+per+Minute&chco=0000FF,00FF00,FF0000,FFA500" + "&chdlp=t&chds=0," + df.format(max[0]) + ",0," + df.format(max[0]) + ",0," + df.format(max[1]) + ",0," + df.format(max[1]) + *************** *** 279,285 **** "&chxs=1,0000FF|2,00FF00|3,FF0000|4,FFA500"; case TIME: ! return "http://chart.apis.google.com/chart?" + ! "cht=lc&chd=t:" + data[1] + "|" + data[2] + "|" + data[3] + "|" + data[4] + ! "&chs=400x300&chl=" + data[0] + "&chxt=x,y,y,r,r&chxr=1,0," + df.format(max[0]) + "," + df.format(step[0]) + "|3,0," + df.format(max[1]) + "," + df.format(step[1]) + "&chdlp=t&chds=0," + df.format(max[0]) + ",0," + df.format(max[1]) + ",0," + df.format(max[0]) + ",0," + df.format(max[1]) + "&chdl=Average+Time+[ms]|Max+Time+[s]|GWT+Average+Time+[ms]|GWT+Max+Time+[s]&chco=0000FF,FF0000,00FF00,FFA500" + --- 295,301 ---- "&chxs=1,0000FF|2,00FF00|3,FF0000|4,FFA500"; case TIME: ! return "http://chart.apis.google.com/chart?" + ! "cht=lc&chd=e:" + encode(data[0], max[0]) + "," + encode(data[1], max[1]) + "," + encode(data[2], max[0]) + "," + encode(data[3], max[1]) + ! "&chs=400x300&chl=" + axe + "&chxt=x,y,y,r,r&chxr=1,0," + df.format(max[0]) + "," + df.format(step[0]) + "|3,0," + df.format(max[1]) + "," + df.format(step[1]) + "&chdlp=t&chds=0," + df.format(max[0]) + ",0," + df.format(max[1]) + ",0," + df.format(max[0]) + ",0," + df.format(max[1]) + "&chdl=Average+Time+[ms]|Max+Time+[s]|GWT+Average+Time+[ms]|GWT+Max+Time+[s]&chco=0000FF,FF0000,00FF00,FFA500" + |
|
From: Nightly B. <no...@un...> - 2010-11-24 01:08:39
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Nightly B. <no...@un...> - 2010-11-23 23:55:07
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Tomas M. <to...@us...> - 2010-11-23 19:27:08
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/remote In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv26486/JavaSource/org/unitime/timetable/solver/remote Modified Files: Tag: dev_curriculum RemoteSolver.java Log Message: Remote solver server - added ability to override database connection string by the tmtbl.solver.connection.url property Index: RemoteSolver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/remote/RemoteSolver.java,v retrieving revision 1.6.2.4 retrieving revision 1.6.2.5 diff -C2 -d -r1.6.2.4 -r1.6.2.5 *** RemoteSolver.java 9 Nov 2010 12:25:52 -0000 1.6.2.4 --- RemoteSolver.java 23 Nov 2010 19:27:00 -0000 1.6.2.5 *************** *** 365,368 **** --- 365,372 ---- properties.setProperty("connection.url", url); + + if (properties.getProperty("tmtbl.solver.connection.url")!=null) { + properties.setProperty("connection.url", properties.getProperty("tmtbl.solver.connection.url")); + } HibernateUtil.configureHibernate(properties); |
|
From: Tomas M. <to...@us...> - 2010-11-23 19:25:45
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv26453/JavaSource/org/unitime/timetable/solver/studentsct Modified Files: Tag: dev_curriculum StudentSectioningDatabaseSaver.java Log Message: saveStudent -- check for LazyInitializationException Index: StudentSectioningDatabaseSaver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/StudentSectioningDatabaseSaver.java,v retrieving revision 1.5.2.5 retrieving revision 1.5.2.6 diff -C2 -d -r1.5.2.5 -r1.5.2.6 *** StudentSectioningDatabaseSaver.java 9 Nov 2010 12:25:53 -0000 1.5.2.5 --- StudentSectioningDatabaseSaver.java 23 Nov 2010 19:25:37 -0000 1.5.2.6 *************** *** 28,31 **** --- 28,32 ---- import org.apache.commons.logging.LogFactory; import org.hibernate.FlushMode; + import org.hibernate.LazyInitializationException; import org.hibernate.Transaction; import org.unitime.timetable.model.Class_; *************** *** 133,141 **** return; } ! for (Iterator i=s.getClassEnrollments().iterator();i.hasNext();) { StudentClassEnrollment sce = (StudentClassEnrollment)i.next(); hibSession.delete(sce); i.remove(); } ! for (Iterator i=s.getWaitlists().iterator();i.hasNext();) { WaitList wl = (WaitList)i.next(); hibSession.delete(wl); i.remove(); --- 134,163 ---- return; } ! Iterator i = null; ! try { ! i = s.getClassEnrollments().iterator(); ! } catch (LazyInitializationException e) { ! s = StudentDAO.getInstance().get(student.getId(), hibSession); ! if (s == null) { ! iProgress.warn("Student "+student.getId()+" not found."); ! return; ! } ! i = s.getClassEnrollments().iterator(); ! } ! while (i.hasNext()) { StudentClassEnrollment sce = (StudentClassEnrollment)i.next(); hibSession.delete(sce); i.remove(); } ! try { ! i = s.getWaitlists().iterator(); ! } catch (LazyInitializationException e) { ! s = StudentDAO.getInstance().get(student.getId(), hibSession); ! if (s == null) { ! iProgress.warn("Student "+student.getId()+" not found."); ! return; ! } ! i = s.getWaitlists().iterator(); ! } ! while (i.hasNext()) { WaitList wl = (WaitList)i.next(); hibSession.delete(wl); i.remove(); *************** *** 160,165 **** if (cr==null) continue; cr.getClassEnrollments().clear(); ! for (Iterator i=enrollment.getAssignments().iterator();i.hasNext();) { ! Section section = (Section)i.next(); StudentClassEnrollment sce = new StudentClassEnrollment(); sce.setStudent(s); --- 182,187 ---- if (cr==null) continue; cr.getClassEnrollments().clear(); ! for (Iterator j=enrollment.getAssignments().iterator();j.hasNext();) { ! Section section = (Section)j.next(); StudentClassEnrollment sce = new StudentClassEnrollment(); sce.setStudent(s); |
|
From: Tomas M. <to...@us...> - 2010-11-23 19:24:04
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25796/JavaSource/org/unitime/timetable/solver/studentsct Modified Files: StudentSectioningDatabaseSaver.java Log Message: saveStudent -- check for LazyInitializationException Index: StudentSectioningDatabaseSaver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/StudentSectioningDatabaseSaver.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** StudentSectioningDatabaseSaver.java 4 May 2010 16:31:13 -0000 1.5 --- StudentSectioningDatabaseSaver.java 23 Nov 2010 19:23:56 -0000 1.6 *************** *** 29,32 **** --- 29,33 ---- import org.apache.commons.logging.LogFactory; import org.hibernate.FlushMode; + import org.hibernate.LazyInitializationException; import org.hibernate.Transaction; import org.unitime.timetable.model.Class_; *************** *** 130,138 **** return; } ! for (Iterator i=s.getClassEnrollments().iterator();i.hasNext();) { StudentClassEnrollment sce = (StudentClassEnrollment)i.next(); hibSession.delete(sce); i.remove(); } ! for (Iterator i=s.getWaitlists().iterator();i.hasNext();) { WaitList wl = (WaitList)i.next(); hibSession.delete(wl); i.remove(); --- 131,160 ---- return; } ! Iterator i = null; ! try { ! i = s.getClassEnrollments().iterator(); ! } catch (LazyInitializationException e) { ! s = StudentDAO.getInstance().get(student.getId(), hibSession); ! if (s == null) { ! iProgress.warn("Student "+student.getId()+" not found."); ! return; ! } ! i = s.getClassEnrollments().iterator(); ! } ! while (i.hasNext()) { StudentClassEnrollment sce = (StudentClassEnrollment)i.next(); hibSession.delete(sce); i.remove(); } ! try { ! i = s.getWaitlists().iterator(); ! } catch (LazyInitializationException e) { ! s = StudentDAO.getInstance().get(student.getId(), hibSession); ! if (s == null) { ! iProgress.warn("Student "+student.getId()+" not found."); ! return; ! } ! i = s.getWaitlists().iterator(); ! } ! while (i.hasNext()) { WaitList wl = (WaitList)i.next(); hibSession.delete(wl); i.remove(); *************** *** 155,160 **** org.unitime.timetable.model.CourseRequest cr = iRequests.get(request.getId()+":"+enrollment.getOffering().getId()); if (cr==null) continue; ! for (Iterator i=enrollment.getAssignments().iterator();i.hasNext();) { ! Section section = (Section)i.next(); StudentClassEnrollment sce = new StudentClassEnrollment(); sce.setStudent(s); --- 177,182 ---- org.unitime.timetable.model.CourseRequest cr = iRequests.get(request.getId()+":"+enrollment.getOffering().getId()); if (cr==null) continue; ! for (Iterator j=enrollment.getAssignments().iterator();j.hasNext();) { ! Section section = (Section)j.next(); StudentClassEnrollment sce = new StudentClassEnrollment(); sce.setStudent(s); |
|
From: Tomas M. <to...@us...> - 2010-11-23 19:23:39
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/remote In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25781/JavaSource/org/unitime/timetable/solver/remote Modified Files: RemoteSolver.java Log Message: Remote solver server - added ability to override database connection string by the tmtbl.solver.connection.url property Index: RemoteSolver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/remote/RemoteSolver.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RemoteSolver.java 7 Jul 2008 21:13:41 -0000 1.6 --- RemoteSolver.java 23 Nov 2010 19:23:31 -0000 1.7 *************** *** 357,360 **** --- 357,364 ---- properties.setProperty("connection.url", url); + + if (properties.getProperty("tmtbl.solver.connection.url")!=null) { + properties.setProperty("connection.url", properties.getProperty("tmtbl.solver.connection.url")); + } HibernateUtil.configureHibernate(properties); |
|
From: Tomas M. <to...@us...> - 2010-11-23 19:12:51
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24136/JavaSource/org/unitime/timetable/gwt/client/sectioning Modified Files: Tag: dev_curriculum CourseSelectionBox.java Log Message: delay updating of the courses by a short period (so that the query is not sent after every keystroke) Index: CourseSelectionBox.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/Attic/CourseSelectionBox.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** CourseSelectionBox.java 9 Nov 2010 12:25:52 -0000 1.1.2.4 --- CourseSelectionBox.java 23 Nov 2010 19:12:43 -0000 1.1.2.5 *************** *** 64,67 **** --- 64,68 ---- import com.google.gwt.event.logical.shared.SelectionEvent; import com.google.gwt.event.logical.shared.SelectionHandler; + import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Composite; *************** *** 420,426 **** iDialog.setWidget(iDialogPanel); iFilter.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { ! updateCourses(); if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER || event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { --- 421,434 ---- iDialog.setWidget(iDialogPanel); + final Timer finderTimer = new Timer() { + @Override + public void run() { + updateCourses(); + } + }; + iFilter.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { ! finderTimer.schedule(250); if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER || event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { |
|
From: Tomas M. <to...@us...> - 2010-11-23 19:11:54
|
Update of /cvsroot/unitime/UniTime/JavaSource In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24093/JavaSource Modified Files: Tag: dev_curriculum application.properties Log Message: Load the student sectioning servlet on startup. Index: application.properties =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/application.properties,v retrieving revision 1.33.2.18 retrieving revision 1.33.2.19 diff -C2 -d -r1.33.2.18 -r1.33.2.19 *** application.properties 23 Nov 2010 15:20:47 -0000 1.33.2.18 --- application.properties 23 Nov 2010 19:11:46 -0000 1.33.2.19 *************** *** 386,390 **** # Value true means that the application server will not wait for this service to load all the data. # Only set to true when the sectioning service loads on startup (see web.xml, load-on-startup attribute of servlet named sectioningServiceServlet) ! unitime.enrollment.autostart=false # Solution passivation time --- 386,390 ---- # Value true means that the application server will not wait for this service to load all the data. # Only set to true when the sectioning service loads on startup (see web.xml, load-on-startup attribute of servlet named sectioningServiceServlet) ! unitime.enrollment.autostart=true # Solution passivation time |
|
From: Tomas M. <to...@us...> - 2010-11-23 19:11:53
|
Update of /cvsroot/unitime/UniTime/WebContent/WEB-INF In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24093/WebContent/WEB-INF Modified Files: Tag: dev_curriculum web.xml Log Message: Load the student sectioning servlet on startup. Index: web.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/web.xml,v retrieving revision 1.5.2.11 retrieving revision 1.5.2.12 diff -C2 -d -r1.5.2.11 -r1.5.2.12 *** web.xml 9 Nov 2010 12:25:52 -0000 1.5.2.11 --- web.xml 23 Nov 2010 19:11:45 -0000 1.5.2.12 *************** *** 29,33 **** <description> ! University Course Timetabling & Student Sectioning Application </description> --- 29,33 ---- <description> ! University Timetabling Application </description> *************** *** 83,87 **** <servlet-name>sectioningServiceServlet</servlet-name> <servlet-class>org.unitime.timetable.gwt.server.SectioningServlet</servlet-class> ! <!-- <load-on-startup>3</load-on-startup> --> </servlet> --- 83,87 ---- <servlet-name>sectioningServiceServlet</servlet-name> <servlet-class>org.unitime.timetable.gwt.server.SectioningServlet</servlet-class> ! <load-on-startup>3</load-on-startup> </servlet> |
|
From: Tomas M. <to...@us...> - 2010-11-23 19:11:23
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24060/JavaSource/org/unitime/timetable/model Modified Files: Tag: dev_curriculum QueryLog.java Log Message: Page Statistics page - fixed ordering of the page statistics table - the second axe of the usage graph did have the labels wrong in some cases Index: QueryLog.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model/Attic/QueryLog.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** QueryLog.java 9 Nov 2010 12:25:47 -0000 1.1.2.4 --- QueryLog.java 23 Nov 2010 19:11:15 -0000 1.1.2.5 *************** *** 117,124 **** new Comparable[] { (String)o[0], over10ms, over100ms, overMinute, - ((Number)o[1]).intValue(), ((Number)o[2]).doubleValue(), ((Number)o[3]).doubleValue(), --- 117,124 ---- new Comparable[] { (String)o[0], + ((Number)o[1]).intValue(), over10ms, over100ms, overMinute, ((Number)o[2]).doubleValue(), ((Number)o[3]).doubleValue(), *************** *** 264,268 **** double step[] = new double[] { 1, 1}; for (int i = 0; i < max.length; i++) { ! if (max[i] <= 1.0) { max[i] = 1.0; step[i] = 0.1; break; } int x = 0; while (max[i] / range[x] > 16) x++; --- 264,268 ---- double step[] = new double[] { 1, 1}; for (int i = 0; i < max.length; i++) { ! if (max[i] <= 1.0) { max[i] = 1.0; step[i] = 0.1; continue; } int x = 0; while (max[i] / range[x] > 16) x++; |
|
From: Tomas M. <to...@us...> - 2010-11-23 18:57:52
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21788/JavaSource/org/unitime/timetable/gwt/server Modified Files: Tag: dev_curriculum SectioningServer.java SectioningServlet.java Log Message: Student Scheduling Assistant - changed synchronizations to use reentrant read / write locks - this increase throughput of read-only operations Index: SectioningServlet.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server/Attic/SectioningServlet.java,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -C2 -d -r1.1.2.12 -r1.1.2.13 *** SectioningServlet.java 15 Nov 2010 18:42:16 -0000 1.1.2.12 --- SectioningServlet.java 23 Nov 2010 18:57:43 -0000 1.1.2.13 *************** *** 1130,1134 **** } ! public synchronized ArrayList<Long> enroll(CourseRequestInterface request, ArrayList<ClassAssignmentInterface.ClassAssignment> currentAssignment) throws SectioningException { UniTimePrincipal principal = (UniTimePrincipal)getThreadLocalRequest().getSession().getAttribute("user"); if (principal == null) throw new SectioningException(SectioningExceptionType.ENROLL_NOT_AUTHENTICATED); --- 1130,1134 ---- } ! public ArrayList<Long> enroll(CourseRequestInterface request, ArrayList<ClassAssignmentInterface.ClassAssignment> currentAssignment) throws SectioningException { UniTimePrincipal principal = (UniTimePrincipal)getThreadLocalRequest().getSession().getAttribute("user"); if (principal == null) throw new SectioningException(SectioningExceptionType.ENROLL_NOT_AUTHENTICATED); *************** *** 1138,1182 **** if (!"true".equals(ApplicationProperties.getProperty("unitime.enrollment.enabled","true"))) throw new SectioningException(SectioningExceptionType.FEATURE_NOT_SUPPORTED); ! org.hibernate.Session hibSession = StudentDAO.getInstance().getSession(); try { ! Student student = StudentDAO.getInstance().get(studentId, hibSession); ! if (student == null) throw new SectioningException(SectioningExceptionType.BAD_STUDENT_ID); ! Hashtable<Long, Class_> classes = new Hashtable<Long, Class_>(); ! for (ClassAssignmentInterface.ClassAssignment ca: currentAssignment) { ! if (ca.isFreeTime() || ca.getClassId() == null) continue; ! Class_ clazz = Class_DAO.getInstance().get(ca.getClassId(), hibSession); ! if (!isAvailable(hibSession, student, clazz, server.getSection(ca.getClassId()))) ! throw new SectioningException(SectioningExceptionType.ENROLL_NOT_AVAILABLE, ca.getSubject() + " " + ca.getCourseNbr() + " " + ca.getSubpart() + " " + ca.getSection()); ! classes.put(clazz.getUniqueId(), clazz); ! } ! Hashtable<Long, CourseRequest> req = saveRequest(hibSession, student, request, false); ! Date ts = new Date(); ! for (ClassAssignmentInterface.ClassAssignment ca: currentAssignment) { ! if (ca.isFreeTime() || ca.getClassId() == null) continue; ! Class_ clazz = classes.get(ca.getClassId()); ! CourseRequest cr = req.get(ca.getCourseId()); ! if (clazz == null || cr == null) continue; ! StudentClassEnrollment enrl = new StudentClassEnrollment(); ! enrl.setClazz(clazz); ! clazz.getStudentEnrollments().add(enrl); ! enrl.setCourseOffering(cr.getCourseOffering()); ! enrl.setCourseRequest(cr); ! enrl.setTimestamp(ts); ! enrl.setStudent(student); ! student.getClassEnrollments().add(enrl); ! } ! hibSession.save(student); ! hibSession.flush(); ! hibSession.refresh(student); ! server.reloadStudent(student); ! ArrayList<Long> ret = new ArrayList<Long>(); ! ret.addAll(server.getSavedClasses(student.getUniqueId())); ! return ret; ! } catch (Exception e) { ! if (e instanceof SectioningException) throw (SectioningException)e; ! sLog.error(e.getMessage(), e); ! throw new SectioningException(SectioningExceptionType.UNKNOWN, e); } finally { ! hibSession.close(); } } --- 1138,1187 ---- if (!"true".equals(ApplicationProperties.getProperty("unitime.enrollment.enabled","true"))) throw new SectioningException(SectioningExceptionType.FEATURE_NOT_SUPPORTED); ! server.getLock().writeLock().lock(); try { ! org.hibernate.Session hibSession = StudentDAO.getInstance().getSession(); ! try { ! Student student = StudentDAO.getInstance().get(studentId, hibSession); ! if (student == null) throw new SectioningException(SectioningExceptionType.BAD_STUDENT_ID); ! Hashtable<Long, Class_> classes = new Hashtable<Long, Class_>(); ! for (ClassAssignmentInterface.ClassAssignment ca: currentAssignment) { ! if (ca.isFreeTime() || ca.getClassId() == null) continue; ! Class_ clazz = Class_DAO.getInstance().get(ca.getClassId(), hibSession); ! if (!isAvailable(hibSession, student, clazz, server.getSection(ca.getClassId()))) ! throw new SectioningException(SectioningExceptionType.ENROLL_NOT_AVAILABLE, ca.getSubject() + " " + ca.getCourseNbr() + " " + ca.getSubpart() + " " + ca.getSection()); ! classes.put(clazz.getUniqueId(), clazz); ! } ! Hashtable<Long, CourseRequest> req = saveRequest(hibSession, student, request, false); ! Date ts = new Date(); ! for (ClassAssignmentInterface.ClassAssignment ca: currentAssignment) { ! if (ca.isFreeTime() || ca.getClassId() == null) continue; ! Class_ clazz = classes.get(ca.getClassId()); ! CourseRequest cr = req.get(ca.getCourseId()); ! if (clazz == null || cr == null) continue; ! StudentClassEnrollment enrl = new StudentClassEnrollment(); ! enrl.setClazz(clazz); ! clazz.getStudentEnrollments().add(enrl); ! enrl.setCourseOffering(cr.getCourseOffering()); ! enrl.setCourseRequest(cr); ! enrl.setTimestamp(ts); ! enrl.setStudent(student); ! student.getClassEnrollments().add(enrl); ! } ! hibSession.save(student); ! hibSession.flush(); ! hibSession.refresh(student); ! server.reloadStudent(student); ! ArrayList<Long> ret = new ArrayList<Long>(); ! ret.addAll(server.getSavedClasses(student.getUniqueId())); ! return ret; ! } catch (Exception e) { ! if (e instanceof SectioningException) throw (SectioningException)e; ! sLog.error(e.getMessage(), e); ! throw new SectioningException(SectioningExceptionType.UNKNOWN, e); ! } finally { ! hibSession.close(); ! } } finally { ! server.getLock().writeLock().unlock(); } } Index: SectioningServer.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server/Attic/SectioningServer.java,v retrieving revision 1.1.2.17 retrieving revision 1.1.2.18 diff -C2 -d -r1.1.2.17 -r1.1.2.18 *** SectioningServer.java 15 Nov 2010 15:15:43 -0000 1.1.2.17 --- SectioningServer.java 23 Nov 2010 18:57:43 -0000 1.1.2.18 *************** *** 32,35 **** --- 32,37 ---- import java.util.TreeSet; import java.util.Vector; + import java.util.concurrent.locks.ReadWriteLock; + import java.util.concurrent.locks.ReentrantReadWriteLock; import net.sf.cpsolver.coursett.model.Placement; *************** *** 100,103 **** --- 102,107 ---- private CourseLoader iLoader = null; private SectioningServerUpdater iUpdater = null; + private ReentrantReadWriteLock iLock = new ReentrantReadWriteLock(); + private static ReentrantReadWriteLock sGlobalLock = new ReentrantReadWriteLock(); private Hashtable<Long, int[]> iLastSectionLimit = new Hashtable<Long, int[]>(); *************** *** 195,199 **** public CourseInfo getCourseInfo(String course) { ! synchronized (iCourseTable) { if (course.indexOf('-') >= 0) { String courseName = course.substring(0, course.indexOf('-')).trim(); --- 199,204 ---- public CourseInfo getCourseInfo(String course) { ! iLock.readLock().lock(); ! try { if (course.indexOf('-') >= 0) { String courseName = course.substring(0, course.indexOf('-')).trim(); *************** *** 209,224 **** return null; } } } public CourseInfo getCourseInfo(Long courseId) { ! synchronized (iCourseTable) { return iCourseForId.get(courseId); } } public Student getStudent(Long studentId) { ! synchronized (iCourseTable) { return iStudentTable.get(studentId); } } --- 214,237 ---- return null; } + } finally { + iLock.readLock().unlock(); } } public CourseInfo getCourseInfo(Long courseId) { ! iLock.readLock().lock(); ! try { return iCourseForId.get(courseId); + } finally { + iLock.readLock().unlock(); } } public Student getStudent(Long studentId) { ! iLock.readLock().lock(); ! try { return iStudentTable.get(studentId); + } finally { + iLock.readLock().unlock(); } } *************** *** 226,230 **** @SuppressWarnings("unchecked") public void reloadStudent(org.unitime.timetable.model.Student s) { ! synchronized (iCourseTable) { Student student = iStudentTable.get(s.getUniqueId()); if (student != null) { --- 239,244 ---- @SuppressWarnings("unchecked") public void reloadStudent(org.unitime.timetable.model.Student s) { ! iLock.writeLock().lock(); ! try { Student student = iStudentTable.get(s.getUniqueId()); if (student != null) { *************** *** 238,247 **** iModel.addStudent(student); iLoader.assignStudent(student, s, false); } } public Course getCourse(Long courseId) { ! synchronized (iCourseTable) { return iCourseTable.get(courseId); } } --- 252,266 ---- iModel.addStudent(student); iLoader.assignStudent(student, s, false); + } finally { + iLock.writeLock().unlock(); } } public Course getCourse(Long courseId) { ! iLock.readLock().lock(); ! try { return iCourseTable.get(courseId); + } finally { + iLock.readLock().unlock(); } } *************** *** 252,257 **** public Collection<CourseInfo> findCourses(String query, Integer limit) { ! synchronized (iCourseTable) { ! List<CourseInfo> ret = new ArrayList<CourseInfo>(); String queryInLowerCase = query.toLowerCase(); for (CourseInfo c : iCourses) { --- 271,277 ---- public Collection<CourseInfo> findCourses(String query, Integer limit) { ! iLock.readLock().lock(); ! try { ! List<CourseInfo> ret = new ArrayList<CourseInfo>(limit == null ? 100 : limit); String queryInLowerCase = query.toLowerCase(); for (CourseInfo c : iCourses) { *************** *** 259,291 **** if (limit != null && ret.size() == limit) return ret; } ! for (CourseInfo c : iCourses) { ! if (c.matchTitle(queryInLowerCase)) ret.add(c); ! if (limit != null && ret.size() == limit) return ret; } return ret; } } public static void createInstance(Long academicSessionId) { ! synchronized (sInstances) { SectioningServer s = new SectioningServer(academicSessionId); sInstances.put(academicSessionId, s); if (SectioningServer.sCustomSectionNames != null) SectioningServer.sCustomSectionNames.update(s.getAcademicSession()); } } public static SectioningServer getInstance(final Long academicSessionId) throws SectioningException { ! synchronized (sInstances) { return sInstances.get(academicSessionId); } } public static TreeSet<AcademicSessionInfo> getAcademicSessions() { ! synchronized (sInstances) { TreeSet<AcademicSessionInfo> ret = new TreeSet<AcademicSessionInfo>(); for (SectioningServer s : sInstances.values()) ret.add(s.getAcademicSession()); return ret; } } --- 279,324 ---- if (limit != null && ret.size() == limit) return ret; } ! if (queryInLowerCase.length() > 2) { ! for (CourseInfo c : iCourses) { ! if (c.matchTitle(queryInLowerCase)) ret.add(c); ! if (limit != null && ret.size() == limit) return ret; ! } } return ret; + } finally { + iLock.readLock().unlock(); } } public static void createInstance(Long academicSessionId) { ! sGlobalLock.writeLock().lock(); ! try { SectioningServer s = new SectioningServer(academicSessionId); sInstances.put(academicSessionId, s); if (SectioningServer.sCustomSectionNames != null) SectioningServer.sCustomSectionNames.update(s.getAcademicSession()); + } finally { + sGlobalLock.writeLock().unlock(); } } public static SectioningServer getInstance(final Long academicSessionId) throws SectioningException { ! sGlobalLock.readLock().lock(); ! try { return sInstances.get(academicSessionId); + } finally { + sGlobalLock.readLock().unlock(); } } public static TreeSet<AcademicSessionInfo> getAcademicSessions() { ! sGlobalLock.readLock().lock(); ! try { TreeSet<AcademicSessionInfo> ret = new TreeSet<AcademicSessionInfo>(); for (SectioningServer s : sInstances.values()) ret.add(s.getAcademicSession()); return ret; + } finally { + sGlobalLock.readLock().unlock(); } } *************** *** 390,394 **** private void addRequest(StudentSectioningModel model, Student student, CourseRequestInterface.Request request, boolean alternative, boolean updateFromCache) { ! synchronized (iCourseTable) { if (request.hasRequestedFreeTime()) { for (CourseRequestInterface.FreeTime freeTime: request.getRequestedFreeTime()) { --- 423,428 ---- private void addRequest(StudentSectioningModel model, Student student, CourseRequestInterface.Request request, boolean alternative, boolean updateFromCache) { ! iLock.readLock().lock(); ! try { if (request.hasRequestedFreeTime()) { for (CourseRequestInterface.FreeTime freeTime: request.getRequestedFreeTime()) { *************** *** 400,405 **** TimeLocation freeTimeLoc = new TimeLocation(dayCode, freeTime.getStart(), freeTime.getLength(), 0, 0, -1l, "", iAcademicSession.getFreeTimePattern(), 0); ! FreeTimeRequest r = new FreeTimeRequest(student.getRequests().size() + 1, student.getRequests().size(), alternative, student, freeTimeLoc); ! sLog.info(r); } } else if (request.hasRequestedCourse()) { --- 434,438 ---- TimeLocation freeTimeLoc = new TimeLocation(dayCode, freeTime.getStart(), freeTime.getLength(), 0, 0, -1l, "", iAcademicSession.getFreeTimePattern(), 0); ! new FreeTimeRequest(student.getRequests().size() + 1, student.getRequests().size(), alternative, student, freeTimeLoc); } } else if (request.hasRequestedCourse()) { *************** *** 424,431 **** } } ! CourseRequest r = new CourseRequest(student.getRequests().size() + 1, student.getRequests().size(), alternative, student, cr, false); ! sLog.info(r); } } } } --- 457,465 ---- } } ! new CourseRequest(student.getRequests().size() + 1, student.getRequests().size(), alternative, student, cr, false); } } + } finally { + iLock.readLock().unlock(); } } *************** *** 454,458 **** @SuppressWarnings("unchecked") public Set<Long> getSavedClasses(Long studentId) { ! synchronized (iCourseTable) { if (studentId == null) return null; Student student = (Student)iStudentTable.get(studentId); --- 488,493 ---- @SuppressWarnings("unchecked") public Set<Long> getSavedClasses(Long studentId) { ! iLock.readLock().lock(); ! try { if (studentId == null) return null; Student student = (Student)iStudentTable.get(studentId); *************** *** 466,469 **** --- 501,506 ---- } return ret; + } finally { + iLock.readLock().unlock(); } } *************** *** 813,817 **** @SuppressWarnings("unchecked") public List<Section> getSections(CourseInfo courseInfo) throws SectioningException { ! synchronized (iCourseTable) { ArrayList<Section> sections = new ArrayList<Section>(); Course course = iCourseTable.get(courseInfo.getUniqueId()); --- 850,855 ---- @SuppressWarnings("unchecked") public List<Section> getSections(CourseInfo courseInfo) throws SectioningException { ! iLock.readLock().lock(); ! try { ArrayList<Section> sections = new ArrayList<Section>(); Course course = iCourseTable.get(courseInfo.getUniqueId()); *************** *** 828,831 **** --- 866,871 ---- } return sections; + } finally { + iLock.readLock().unlock(); } } *************** *** 833,837 **** @SuppressWarnings("unchecked") public List<Section> getSections(String courseName) throws SectioningException { ! synchronized (iCourseTable) { ArrayList<Section> sections = new ArrayList<Section>(); Course course = iCourseTable.get(courseName); --- 873,878 ---- @SuppressWarnings("unchecked") public List<Section> getSections(String courseName) throws SectioningException { ! iLock.readLock().lock(); ! try { ArrayList<Section> sections = new ArrayList<Section>(); Course course = iCourseTable.get(courseName); *************** *** 848,851 **** --- 889,894 ---- } return sections; + } finally { + iLock.readLock().unlock(); } } *************** *** 965,970 **** public Section getSection(Long classId) { ! synchronized (iCourseTable) { return iClassTable.get(classId); } } --- 1008,1016 ---- public Section getSection(Long classId) { ! iLock.readLock().lock(); ! try { return iClassTable.get(classId); + } finally { + iLock.readLock().unlock(); } } *************** *** 973,977 **** if (!"true".equals(ApplicationProperties.getProperty("unitime.enrollment.load", "true"))) return; sLog.info(studentIds.size() + " student schedules changed."); ! synchronized (iCourseTable) { org.hibernate.Session hibSession = SessionDAO.getInstance().createNewSession(); try { --- 1019,1024 ---- if (!"true".equals(ApplicationProperties.getProperty("unitime.enrollment.load", "true"))) return; sLog.info(studentIds.size() + " student schedules changed."); ! iLock.writeLock().lock(); ! try { org.hibernate.Session hibSession = SessionDAO.getInstance().createNewSession(); try { *************** *** 999,1002 **** --- 1046,1051 ---- hibSession.close(); } + } finally { + iLock.writeLock().unlock(); } } *************** *** 1004,1008 **** protected void classChanged(Collection<Long> classIds) { sLog.info(classIds.size() + " class assignments changed."); ! synchronized (iCourseTable) { org.hibernate.Session hibSession = SessionDAO.getInstance().createNewSession(); try { --- 1053,1058 ---- protected void classChanged(Collection<Long> classIds) { sLog.info(classIds.size() + " class assignments changed."); ! iLock.writeLock().lock(); ! try { org.hibernate.Session hibSession = SessionDAO.getInstance().createNewSession(); try { *************** *** 1074,1077 **** --- 1124,1129 ---- hibSession.close(); } + } finally { + iLock.writeLock().unlock(); } } *************** *** 1079,1083 **** protected void allStudentsChanged() { if (!"true".equals(ApplicationProperties.getProperty("unitime.enrollment.load", "true"))) return; ! synchronized (iCourseTable) { org.hibernate.Session hibSession = SessionDAO.getInstance().createNewSession(); try { --- 1131,1136 ---- protected void allStudentsChanged() { if (!"true".equals(ApplicationProperties.getProperty("unitime.enrollment.load", "true"))) return; ! iLock.writeLock().lock(); ! try { org.hibernate.Session hibSession = SessionDAO.getInstance().createNewSession(); try { *************** *** 1106,1125 **** hibSession.close(); } } } public void unload() { ! synchronized (sInstances) { iUpdater.stopUpdating(); sInstances.remove(getAcademicSessionId()); } } public static void unloadAll() { ! synchronized (sInstances) { for (SectioningServer s: sInstances.values()) s.iUpdater.stopUpdating(); sInstances.clear(); } } } --- 1159,1190 ---- hibSession.close(); } + } finally { + iLock.writeLock().unlock(); } } public void unload() { ! sGlobalLock.writeLock().lock(); ! try { iUpdater.stopUpdating(); sInstances.remove(getAcademicSessionId()); + } finally { + sGlobalLock.writeLock().unlock(); } } public static void unloadAll() { ! sGlobalLock.writeLock().lock(); ! try { for (SectioningServer s: sInstances.values()) s.iUpdater.stopUpdating(); sInstances.clear(); + } finally { + sGlobalLock.writeLock().unlock(); } } + + public ReadWriteLock getLock() { + return iLock; + } } |
|
From: Tomas M. <to...@us...> - 2010-11-23 18:56:02
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21563/JavaSource/org/unitime/timetable/gwt/server Modified Files: Tag: dev_curriculum CourseInfo.java Log Message: Student Sectioning - increase speed of findCourses method (called to update the list of courses matching the given query) Index: CourseInfo.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server/Attic/CourseInfo.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** CourseInfo.java 9 Nov 2010 12:25:51 -0000 1.1.2.2 --- CourseInfo.java 23 Nov 2010 18:55:54 -0000 1.1.2.3 *************** *** 35,38 **** --- 35,40 ---- private String iCourseNbr; private String iTitle; + private String iCourseNameLowerCase; + private String iTitleLowerCase; private String iNote; private String iDetails = null; *************** *** 49,52 **** --- 51,56 ---- if (course.getInstructionalOffering().getConsentType() != null) iConsent = course.getInstructionalOffering().getConsentType().getLabel(); + iCourseNameLowerCase = (iSubjectArea + " " + iCourseNbr).toLowerCase(); + iTitleLowerCase = (iTitle == null ? null : iTitle.toLowerCase()); } *************** *** 54,57 **** --- 58,62 ---- this(course); iCourseNbr = courseNbr; + iCourseNameLowerCase = (iSubjectArea + " " + iCourseNbr).toLowerCase(); } *************** *** 77,95 **** public boolean matchCourseName(String queryInLowerCase) { ! if ((getSubjectArea()+" "+getCourseNbr()).toLowerCase().startsWith(queryInLowerCase)) return true; ! if ((getSubjectArea()+" "+getCourseNbr()+" "+getTitle()).toLowerCase().startsWith(queryInLowerCase)) return true; ! if ((getSubjectArea()+" "+getCourseNbr()+" - "+getTitle()).toLowerCase().startsWith(queryInLowerCase)) return true; ! /* ! if (queryInLowerCase.indexOf('-') > 0) { ! String courseName = queryInLowerCase.substring(0, queryInLowerCase.indexOf('-') - 1).trim(); ! if ((getSubjectArea()+" "+getCourseNbr()).toLowerCase().equals(queryInLowerCase)) return true; ! } ! */ return false; } public boolean matchTitle(String queryInLowerCase) { ! if (matchCourseName(queryInLowerCase)) return false; ! if (queryInLowerCase.length()>2 && getTitle()!=null && getTitle().toLowerCase().contains(queryInLowerCase)) return true; return false; } --- 82,95 ---- public boolean matchCourseName(String queryInLowerCase) { ! if (iCourseNameLowerCase.startsWith(queryInLowerCase)) return true; ! if (iTitleLowerCase == null) return false; ! if ((iCourseNameLowerCase + " " + iTitleLowerCase).startsWith(queryInLowerCase)) return true; ! if ((iCourseNameLowerCase + " - " + iTitleLowerCase).toLowerCase().startsWith(queryInLowerCase)) return true; return false; } public boolean matchTitle(String queryInLowerCase) { ! if (iTitleLowerCase == null) return false; ! if (!matchCourseName(queryInLowerCase) && iTitleLowerCase.contains(queryInLowerCase)) return true; return false; } |
|
From: Tomas M. <to...@us...> - 2010-11-23 18:54:35
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/filter In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20989/JavaSource/org/unitime/timetable/filter Modified Files: Tag: dev_curriculum QueryLogFilter.java Log Message: Query log - GWT requests: include GWT call in the uri (class#method) Index: QueryLogFilter.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/filter/Attic/QueryLogFilter.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** QueryLogFilter.java 15 Nov 2010 16:37:39 -0000 1.1.2.5 --- QueryLogFilter.java 23 Nov 2010 18:54:25 -0000 1.1.2.6 *************** *** 20,27 **** --- 20,35 ---- package org.unitime.timetable.filter; + import java.io.BufferedReader; + import java.io.ByteArrayOutputStream; import java.io.IOException; + import java.io.InputStream; + import java.io.UnsupportedEncodingException; + import java.security.Principal; + import java.util.ArrayList; import java.util.Date; import java.util.Enumeration; import java.util.List; + import java.util.Locale; + import java.util.Map; import java.util.Vector; *************** *** 29,36 **** --- 37,48 ---- import javax.servlet.FilterChain; import javax.servlet.FilterConfig; + import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; + import javax.servlet.ServletInputStream; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; + import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; + import javax.servlet.http.HttpSession; import net.sf.cpsolver.ifs.util.JProf; *************** *** 70,73 **** --- 82,91 ---- } catch (IllegalStateException e) {} + if (request instanceof HttpServletRequest) { + HttpServletRequest r = (HttpServletRequest)request; + if (r.getRequestURI().endsWith(".gwt")) + request = new HttpServletRequestWrapper(r); + } + long t0 = JProf.currentTimeMillis(); Throwable exception = null; *************** *** 105,117 **** } } catch (IllegalStateException e) {} ! String params = ""; ! for (Enumeration e=r.getParameterNames(); e.hasMoreElements();) { ! String n = (String)e.nextElement(); ! if ("password".equals(n)) continue; ! if (!params.isEmpty()) params += "&"; ! params += n + "=" + r.getParameter(n); } - if (!params.isEmpty()) - q.setQuery(params); if (exception != null) { Throwable t = exception; --- 123,146 ---- } } catch (IllegalStateException e) {} ! if (r instanceof HttpServletRequestWrapper && ((HttpServletRequestWrapper)r).getBody() != null) { ! try { ! String body = new String(((HttpServletRequestWrapper)r).getBody()); ! q.setQuery(body); ! String args[] = body.split("\\|"); ! q.setUri(q.getUri() + ": " + args[5].substring(args[5].lastIndexOf('.') + 1) + "#" + args[6]); ! } catch (Exception e) { ! sLog.warn("Error parsing GWT request body: " + e.getMessage()); ! } ! } else { ! String params = ""; ! for (Enumeration e=r.getParameterNames(); e.hasMoreElements();) { ! String n = (String)e.nextElement(); ! if ("password".equals(n)) continue; ! if (!params.isEmpty()) params += "&"; ! params += n + "=" + r.getParameter(n); ! } ! if (!params.isEmpty()) ! q.setQuery(params); } if (exception != null) { Throwable t = exception; *************** *** 162,177 **** } catch (InterruptedException e) { } synchronized (iQueries) { if (!iQueries.isEmpty()) { ! sLog.debug("Persisting " + iQueries.size() + " log entries..."); ! Session hibSession = QueryLogDAO.getInstance().createNewSession(); ! try { ! for (QueryLog q: iQueries) ! hibSession.save(q); ! hibSession.flush(); ! } finally { ! hibSession.close(); ! iQueries.clear(); ! } } } --- 191,210 ---- } catch (InterruptedException e) { } + List<QueryLog> queriesToSave = null; synchronized (iQueries) { if (!iQueries.isEmpty()) { ! queriesToSave = new ArrayList<QueryLog>(iQueries); ! iQueries.clear(); ! } ! } ! if (queriesToSave != null) { ! sLog.debug("Persisting " + queriesToSave.size() + " log entries..."); ! Session hibSession = QueryLogDAO.getInstance().createNewSession(); ! try { ! for (QueryLog q: queriesToSave) ! hibSession.save(q); ! hibSession.flush(); ! } finally { ! hibSession.close(); } } *************** *** 182,184 **** --- 215,478 ---- } + + private static class HttpServletRequestWrapper implements HttpServletRequest { + private HttpServletRequest iRequest; + private ServletInputStreamWrapper iInputStream = null; + + public HttpServletRequestWrapper(HttpServletRequest r) { + iRequest = r; + } + @Override + public String getAuthType() { + return iRequest.getAuthType(); + } + @Override + public String getContextPath() { + return iRequest.getContextPath(); + } + @Override + public Cookie[] getCookies() { + return iRequest.getCookies(); + } + @Override + public long getDateHeader(String name) { + return iRequest.getDateHeader(name); + } + @Override + public String getHeader(String name) { + return iRequest.getHeader(name); + } + @Override + public Enumeration getHeaderNames() { + return iRequest.getHeaderNames(); + } + @Override + public Enumeration getHeaders(String name) { + return iRequest.getHeaders(name); + } + @Override + public int getIntHeader(String name) { + return iRequest.getIntHeader(name); + } + @Override + public String getMethod() { + return iRequest.getMethod(); + } + @Override + public String getPathInfo() { + return iRequest.getPathInfo(); + } + @Override + public String getPathTranslated() { + return iRequest.getPathTranslated(); + } + @Override + public String getQueryString() { + return iRequest.getQueryString(); + } + @Override + public String getRemoteUser() { + return iRequest.getRemoteUser(); + } + @Override + public String getRequestURI() { + return iRequest.getRequestURI(); + } + @Override + public StringBuffer getRequestURL() { + return iRequest.getRequestURL(); + } + @Override + public String getRequestedSessionId() { + return iRequest.getRequestedSessionId(); + } + @Override + public String getServletPath() { + return iRequest.getServletPath(); + } + @Override + public HttpSession getSession() { + return iRequest.getSession(); + } + @Override + public HttpSession getSession(boolean create) { + return iRequest.getSession(create); + } + @Override + public Principal getUserPrincipal() { + return iRequest.getUserPrincipal(); + } + @Override + public boolean isRequestedSessionIdFromCookie() { + return iRequest.isRequestedSessionIdFromCookie(); + } + @Override + public boolean isRequestedSessionIdFromURL() { + return iRequest.isRequestedSessionIdFromURL(); + } + @Override + @Deprecated + public boolean isRequestedSessionIdFromUrl() { + return iRequest.isRequestedSessionIdFromUrl(); + } + @Override + public boolean isRequestedSessionIdValid() { + return iRequest.isRequestedSessionIdValid(); + } + @Override + public boolean isUserInRole(String role) { + return iRequest.isUserInRole(role); + } + @Override + public Object getAttribute(String name) { + return iRequest.getAttribute(name); + } + @Override + public Enumeration getAttributeNames() { + return iRequest.getAttributeNames(); + } + @Override + public String getCharacterEncoding() { + return iRequest.getCharacterEncoding(); + } + @Override + public int getContentLength() { + return iRequest.getContentLength(); + } + @Override + public String getContentType() { + return iRequest.getContentType(); + } + @Override + public ServletInputStream getInputStream() throws IOException { + if (iInputStream == null) + iInputStream = new ServletInputStreamWrapper(iRequest.getInputStream()); + return iInputStream; + } + public byte[] getBody() { + return (iInputStream == null ? null : iInputStream.getBytes()); + } + @Override + public String getLocalAddr() { + return iRequest.getLocalAddr(); + } + @Override + public String getLocalName() { + return iRequest.getLocalName(); + } + @Override + public int getLocalPort() { + return iRequest.getLocalPort(); + } + @Override + public Locale getLocale() { + return iRequest.getLocale(); + } + @Override + public Enumeration getLocales() { + return iRequest.getLocales(); + } + @Override + public String getParameter(String name) { + return iRequest.getParameter(name); + } + @Override + public Map getParameterMap() { + return iRequest.getParameterMap(); + } + @Override + public Enumeration getParameterNames() { + return iRequest.getParameterNames(); + } + @Override + public String[] getParameterValues(String name) { + return iRequest.getParameterValues(name); + } + @Override + public String getProtocol() { + return iRequest.getProtocol(); + } + @Override + public BufferedReader getReader() throws IOException { + return iRequest.getReader(); + } + @Override + @Deprecated + public String getRealPath(String path) { + return iRequest.getRealPath(path); + } + @Override + public String getRemoteAddr() { + return iRequest.getRemoteAddr(); + } + @Override + public String getRemoteHost() { + return iRequest.getRemoteHost(); + } + @Override + public int getRemotePort() { + return iRequest.getRemotePort(); + } + @Override + public RequestDispatcher getRequestDispatcher(String path) { + return iRequest.getRequestDispatcher(path); + } + @Override + public String getScheme() { + return iRequest.getScheme(); + } + @Override + public String getServerName() { + return iRequest.getServerName(); + } + @Override + public int getServerPort() { + return iRequest.getServerPort(); + } + @Override + public boolean isSecure() { + return iRequest.isSecure(); + } + @Override + public void removeAttribute(String name) { + iRequest.removeAttribute(name); + } + @Override + public void setAttribute(String name, Object o) { + iRequest.setAttribute(name, o); + } + @Override + public void setCharacterEncoding(String env) + throws UnsupportedEncodingException { + iRequest.setCharacterEncoding(env); + } + } + + private static class ServletInputStreamWrapper extends ServletInputStream { + private InputStream iInputStream; + private ByteArrayOutputStream iBytes; + + public ServletInputStreamWrapper(InputStream is) { + iBytes = new ByteArrayOutputStream(); + iInputStream = is; + } + + @Override + public int read() throws IOException { + int out = iInputStream.read(); + iBytes.write(out); + return out; + } + + @Override + public void close() throws IOException { + iInputStream.close(); + iBytes.flush(); + iBytes.close(); + } + + public byte[] getBytes() { + return iBytes.toByteArray(); + } + } } |