svn commit: r1127558 - /ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1127558 - /ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java

sascharodekamp
Author: sascharodekamp
Date: Wed May 25 15:32:50 2011
New Revision: 1127558

URL: http://svn.apache.org/viewvc?rev=1127558&view=rev
Log:
Update - Thread Safety for the OfbizRepositoryMapping.  

Modified:
    ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java

Modified: ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java?rev=1127558&r1=1127557&r2=1127558&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java Wed May 25 15:32:50 2011
@@ -3,6 +3,7 @@ package org.ofbiz.content.jcr.orm;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -67,11 +68,11 @@ public class OfbizRepositoryMappingJackr
     // private GenericValue contentAssoc = null;
     private Session session = null;
     private Node node = null;
-    private VersionManager versionManager = null;
-    private String selectedLanguage = UtilProperties.getPropertyValue("general", "locale.properties.fallback");
+    private volatile VersionManager versionManager = null;
+    private volatile String selectedLanguage = UtilProperties.getPropertyValue("general", "locale.properties.fallback");
     // a list for all checked out nodes during one transaction TODO THREAD SAFE
     // ??
-    private List<Node> checkedOutNodeStore = new ArrayList<Node>();
+    private List<Node> checkedOutNodeStore = Collections.synchronizedList(new ArrayList<Node>());
 
     /**
      * The OfbizContentMapping constructor loads the node and related content