Author: thorsten
Date: Tue Jul  1 01:54:10 2008
New Revision: 673027

URL: http://svn.apache.org/viewvc?rev=673027&view=rev
Log:
moving the synchronized to the creation of the locationmap and away from 
getAttribute. FOR-1082

Modified:
    
forrest/trunk/main/java/org/apache/forrest/locationmap/LocationMapModule.java
    
forrest/trunk/whiteboard/cocoon-2.2-blocks/locationmap/src/main/java/org/apache/forrest/locationmap/LocationMapModule.java

Modified: 
forrest/trunk/main/java/org/apache/forrest/locationmap/LocationMapModule.java
URL: 
http://svn.apache.org/viewvc/forrest/trunk/main/java/org/apache/forrest/locationmap/LocationMapModule.java?rev=673027&r1=673026&r2=673027&view=diff
==============================================================================
--- 
forrest/trunk/main/java/org/apache/forrest/locationmap/LocationMapModule.java 
(original)
+++ 
forrest/trunk/main/java/org/apache/forrest/locationmap/LocationMapModule.java 
Tue Jul  1 01:54:10 2008
@@ -184,10 +184,7 @@
      * Execute the current request against the locationmap returning the
      * resulting string.
      */
-    /* FIXME: FOR-1082 we added synchronized because of problems
-     * with Concurrency.
-     */
-    public synchronized Object getAttribute(
+    public Object getAttribute(
         final String name,
         final Configuration modeConf,
         final Map objectModel)
@@ -241,6 +238,16 @@
         return null;
     }
 
+    
+    /**
+     * Method to create a new locationmap if needed. Needs to be
+     * synchronized otherwise the module will fail with concurrency.
+     * @see FOR-1082
+     * @param name - location that we want to look up
+     * @param objectModel - the current object model
+     * @return the location resolved via the locationmap or null if not found.
+     * @throws Exception
+     */
     private Object getFreshResult(final String name, final Map objectModel)
         throws Exception {
       Object result;

Modified: 
forrest/trunk/whiteboard/cocoon-2.2-blocks/locationmap/src/main/java/org/apache/forrest/locationmap/LocationMapModule.java
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/cocoon-2.2-blocks/locationmap/src/main/java/org/apache/forrest/locationmap/LocationMapModule.java?rev=673027&r1=673026&r2=673027&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/cocoon-2.2-blocks/locationmap/src/main/java/org/apache/forrest/locationmap/LocationMapModule.java
 (original)
+++ 
forrest/trunk/whiteboard/cocoon-2.2-blocks/locationmap/src/main/java/org/apache/forrest/locationmap/LocationMapModule.java
 Tue Jul  1 01:54:10 2008
@@ -184,9 +184,6 @@
      * Execute the current request against the locationmap returning the
      * resulting string.
      */
-    /* FIXME: FOR-1082 we added synchronized because of problems
-     * with Concurrency.
-     */
     public synchronized Object getAttribute(
         final String name,
         final Configuration modeConf,
@@ -240,7 +237,16 @@
         }
         return null;
     }
-
+    
+    /**
+     * Method to create a new locationmap if needed. Needs to be
+     * synchronized otherwise the module will fail with concurrency.
+     * @see FOR-1082
+     * @param name - location that we want to look up
+     * @param objectModel - the current object model
+     * @return the location resolved via the locationmap or null if not found.
+     * @throws Exception
+     */
     private Object getFreshResult(final String name, final Map objectModel)
         throws Exception {
       Object result;