[ 
https://issues.apache.org/jira/browse/FELIX-4313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13825609#comment-13825609
 ] 

David Jencks commented on FELIX-4313:
-------------------------------------

My theory about what is causing this would be fixed by the following patch:

diff --git 
a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java 
b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager
index 99a87cf..87f846c 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
@@ -165,12 +165,16 @@ public class DependencyManager<S, T> implements Reference
 
         public boolean isSatisfied()
         {
+            ServiceTracker<T, RefPair<T>> tracker = getTracker();
+            if ( tracker == null)
+            {
+                return false;
+            }
             if (isOptional())
             {
                 return true;
             }            
-            ServiceTracker<T, RefPair<T>> tracker = getTracker();
-            return !(tracker == null) && !tracker.isEmpty();
+            return !tracker.isEmpty();
         }
 
         protected ServiceTracker<T, RefPair<T>> getTracker()


I think we need to prevent any attempt to activate until all the m_trackers are 
set.  Can you see if this fixes the problem?

> Bad synchronization in scr where a lock is held while ungetting a service
> -------------------------------------------------------------------------
>
>                 Key: FELIX-4313
>                 URL: https://issues.apache.org/jira/browse/FELIX-4313
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.8.0
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: scr-1.8.2
>
>
> The problem is located in DependencyManeger$SingleStaticCustomizer.close()



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to