svn commit: r615720 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/cache/CacheDistributor.java

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

svn commit: r615720 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/cache/CacheDistributor.java

Armin Waibel
Author: arminw
Date: Sun Jan 27 18:52:37 2008
New Revision: 615720

URL: http://svn.apache.org/viewvc?rev=615720&view=rev
Log:
minor change, use synchronization lock object

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/cache/CacheDistributor.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/cache/CacheDistributor.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/cache/CacheDistributor.java?rev=615720&r1=615719&r2=615720&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/cache/CacheDistributor.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/cache/CacheDistributor.java Sun Jan 27 18:52:37 2008
@@ -67,6 +67,7 @@
     private static final String DELIMITER_FOR_EXCLUDE = ",";
     private static final ObjectCacheInternal DUMMY_CACHE =
             new ObjectCacheInternalWrapper(new ObjectCacheEmptyImpl(null, null));
+    private static final Object lock = new Object();
 
     /**
      * map, represents used cache implementations
@@ -129,7 +130,7 @@
 
     public void clear()
     {
-        synchronized(caches)
+        synchronized(lock)
         {
             Iterator it = caches.values().iterator();
             ObjectCache oc;
@@ -185,7 +186,7 @@
             {
                 if(!descriptorBasedCaches)
                 {
-                    synchronized(caches)
+                    synchronized(lock)
                     {
                         retval = lookupCache(targetClass);
 
@@ -206,7 +207,7 @@
                 }
                 else
                 {
-                    synchronized(caches)
+                    synchronized(lock)
                     {
                         retval = lookupCache(ocd);
 
@@ -237,7 +238,7 @@
                 else
                 {
                     String jcdAlias = broker.serviceConnectionManager().getConnectionDescriptor().getJcdAlias();
-                    synchronized(caches)
+                    synchronized(lock)
                     {
                         retval = lookupCache(jcdAlias);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]