felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1690869 - in /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager: AbstractComponentManager.java ComponentFactoryImpl.java DependencyManager.java SingleComponentManager.java
Date Tue, 14 Jul 2015 07:10:58 GMT
Author: cziegeler
Date: Tue Jul 14 07:10:58 2015
New Revision: 1690869

URL: http://svn.apache.org/r1690869
Log:
FELIX-4957 : [DS][RFC-212] Various issues with field references

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java?rev=1690869&r1=1690868&r2=1690869&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
Tue Jul 14 07:10:58 2015
@@ -396,7 +396,7 @@ public abstract class AbstractComponentM
             enableInternal();
             if ( !async )
             {
-                activateInternal( m_trackingCount.get() );
+                activateInternal( );
             }
         }
         finally
@@ -419,7 +419,7 @@ public abstract class AbstractComponentM
                 {
                     try
                     {
-                        activateInternal( m_trackingCount.get() );
+                        activateInternal( );
                     }
                     finally
                     {
@@ -644,7 +644,7 @@ public abstract class AbstractComponentM
         log( LogService.LOG_DEBUG, "Component enabled", null );
     }
 
-    final void activateInternal( int trackingCount )
+    final void activateInternal( )
     {
         log( LogService.LOG_DEBUG, "ActivateInternal",
                 null );

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java?rev=1690869&r1=1690868&r2=1690869&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
Tue Jul 14 07:10:58 2015
@@ -129,7 +129,7 @@ public class ComponentFactoryImpl<S> ext
         // enable
         cm.enableInternal();
         //activate immediately
-        cm.activateInternal( getTrackingCount().get() );
+        cm.activateInternal( );
 
         ComponentInstance instance;
         if ( getComponentMetadata().isPersistentFactoryComponent() ) 

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java?rev=1690869&r1=1690868&r2=1690869&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
Tue Jul 14 07:10:58 2015
@@ -68,7 +68,7 @@ public class DependencyManager<S, T> imp
 
     private final int m_index;
 
-    private final Customizer<S, T> m_customizer;
+    private volatile Customizer<S, T> m_customizer;
 
     //only set once, but it's not clear there is enough other synchronization to get the
correct object before it's used.
     private volatile ReferenceMethods m_bindMethods;
@@ -260,7 +260,7 @@ public class DependencyManager<S, T> imp
         {
             if ( cardinalityJustSatisfied( serviceCount ) )
             {
-                m_componentManager.activateInternal( trackingCount );
+                m_componentManager.activateInternal( );
             }
         }
 
@@ -330,7 +330,7 @@ public class DependencyManager<S, T> imp
                     m_componentManager.log( LogService.LOG_DEBUG, "dm {0} tracking {1} MultipleDynamic,
activating", new Object[] {getName(), trackingCount}, null );
                     tracked( trackingCount );
                     tracked = true;
-                    m_componentManager.activateInternal( trackingCount );
+                    m_componentManager.activateInternal( );
                 }
                 else
                 {
@@ -449,12 +449,12 @@ public class DependencyManager<S, T> imp
                         "Dependency Manager: Static dependency on {0}/{1} is broken", new
Object[]
                         {getName(), m_dependencyMetadata.getInterface()}, null );
                 m_componentManager.deactivateInternal( ComponentConstants.DEACTIVATION_REASON_REFERENCE,
false, false );
-                m_componentManager.activateInternal( trackingCount );
+                m_componentManager.activateInternal( );
 
             }
             else if ( isTrackerOpened() && cardinalityJustSatisfied( serviceCount
) )
             {
-                m_componentManager.activateInternal( trackingCount );
+                m_componentManager.activateInternal( );
             }
             m_componentManager.log( LogService.LOG_DEBUG, "dm {0} tracking {1} MultipleStaticGreedy
added {2} (exit)", new Object[] {getName(), trackingCount, serviceReference}, null );
         }
@@ -483,7 +483,7 @@ public class DependencyManager<S, T> imp
                         {getName(), m_dependencyMetadata.getInterface()}, null );
                 m_componentManager.deactivateInternal( ComponentConstants.DEACTIVATION_REASON_REFERENCE,
false, false );
                 //try to reactivate after ref is no longer tracked.
-                m_componentManager.activateInternal( trackingCount );
+                m_componentManager.activateInternal( );
             }
             else if ( !cardinalitySatisfied( getTracker().getServiceCount() ) ) //may be
called from an old tracker, so getTracker() may give a different answer
             {
@@ -555,7 +555,7 @@ public class DependencyManager<S, T> imp
             tracked( trackingCount );
             if ( isTrackerOpened() && cardinalityJustSatisfied( serviceCount ) &&
!isActive())
             {
-                m_componentManager.activateInternal( trackingCount );
+                m_componentManager.activateInternal( );
             }
             m_componentManager.log( LogService.LOG_DEBUG, "dm {0} tracking {1} MultipleStaticReluctant
added {2} (exit)", new Object[] {getName(), trackingCount, serviceReference}, null );
         }
@@ -589,7 +589,7 @@ public class DependencyManager<S, T> imp
                     m_componentManager.deactivateInternal( ComponentConstants.DEACTIVATION_REASON_REFERENCE,
false, false );
 
                     // FELIX-2368: immediately try to reactivate
-                    m_componentManager.activateInternal( trackingCount );
+                    m_componentManager.activateInternal( );
 
                 }
             }
@@ -721,7 +721,7 @@ public class DependencyManager<S, T> imp
                 {
                     tracked( trackingCount );
                     tracked = true;
-                    m_componentManager.activateInternal( trackingCount );
+                    m_componentManager.activateInternal( );
                 }
             }
             this.trackingCount = trackingCount;
@@ -910,7 +910,7 @@ public class DependencyManager<S, T> imp
                 if ( reactivate )
                 {
                     m_componentManager.deactivateInternal( ComponentConstants.DEACTIVATION_REASON_REFERENCE,
false, false );
-                    m_componentManager.activateInternal( trackingCount );
+                    m_componentManager.activateInternal( );
                 }
                 else
                 {
@@ -919,7 +919,7 @@ public class DependencyManager<S, T> imp
             }
             else if (isTrackerOpened() && cardinalityJustSatisfied( serviceCount
) )
             {
-                m_componentManager.activateInternal( trackingCount );
+                m_componentManager.activateInternal( );
             }
             else
             {
@@ -954,7 +954,7 @@ public class DependencyManager<S, T> imp
                         this.refPair = null;
                     }
                 }
-                m_componentManager.activateInternal( trackingCount );            	
+                m_componentManager.activateInternal( );            	
             }
             m_componentManager.log( LogService.LOG_DEBUG, "dm {0} tracking {1} SingleStatic
modified {2} (exit)", new Object[] {getName(), trackingCount, serviceReference}, null ); 
          
         }
@@ -984,7 +984,7 @@ public class DependencyManager<S, T> imp
                         this.refPair = null;
                     }
                 }
-                m_componentManager.activateInternal( trackingCount );
+                m_componentManager.activateInternal( );
             }
             m_componentManager.log( LogService.LOG_DEBUG, "dm {0} tracking {1} SingleStatic
removed {2} (exit)", new Object[] {getName(), trackingCount, serviceReference}, null );
         }

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java?rev=1690869&r1=1690868&r2=1690869&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/SingleComponentManager.java
Tue Jul 14 07:10:58 2015
@@ -595,7 +595,7 @@ public class SingleComponentManager<S> e
                     log( LogService.LOG_DEBUG, "Attempting to activate unsatisfied component",
null );
                     updateTargets( getProperties() );
                     releaseActivationWriteeLock( "reconfigure.unsatisfied" );
-                    activateInternal( getTrackingCount().get() );
+                    activateInternal( );
                     return;
                 }
 
@@ -624,7 +624,7 @@ public class SingleComponentManager<S> e
                         {
                             releaseActivationWriteeLock("reconfigure.deactivate.activate");
                         }
-                        activateInternal(getTrackingCount().get());
+                        activateInternal();
                     }
                 }
             }



Mime
View raw message