From: <jbo...@li...> - 2006-05-30 21:32:44
|
Author: adamw Date: 2006-05-30 17:32:39 -0400 (Tue, 30 May 2006) New Revision: 4498 Removed: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/blojsom/ Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/FilesFromRepoFilter.java labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/maven.xml Log: Blojsom RIP File copying synchronizing Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/FilesFromRepoFilter.java =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/FilesFromRepoFilter.java 2006-05-30 21:27:17 UTC (rev 4497) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/forge-common/src/java/org/jboss/forge/common/FilesFromRepoFilter.java 2006-05-30 21:32:39 UTC (rev 4498) @@ -39,7 +39,8 @@ /** * A filter for reading JSP (and html, text etc) files from a file repository * and including them in the response. - * + * + * @deprecated - Move to Shotoku version. * @author adamw * @author Tomasz Szymanski */ @@ -47,7 +48,12 @@ private final static String WRONG_REQ_RESP = "Error accessing the " + "requested resource."; - /** + /** + * Field on which synchronization of copying file is done. + */ + private final static Object synchronizer = new Object(); + + /** * <code>COPIED_TO_REPO_DIR</code> - name of a directory to which files * will be copied; this will be a subdirectory of the deployment directory * of a web application using this filter. @@ -111,9 +117,11 @@ long lastModified = new File(filePath).lastModified(); if ((lastModified == 0) || (lastModified < requestedNode.getLastModification())) { - new File(filePath.substring(0, - filePath.lastIndexOf(separator))).mkdirs(); - requestedNode.copyToFile(filePath); + synchronized(synchronizer) { + new File(filePath.substring(0, + filePath.lastIndexOf(separator))).mkdirs(); + requestedNode.copyToFile(filePath); + } } request.getRequestDispatcher( Modified: labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/maven.xml =================================================================== --- labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/maven.xml 2006-05-30 21:27:17 UTC (rev 4497) +++ labs/jbosslabs/branches/Labs-Portal-2.0-ComTheme/forge/portal-extensions/maven.xml 2006-05-30 21:32:39 UTC (rev 4498) @@ -126,11 +126,10 @@ (for all that are not created there's a template .sample file) 1. build.properties 2. forge-common/src/etc/org/jboss/forge/common/forge.properties -3. blojsom/to-copy/blojsom.war/WEB-INF/blojsom.properties -4. forge-login/to-copy/portal-login-ds.xml -5. federation-register/src/web/WEB-INF/faces-config (only for the JOSF portal). -6. jbosswiki/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties -7. shotoku/shotoku-base/src/etc/shotoku.properties +3. forge-login/to-copy/portal-login-ds.xml +4. federation-register/src/web/WEB-INF/faces-config (only for the JOSF portal). +5. jbosswiki/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties +6. shotoku/shotoku-base/src/etc/shotoku.properties Available goals: - help - prints this info |