diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AdapterService.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AdapterService.java
index f820d4e..28d94fd 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AdapterService.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AdapterService.java
@@ -37,10 +37,10 @@
 public @interface AdapterService
 {
     /**
-     * Returns the adapter service interface . By default, the directly implemented interface is used.
-     * @return The service interface to apply the adapter to.
+     * Returns the adapter service interface(s). By default, the directly implemented interface(s) is (are) used.
+     * @return The service interface(s) provided by this adapter.
      */
-    Class<?> adapterService() default Object.class;
+    Class<?>[] adapterService() default {};
 
     /**
      * The adapter service properites. They will be added to the adapted service properties.
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
index 53a099a..56ae2da 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
@@ -49,10 +49,10 @@
     int stateMask() default Bundle.INSTALLED | Bundle.RESOLVED | Bundle.ACTIVE;
     
     /**
-     * The interface to use when registering adapters. By default, the interface directly implemented
-     * by the annotated class is used.
+     * The interface(s) to use when registering adapters. By default, the interface(s) directly implemented
+     * by the annotated class is (are) used.
      */
-    Class<?> service() default Object.class;
+    Class<?>[] service() default {};
     
     /**
      * Additional properties to use with the service registration
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ResourceAdapterService.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ResourceAdapterService.java
index 3aebcac..28a1700 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ResourceAdapterService.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ResourceAdapterService.java
@@ -42,9 +42,9 @@
     String filter();
 
     /**
-     * The interface to use when registering adapters
+     * The interface(s) to use when registering adapters
      */
-    Class<?> service() default Object.class;
+    Class<?>[] service() default {};
 
     /**
      * Additional properties to use with the adapter service registration
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
index 27d1b43..eaed2bd 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
@@ -659,7 +659,6 @@
             info.addParam(Params.service, m_interfaces[0]);
         } else
         {
-            checkClassImplements(annotation, Params.service);
             info.addClassParam(annotation, Params.service, null);
         }
     }
@@ -694,27 +693,7 @@
         parseParameters(annotation, Params.adapterProperties, info);
 
         // Parse the optional adapter service (use directly implemented interface by default).
-        Object adapterService = annotation.get(Params.adapterService.toString());
-        if (adapterService == null) {
-            if (m_interfaces == null)
-            {
-                throw new IllegalStateException("Invalid AdapterService annotation: " +
-                    "the adapterService attribute has not been set and the class " + m_className + 
-                    " does not implement any interfaces");
-            }
-            if (m_interfaces.length != 1) 
-            {
-                throw new IllegalStateException("Invalid AdapterService annotation: " +
-                    "the adapterService attribute has not been set and the class " + m_className +
-                    " implements more than one interface");
-            }
-            
-            info.addParam(Params.adapterService, m_interfaces[0]);
-        } else 
-        {
-            checkClassImplements(annotation, Params.adapterService);
-            info.addClassParam(annotation, Params.adapterService, null);
-        }
+        info.addClassParam(annotation, Params.adapterService, m_interfaces);
     }
 
     /**
@@ -747,27 +726,7 @@
         parseParameters(annotation, Params.properties, info);
 
         // Parse the optional adapter service (use directly implemented interface by default).
-        Object service = annotation.get(Params.service.toString());
-        if (service == null) {
-            if (m_interfaces == null)
-            {
-                throw new IllegalStateException("Invalid BundleAdapterService annotation: " +
-                    "the service attribute has not been set and the class " + m_className + 
-                    " does not implement any interfaces");
-            }
-            if (m_interfaces.length != 1) 
-            {
-                throw new IllegalStateException("Invalid AdapterService annotation: " +
-                    "the service attribute has not been set and the class " + m_className +
-                    " implements more than one interface");
-            }
-            
-            info.addParam(Params.service, m_interfaces[0]);
-        } else 
-        {
-            checkClassImplements(annotation, Params.service);
-            info.addClassParam(annotation, Params.service, null);
-        }
+        info.addClassParam(annotation, Params.service, m_interfaces);
         
         // Parse propagate attribute
         info.addParam(annotation, Params.propagate, Boolean.FALSE);
@@ -800,27 +759,7 @@
         parseParameters(annotation, Params.properties, info);
 
         // Parse the optional adapter service (use directly implemented interface by default).
-        Object service = annotation.get(Params.service.toString());
-        if (service == null) {
-            if (m_interfaces == null)
-            {
-                throw new IllegalStateException("Invalid ResourceAdapterService annotation: " +
-                    "the service attribute has not been set and the class " + m_className + 
-                    " does not implement any interfaces");
-            }
-            if (m_interfaces.length != 1) 
-            {
-                throw new IllegalStateException("Invalid ResourceAdapterService annotation: " +
-                    "the service attribute has not been set and the class " + m_className +
-                    " implements more than one interface");
-            }
-            
-            info.addParam(Params.service, m_interfaces[0]);
-        } else 
-        {
-            checkClassImplements(annotation, Params.service);
-            info.addClassParam(annotation, Params.service, null);
-        }
+        info.addClassParam(annotation, Params.service, m_interfaces);
         
         // Parse propagate attribute
         info.addParam(annotation, Params.propagate, Boolean.FALSE);
@@ -866,32 +805,6 @@
     }
 
     /**
-     * Checks if an annotation attribute references an implemented interface. 
-     * @param annotation the parsed annotation
-     * @param attribute an annotation attribute that references an interface this class must
-     * implement.
-     */
-    private void checkClassImplements(Annotation annotation, Params attribute)
-    {
-        String iface = annotation.get(attribute.toString());
-        iface = parseClass(iface, m_classPattern, 1);
-        
-        if (m_interfaces != null)
-        {
-            for (String implemented : m_interfaces)
-            {
-                if (implemented.equals(iface))
-                {
-                    return;
-                }
-            }
-        }
-
-        throw new IllegalArgumentException("Class " + m_className + " does not implement the "
-            + iface + " interface.");
-    }
-    
-    /**
      * Parses a Param annotation (which represents a list of key-value pari).
      * @param annotation the annotation where the Param annotation is defined
      * @param attribute the attribute name which is of Param type
