diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java
index adaa22f..5a2b07e 100644
--- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java
+++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/AdapterServiceImpl.java
@@ -23,6 +23,7 @@
 
 import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.service.Service;
+import org.apache.felix.dm.service.ServiceStateListener;
 import org.osgi.framework.ServiceReference;
 
 /**
@@ -58,7 +59,6 @@
         
         public Service createService(Object[] properties) {
             ServiceReference ref = (ServiceReference) properties[0]; 
-            Object service = properties[1];
             Properties props = new Properties();
             String[] keys = ref.getPropertyKeys();
             for (int i = 0; i < keys.length; i++) {
@@ -73,7 +73,7 @@
             }
             List dependencies = m_service.getDependencies();
             dependencies.remove(0);
-            return m_manager.createService()
+            Service service = m_manager.createService()
                 .setInterface(m_serviceInterfaces, props)
                 .setImplementation(m_serviceImpl)
                 .setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect
@@ -83,6 +83,10 @@
                 .add(m_manager.createServiceDependency()
                      .setService(m_adapteeInterface, ref)
                      .setRequired(true));
+            for (int i = 0; i < m_stateListeners.size(); i ++) {
+                service.addStateListener((ServiceStateListener) m_stateListeners.get(i));
+            }
+            return service;
         }
     }
 }
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java
index 9f7f1cc..d9acf70 100644
--- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java
+++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterServiceImpl.java
@@ -25,6 +25,7 @@
 import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.resources.Resource;
 import org.apache.felix.dm.service.Service;
+import org.apache.felix.dm.service.ServiceStateListener;
 
 /**
  * Resource adapter service implementation. This class extends the FilterService in order to catch
@@ -68,19 +69,23 @@
             // the first dependency is always the dependency on the resource, which
             // will be replaced with a more specific dependency below
             dependencies.remove(0);
-            return m_manager.createService()
-                            .setInterface(m_serviceInterfaces, props)
-                            .setImplementation(m_serviceImpl)
-                            .setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect
-                            .setComposition(m_compositionInstance, m_compositionMethod) // if not set, no effect
-                            .setCallbacks(m_callbackObject, m_init, m_start, m_stop, m_destroy) // if not set, no effect
-                            .add(dependencies)
-                            .add(m_manager.createResourceDependency()
-                                 .setResource(resource)
-                                 .setPropagate(m_propagate)
-                                 .setCallbacks(null, "changed", null)
-                                 .setAutoConfig(true)
-                                 .setRequired(true));            
+            Service service = m_manager.createService()
+                .setInterface(m_serviceInterfaces, props)
+                .setImplementation(m_serviceImpl)
+                .setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect
+                .setComposition(m_compositionInstance, m_compositionMethod) // if not set, no effect
+                .setCallbacks(m_callbackObject, m_init, m_start, m_stop, m_destroy) // if not set, no effect
+                .add(dependencies)
+                .add(m_manager.createResourceDependency()
+                     .setResource(resource)
+                     .setPropagate(m_propagate)
+                     .setCallbacks(null, "changed", null)
+                     .setAutoConfig(true)
+                     .setRequired(true));         
+            for (int i = 0; i < m_stateListeners.size(); i ++) {
+                service.addStateListener((ServiceStateListener) m_stateListeners.get(i));
+            }
+            return service;
         }
     }
 }
