Mercurial > hg > digilib-old
changeset 750:4f5aaa0de456 jquery
removed synchronized from some methods
author | robcast |
---|---|
date | Sat, 05 Feb 2011 16:47:31 +0100 |
parents | 109cd6fbec49 |
children | 00b7857f07f5 |
files | servlet/src/digilib/io/DocuDirCache.java servlet/src/digilib/io/DocuDirectory.java servlet/src/digilib/servlet/Scaler.java |
diffstat | 3 files changed, 19 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/servlet/src/digilib/io/DocuDirCache.java Sat Feb 05 15:59:31 2011 +0100 +++ b/servlet/src/digilib/io/DocuDirCache.java Sat Feb 05 16:47:31 2011 +0100 @@ -104,6 +104,7 @@ */ public void put(DocuDirectory newdir) { String s = newdir.getDirName(); + logger.debug("DocuDirCache.put for "+s+" in "+this); if (map.containsKey(s)) { logger.warn("Duplicate key in DocuDirCache.put -- ignoring!"); } else { @@ -117,7 +118,7 @@ * * @param newDir */ - public synchronized void putDir(DocuDirectory newDir) { + public void putDir(DocuDirectory newDir) { put(newDir); String parent = FileOps.parent(newDir.getDirName()); if (parent != "") {
--- a/servlet/src/digilib/io/DocuDirectory.java Sat Feb 05 15:59:31 2011 +0100 +++ b/servlet/src/digilib/io/DocuDirectory.java Sat Feb 05 16:47:31 2011 +0100 @@ -177,7 +177,7 @@ * * @return boolean the directory exists */ - public synchronized boolean readDir() { + public boolean readDir() { // check directory first checkDir(); if (!isValid) {
--- a/servlet/src/digilib/servlet/Scaler.java Sat Feb 05 15:59:31 2011 +0100 +++ b/servlet/src/digilib/servlet/Scaler.java Sat Feb 05 16:47:31 2011 +0100 @@ -32,7 +32,7 @@ public class Scaler extends HttpServlet { /** digilib servlet version (for all components) */ - public static final String version = "1.8.3b"; + public static final String version = "1.8.4a"; /** servlet error codes */ public static enum Error {UNKNOWN, AUTH, FILE, IMAGE}; @@ -126,7 +126,7 @@ * * @see javax.servlet.http.HttpServlet#getLastModified(javax.servlet.http.HttpServletRequest) */ - protected long getLastModified(HttpServletRequest request) { + public long getLastModified(HttpServletRequest request) { accountlog.debug("GetLastModified from " + request.getRemoteAddr() + " for " + request.getQueryString()); long mtime = -1; @@ -140,6 +140,7 @@ DocuDirectory dd = (DocuDirectory) f.getParent(); mtime = dd.getDirMTime() / 1000 * 1000; } + logger.debug(" returns "+mtime); return mtime; } @@ -161,7 +162,19 @@ } - /** Service this request using the response. + protected void doHead(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + logger.debug("HEAD from "+req.getRemoteAddr()); + super.doHead(req, resp); + } + + protected void doOptions(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + logger.debug("OPTIONS from "+req.getRemoteAddr()); + super.doOptions(req, resp); + } + + /** Service this request using the response. * @param request * @param response * @throws ServletException