diff --git a/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java b/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
index eda3e82..4e56b55 100644
--- a/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
+++ b/ipojo/core/src/main/java/org/apache/felix/ipojo/ComponentFactory.java
@@ -274,6 +274,22 @@
         if (arch == null || arch.equalsIgnoreCase("true")) {
             list.add(new RequiredHandler("architecture", null));
         }
+        
+        
+        // Determine if the component must be immediate.
+        // A component becomes immediate if it doesn't provide a service,
+        // and does not specified that the component is not immediate.
+        if (m_componentMetadata.getElements("provides") == null) {
+            String imm = m_componentMetadata.getAttribute("immediate");
+            if (imm == null || !imm.equalsIgnoreCase("false")) {
+                getLogger().log(
+                        Logger.WARNING,
+                        "The component " + getFactoryName()
+                                + " becomes immediate");
+                m_componentMetadata.addAttribute(new Attribute("immediate",
+                        "true"));
+            }
+        }
 
         // Add lifecycle callback if immediate = true
         RequiredHandler reqCallback = new RequiredHandler("callback", null);
@@ -282,6 +298,7 @@
             list.add(reqCallback);
         }
 
+
         return list;
     }
 
diff --git a/ipojo/core/src/main/java/org/apache/felix/ipojo/HandlerManagerFactory.java b/ipojo/core/src/main/java/org/apache/felix/ipojo/HandlerManagerFactory.java
index 2f3d5cb..a0ba2fa 100644
--- a/ipojo/core/src/main/java/org/apache/felix/ipojo/HandlerManagerFactory.java
+++ b/ipojo/core/src/main/java/org/apache/felix/ipojo/HandlerManagerFactory.java
@@ -18,7 +18,9 @@
  */
 package org.apache.felix.ipojo;
 
+import java.util.ArrayList;
 import java.util.Dictionary;
+import java.util.List;
 
 import org.apache.felix.ipojo.architecture.ComponentTypeDescription;
 import org.apache.felix.ipojo.metadata.Element;
@@ -135,6 +137,39 @@
         instance.configure(m_componentMetadata, configuration);
         return instance;
     }
+    
+
+    /**
+     * Computes required handlers. This method does not manipulate any
+     * non-immutable fields, so does not need to be synchronized.
+     * This method is overridden to avoid to use the same detection rules
+     * than atomic components. Indeed, architecture is disable by default,
+     * and an handler is never immediate.
+     * @return the required handler list.
+     */
+    public List getRequiredHandlerList() {
+        List list = new ArrayList();
+        Element[] elems = m_componentMetadata.getElements();
+        for (int i = 0; i < elems.length; i++) {
+            Element current = elems[i];
+            if (!"manipulation".equals(current.getName())) {
+                RequiredHandler req = new RequiredHandler(current.getName(),
+                        current.getNameSpace());
+                if (!list.contains(req)) {
+                    list.add(req);
+                }
+            }
+        }
+
+        // Unlike normal components, the architecture is enable only when
+        // specified.
+        String arch = m_componentMetadata.getAttribute("architecture");
+        if (arch != null && arch.equalsIgnoreCase("true")) {
+            list.add(new RequiredHandler("architecture", null));
+        }
+
+        return list;
+    }
 
     private class HandlerTypeDescription extends ComponentTypeDescription {
 
diff --git a/ipojo/core/src/main/java/org/apache/felix/ipojo/PrimitiveHandler.java b/ipojo/core/src/main/java/org/apache/felix/ipojo/PrimitiveHandler.java
index 8add263..2016dae 100644
--- a/ipojo/core/src/main/java/org/apache/felix/ipojo/PrimitiveHandler.java
+++ b/ipojo/core/src/main/java/org/apache/felix/ipojo/PrimitiveHandler.java
@@ -101,7 +101,7 @@
      * @param value : the value passed to the field
      */
     public void onSet(Object pojo, String fieldName, Object value) {
-        // Nothing do do in the default implementation
+        // Nothing to do in the default implementation
     }
 
     /**
@@ -122,7 +122,7 @@
      * @param args arguments array.
      */
     public void onEntry(Object pojo, Method method, Object[] args) { 
-        // Nothing do do in the default implementation
+        // Nothing to do in the default implementation
     }
 
     /**
@@ -134,7 +134,7 @@
      * @param returnedObj : the returned object (boxed for primitive type)
      */
     public void onExit(Object pojo, Method method, Object returnedObj) { 
-        // Nothing do do in the default implementation
+        // Nothing to do in the default implementation
     }
     
     /**
@@ -144,7 +144,7 @@
      * @param throwable : the thrown exception
      */
     public void onError(Object pojo, Method method, Throwable throwable) {
-        // Nothing do do in the default implementation
+        // Nothing to do in the default implementation
     }
     
     /**
@@ -155,7 +155,7 @@
      * @param method : invoked method.
      */
     public void onFinally(Object pojo, Method method) {
-        // Nothing do do in the default implementation
+        // Nothing to do in the default implementation
     }
     
     /**
@@ -164,7 +164,7 @@
      * @param instance : the created instance
      */
     public void onCreation(Object instance) { 
-        // Nothing do do in the default implementation
+        // Nothing to do in the default implementation
     }
     
     
