felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1429853 - in /felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo: ComponentFactory.java IPojoFactory.java
Date Mon, 07 Jan 2013 15:44:59 GMT
Author: clement
Date: Mon Jan  7 15:44:59 2013
New Revision: 1429853

URL: http://svn.apache.org/viewvc?rev=1429853&view=rev
Log:
First attempt to fix FELIX-3839
Reduce the synchronization level in the instance starting process.

Modified:
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java

Modified: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java?rev=1429853&r1=1429852&r2=1429853&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
(original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
Mon Jan  7 15:44:59 2013
@@ -249,7 +249,7 @@ public class ComponentFactory extends IP
 
     /**
      * Starts the factory.
-     * This method is called when holding the monitor lock.
+     * This method is not called when holding the monitor lock.
      */
     public void starting() {
         if (m_tracker != null) {

Modified: felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java?rev=1429853&r1=1429852&r2=1429853&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
(original)
+++ felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java
Mon Jan  7 15:44:59 2013
@@ -580,7 +580,7 @@ public abstract class IPojoFactory imple
     /**
      * Starting method.
      * This method is called when the factory is starting.
-     * This method is called when holding the lock on the factory.
+     * This method is <strong>not</strong> called when holding the lock on the
factory.
      */
     public abstract void starting();
 
@@ -590,16 +590,20 @@ public abstract class IPojoFactory imple
      * calls the {@link IPojoFactory#starting()} method,
      * and published services if the factory is public.
      */
-    public synchronized void start() {
-        if (m_described) { // Already started.
-            return;
+    public void start() {
+        synchronized (this) {
+            if (m_described) { // Already started.
+                return;
+            }
         }
 
         m_componentDesc = getComponentTypeDescription();
 
         starting();
 
-        computeFactoryState();
+        synchronized (this) {
+            computeFactoryState();
+        }
 
         if (m_isPublic) {
             // Exposition of the factory service



Mime
View raw message