Solve a bug in synchronization stuff. IPOJO released services when exiting methods. However, for service factory, it must not released services as the binding can be stateful. 
Now, iPOJO releases services only when they disappears.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@565785 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java b/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
index 649f4b6..153c276 100644
--- a/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
+++ b/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
@@ -135,7 +135,6 @@
      */
     private ServiceContext m_serviceContext;
     
-    
     /**
      * Thread Local.
      */
@@ -730,10 +729,6 @@
                 // Exit the method flow => Release all object
                 m_usage.getObjects().clear();
                 List refs = m_usage.getReferences();
-                for (int i = 0; i < refs.size(); i++) {
-                    ServiceReference ref = (ServiceReference) refs.get(i);
-                    ungetService(ref);
-                }
                 refs.clear();
             }
         }