You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2008/07/16 13:36:07 UTC

svn commit: r677248 - /servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java

Author: gertv
Date: Wed Jul 16 04:36:07 2008
New Revision: 677248

URL: http://svn.apache.org/viewvc?rev=677248&view=rev
Log:
SMX4-63: SMX4 stalls when running on Linux -- deadlocked

Modified:
    servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java

Modified: servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java?rev=677248&r1=677247&r2=677248&view=diff
==============================================================================
--- servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java (original)
+++ servicemix/smx4/specs/trunk/locator/src/main/java/org/apache/servicemix/specs/locator/Activator.java Wed Jul 16 04:36:07 2008
@@ -16,24 +16,26 @@
  */
 package org.apache.servicemix.specs.locator;
 
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Enumeration;
-import java.util.concurrent.Callable;
-import java.net.URL;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
 
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.SynchronousBundleListener;
-import org.osgi.framework.Bundle;
 
 public class Activator implements BundleActivator, SynchronousBundleListener {
 
     private BundleContext bundleContext;
-    private Map<Long, Map<String, Callable<Class>>> factories = new HashMap<Long, Map<String, Callable<Class>>>();
+    private ConcurrentMap<Long, Map<String, Callable<Class>>> factories = new ConcurrentHashMap<Long, Map<String, Callable<Class>>>();
 
     public synchronized void start(BundleContext bundleContext) throws Exception {
         this.bundleContext = bundleContext;
@@ -50,7 +52,7 @@
         this.bundleContext = null;
     }
 
-    public synchronized void bundleChanged(BundleEvent event) {
+    public void bundleChanged(BundleEvent event) {
         if (event.getType() == BundleEvent.RESOLVED) {
             register(event.getBundle());
         } else if (event.getType() == BundleEvent.UNRESOLVED) {
@@ -98,5 +100,4 @@
             }
         }
     }
-
 }