Author: clement
Date: Tue Oct 30 03:38:44 2007
New Revision: 590028

URL: http://svn.apache.org/viewvc?rev=590028&view=rev
Log:
Invalidate instance instead of stopping them after InvocationTargetException 
(which allow to restart automatically after an external event)
Add a better error message when an invocation target exception occurs.
Fix bundle names to follow the same pattern
Fix a bug when a property have a method but no String default value.

Modified:
    felix/trunk/ipojo/ant/pom.xml
    felix/trunk/ipojo/arch/pom.xml
    
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
    
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurableProperty.java
    
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
    
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyCallback.java
    
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyHandler.java
    
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/lifecycle/callback/LifecycleCallbackHandler.java
    
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/Property.java
    felix/trunk/ipojo/plugin/pom.xml
    felix/trunk/ipojo/plugin/src/main/resources/archetype-resources/pom.xml

Modified: felix/trunk/ipojo/ant/pom.xml
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/ant/pom.xml?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- felix/trunk/ipojo/ant/pom.xml (original)
+++ felix/trunk/ipojo/ant/pom.xml Tue Oct 30 03:38:44 2007
@@ -43,7 +43,7 @@
        <extensions>true</extensions>
        <configuration>
                <instructions>          
-                       <Bundle-Name>Apache Felix iPOJO Ant Task</Bundle-Name>
+                       <Bundle-Name>iPOJO Ant Task</Bundle-Name>
                        <Bundle-Vendor>Clement ESCOFFIER</Bundle-Vendor>
                        <Bundle-Description> iPOJO Ant Task 
</Bundle-Description>
                        <Private-Package>org.apache.felix.ipojo.metadata, 
org.apache.felix.ipojo.manipulator, org.apache.felix.ipojo.xml.parser, 
org.apache.felix.ipojo.manipulation*, 
org.objectweb.asm;-split-package:=merge-first, 
org.objectweb.asm.commons;-split-package:=merge-first, 
org.apache.xerces.parsers, org.apache.xerces.xni*, org.apache.xerces.impl*, 
org.apache.xerces.util.*</Private-Package>

Modified: felix/trunk/ipojo/arch/pom.xml
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/arch/pom.xml?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- felix/trunk/ipojo/arch/pom.xml (original)
+++ felix/trunk/ipojo/arch/pom.xml Tue Oct 30 03:38:44 2007
@@ -36,6 +36,7 @@
         <extensions>true</extensions>
         <configuration>
           <instructions>
+               <Bundle-Name>iPOJO Arch Command</Bundle-Name>
             <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
             <Private-Package>org.apache.felix.ipojo.arch</Private-Package>
           </instructions>

Modified: 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
 (original)
+++ 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
 Tue Oct 30 03:38:44 2007
@@ -504,7 +504,7 @@
             m_factory.getLogger().log(Logger.ERROR, "[" + m_name + "] 
createInstance -> The Component Instance is not accessible (security reason) : 
" + e.getMessage());
             stop();
         } catch (InvocationTargetException e) {
-            m_factory.getLogger().log(Logger.ERROR, "[" + m_name + "] 
createInstance -> Cannot invoke the constructor method (illegal target) : " + 
e.getMessage());
+            m_factory.getLogger().log(Logger.ERROR, "[" + m_name + "] 
createInstance -> Cannot invoke the constructor method (illegal target) : " + 
e.getTargetException().getMessage());
             e.printStackTrace();
             stop();
         } catch (NoSuchMethodException e) {
@@ -785,6 +785,15 @@
     public void reconfigure(Dictionary configuration) {
         for (int i = 0; i < m_handlers.length; i++) {
             m_handlers[i].getHandler().reconfigure(configuration);
+        }
+        if (m_state == INVALID) {
+            // Try to revalidate the instance ofter reconfiguration
+            for (int i = 0; i < m_handlers.length; i++) {
+                if (m_handlers[i].getState() != VALID) {
+                    return;
+                }
+            }
+            setState(VALID);
         }
     }
 

Modified: 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurableProperty.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurableProperty.java?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurableProperty.java
 (original)
+++ 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/configuration/ConfigurableProperty.java
 Tue Oct 30 03:38:44 2007
@@ -22,6 +22,7 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 
+import org.apache.felix.ipojo.ComponentInstance;
 import org.apache.felix.ipojo.ConfigurationException;
 import org.apache.felix.ipojo.parser.ParseUtils;
 import org.apache.felix.ipojo.util.Callback;
@@ -94,6 +95,8 @@
 
         if (value != null) {
             setValue(value, type);
+        } else {
+            setType(type);
         }
 
         if (method != null) {
@@ -101,12 +104,123 @@
         }
 
     }
+    
+    /**
+     * The set type method fix the property type according to the given type 
name.
+     * @param type : the type name
+     * @throws ConfigurationException if an error occurs when loading the type 
class for non-primitive types.
+     */
+    private void setType(String type) throws ConfigurationException {
+     // Syntactic sugar to avoid writing java.lang.String
+        if ("string".equals(type) || "String".equals(type)) {
+            m_type = java.lang.String.class;
+            return;
+        }
+        if (type.equals("boolean")) {
+            m_type = Boolean.TYPE;
+            return;
+        }
+        if ("byte".equals(type)) {
+            m_type = Byte.TYPE;
+            return;
+        }
+        if ("short".equals(type)) {
+            m_type = Short.TYPE;
+            return;
+        }
+        if ("int".equals(type)) {
+            m_type = Integer.TYPE;
+            return;
+        }
+        if ("long".equals(type)) {
+            m_type = Long.TYPE;
+            return;
+        }
+        if ("float".equals(type)) {
+            m_type = Float.TYPE;
+            return;
+        }
+        if ("double".equals(type)) {
+            m_type = Double.TYPE;
+            return;
+        }
+        if ("char".equals(type)) {
+            m_type = Character.TYPE;
+            return;
+        }
+
+        // Array :
+        if (type.endsWith("[]")) {
+            String internalType = type.substring(0, type.length() - 2);
+            if ("string".equals(internalType) || 
"String".equals(internalType)) {
+                m_type = new String[0].getClass();
+                return;
+            }
+            if ("boolean".equals(internalType)) {
+                m_type = new boolean[0].getClass();
+                return;
+            }
+            if ("byte".equals(internalType)) {
+                m_type = new byte[0].getClass();
+                return;
+            }
+            if ("short".equals(internalType)) {
+                m_type = new short[0].getClass();
+                return;
+            }
+            if ("int".equals(internalType)) {
+                m_type = new int[0].getClass();
+                return;
+            }
+            if ("long".equals(internalType)) {
+                m_type = new long[0].getClass();
+                return;
+            }
+            if ("float".equals(internalType)) {
+                m_type = new float[0].getClass();
+                return;
+            }
+            if ("double".equals(internalType)) {
+                m_type = new double[0].getClass();
+                return;
+            }
+            if ("char".equals(internalType)) {
+                m_type = new char[0].getClass();
+                return;
+            }
+
+            // Complex array type.
+            try {
+                Class c = 
m_handler.getInstanceManager().getContext().getBundle().loadClass(internalType);
+                Object[] ob = (Object[]) Array.newInstance(c, 0);
+                m_type = ob.getClass();
+                return;
+            } catch (ClassNotFoundException e) {
+                throw new ConfigurationException("Class not found exception in 
setValue on " + internalType);
+            } catch (SecurityException e) {
+                throw new ConfigurationException("Secutiry Exception in 
setValue on " + internalType);
+            } catch (IllegalArgumentException e) {
+                throw new ConfigurationException("Argument problem to call the 
constructor of the type " + internalType);
+            }
+        }
+        
+        // Non array, complex type.
+        try {
+            m_type = 
m_handler.getInstanceManager().getContext().getBundle().loadClass(type);
+        } catch (ClassNotFoundException e) {
+            throw new ConfigurationException("Class not found exception in 
setValue on " + type + " : " + e.getMessage());
+        } catch (SecurityException e) {
+            throw new ConfigurationException("Security excption in setValue on 
" + type + " : " + e.getMessage());
+        } catch (IllegalArgumentException e) {
+            throw new ConfigurationException("Argument problem to call the 
constructor of the type " + type);
+        }
+    }
 
     /**
      * Set the value of the property.
      * @param strValue : value of the property (String)
      * @param type : type of the property
-     * @throws ConfigurationException  : occurs when the property value cannot 
be initialized.
+     * @throws ConfigurationException : occurs when the property value cannot 
be initialized.
      */
     private void setValue(String strValue, String type) throws 
ConfigurationException {
         Object value = null;
@@ -176,7 +290,7 @@
             } catch (IllegalAccessException e) {
                 throw new ConfigurationException("Illegal Access " + type);
             } catch (InvocationTargetException e) {
-                throw new ConfigurationException("Invocation problem " + type);
+                throw new ConfigurationException("Invocation problem " + type 
+ " : " + e.getTargetException().getMessage());
             }
         }
 
@@ -299,7 +413,7 @@
         } catch (IllegalAccessException e) {
             throw new ConfigurationException("Illegal Access Exception in  " + 
internalType);
         } catch (InvocationTargetException e) {
-            throw new ConfigurationException("Invocation problem " + 
internalType);
+            throw new ConfigurationException("Invocation problem " + 
internalType + " : " + e.getTargetException().getMessage());
         }
     }
 
@@ -342,7 +456,6 @@
 
     /**
      * Fix the value of the property.
-     * 
      * @param value : the new value.
      */
     public void setValue(Object value) {
@@ -363,8 +476,8 @@
             m_handler.log(Logger.ERROR, "The method " + m_method + " is not 
accessible in the class " + m_handler.getInstanceManager().getClassName());
             m_handler.getInstanceManager().stop();
         } catch (InvocationTargetException e) {
-            m_handler.log(Logger.ERROR, "The method " + m_method + " in the 
class " + m_handler.getInstanceManager().getClassName() + "thorws an exception 
: " + e.getMessage());
-            m_handler.getInstanceManager().stop();
+            m_handler.log(Logger.ERROR, "The method " + m_method + " in the 
class " + m_handler.getInstanceManager().getClassName() + "throws an exception 
: " + e.getTargetException().getMessage());
+            m_handler.getInstanceManager().setState(ComponentInstance.INVALID);
         }
     }
 
@@ -384,8 +497,8 @@
             
m_handler.getInstanceManager().getFactory().getLogger().log(Logger.ERROR, "The 
method " + m_method + " is not accessible in the class " + 
m_handler.getInstanceManager().getClassName());
             m_handler.getInstanceManager().stop();
         } catch (InvocationTargetException e) {
-            
m_handler.getInstanceManager().getFactory().getLogger().log(Logger.ERROR, "The 
method " + m_method + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getMessage());
-            m_handler.getInstanceManager().stop();
+            
m_handler.getInstanceManager().getFactory().getLogger().log(Logger.ERROR, "The 
method " + m_method + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getTargetException().getMessage());
+            m_handler.getInstanceManager().setState(ComponentInstance.INVALID);
         }
     }
 }

Modified: 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
 (original)
+++ 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
 Tue Oct 30 03:38:44 2007
@@ -24,6 +24,7 @@
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.felix.ipojo.ComponentInstance;
 import org.apache.felix.ipojo.IPojoContext;
 import org.apache.felix.ipojo.InstanceManager;
 import org.apache.felix.ipojo.PolicyServiceContext;
@@ -359,7 +360,7 @@
                         m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[i].getMethodName() + " is not accessible in the class " + 
m_handler.getInstanceManager().getClassName());
                         m_handler.getInstanceManager().stop();
                     } catch (InvocationTargetException e) {
-                        m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[i].getMethodName() + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getMessage());
+                        m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[i].getMethodName() + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getTargetException().getMessage());
                         m_handler.getInstanceManager().stop();
                     }
                 }
@@ -410,8 +411,8 @@
                             m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[j].getMethodName() + " is not accessible in the class " + 
m_handler.getInstanceManager().getClassName());
                             m_handler.getInstanceManager().stop();
                         } catch (InvocationTargetException e) {
-                            m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[j].getMethodName() + " in the class " + 
m_handler.getInstanceManager().getClassName() + "thorws an exception : " + 
e.getMessage());
-                            m_handler.getInstanceManager().stop();
+                            m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[j].getMethodName() + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getTargetException().getMessage());
+                            
m_handler.getInstanceManager().setState(ComponentInstance.INVALID);
                         }
                     }
                 }
@@ -431,8 +432,8 @@
                         m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[j].getMethodName() + " is not accessible in the class " + 
m_handler.getInstanceManager().getClassName());
                         m_handler.getInstanceManager().stop();
                     } catch (InvocationTargetException e) {
-                        m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[j].getMethodName() + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getMessage());
-                        m_handler.getInstanceManager().stop();
+                        m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[j].getMethodName() + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getTargetException().getMessage());
+                        
m_handler.getInstanceManager().setState(ComponentInstance.INVALID);
                     }
                 }
             }
@@ -459,8 +460,8 @@
                         m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[i].getMethodName() + " is not accessible in the class " + 
m_handler.getInstanceManager().getClassName());
                         m_handler.getInstanceManager().stop();
                     } catch (InvocationTargetException e) {
-                        m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[i].getMethodName() + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getMessage());
-                        m_handler.getInstanceManager().stop();
+                        m_handler.log(Logger.ERROR, "The method " + 
m_callbacks[i].getMethodName() + " in the class " + 
m_handler.getInstanceManager().getClassName() + "throws an exception : " + 
e.getTargetException().getMessage());
+                        
m_handler.getInstanceManager().setState(ComponentInstance.INVALID);
                     }
                 }
             }
@@ -594,7 +595,7 @@
     * @see 
org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
     */
     public boolean addingService(ServiceReference ref) {
-        if (! m_activated && m_filter.match(ref)) {
+        if (! m_activated) {
             return true;
         }
         return false;

Modified: 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyCallback.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyCallback.java?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyCallback.java
 (original)
+++ 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyCallback.java
 Tue Oct 30 03:38:44 2007
@@ -214,7 +214,6 @@
      * @throws NoSuchMethodException : the method is not found
      * @throws IllegalAccessException : the method could not be called
      * @throws InvocationTargetException : an error happens in the called 
method
-     * @throws InvocationTargetException
      */
     protected void callOnInstance(Object instance, ServiceReference ref, 
Object obj) throws NoSuchMethodException, IllegalAccessException, 
InvocationTargetException {
         if (m_methodObj == null) {

Modified: 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyHandler.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyHandler.java?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyHandler.java
 (original)
+++ 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/DependencyHandler.java
 Tue Oct 30 03:38:44 2007
@@ -330,10 +330,10 @@
             m_nullableObjects.put(dep, o);
         } catch (InstantiationException e) {
             log(Logger.ERROR, "The nullable object for " + 
dep.getSpecification() + " cannot be instantiate : " + e.getMessage());
-            getInstanceManager().stop(); 
+            getInstanceManager().setState(ComponentInstance.INVALID); 
         } catch (IllegalAccessException e) {
             log(Logger.ERROR, "The nullable object for " + 
dep.getSpecification() + " cannot be instantiate : " + e.getMessage());
-            getInstanceManager().stop();
+            getInstanceManager().setState(ComponentInstance.INVALID);
         }
     }
 
@@ -354,14 +354,14 @@
             } catch (ClassNotFoundException e) {
                 // A default-implementation class cannot be loaded
                 log(Logger.ERROR, "The default-implementation class " + obj + 
" cannot be loaded : " + e.getMessage());
-                getInstanceManager().stop();
+                getInstanceManager().setState(ComponentInstance.INVALID);
                 return null;
             } catch (InstantiationException e) {
                 log(Logger.ERROR, "The default-implementation class " + obj + 
" cannot be instantiated : " + e.getMessage());
-                getInstanceManager().stop();
+                getInstanceManager().setState(ComponentInstance.INVALID);
             } catch (IllegalAccessException e) {
                 log(Logger.ERROR, "The default-implementation class " + obj + 
" cannot be instantiated : " + e.getMessage());
-                getInstanceManager().stop();
+                getInstanceManager().setState(ComponentInstance.INVALID);
             }
             return null;
         } else {

Modified: 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/lifecycle/callback/LifecycleCallbackHandler.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/lifecycle/callback/LifecycleCallbackHandler.java?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/lifecycle/callback/LifecycleCallbackHandler.java
 (original)
+++ 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/lifecycle/callback/LifecycleCallbackHandler.java
 Tue Oct 30 03:38:44 2007
@@ -168,8 +168,8 @@
                     log(Logger.ERROR, "[" + 
getInstanceManager().getInstanceName() + "] The callback method " + 
m_callbacks[i].getMethod() + " is not accessible", e);
                     getInstanceManager().stop();
                 } catch (InvocationTargetException e) {
-                    log(Logger.ERROR, "[" + 
getInstanceManager().getInstanceName() + "] The callback method " + 
m_callbacks[i].getMethod() + " has throws an exception : " + e.getMessage());
-                    getInstanceManager().stop();
+                    log(Logger.ERROR, "[" + 
getInstanceManager().getInstanceName() + "] The callback method " + 
m_callbacks[i].getMethod() + " has throws an exception : " + 
e.getTargetException().getMessage());
+                    getInstanceManager().setState(ComponentInstance.INVALID);
                 }
             }
         }

Modified: 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/Property.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/Property.java?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/Property.java
 (original)
+++ 
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/Property.java
 Tue Oct 30 03:38:44 2007
@@ -22,6 +22,7 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 
+import org.apache.felix.ipojo.ComponentInstance;
 import org.apache.felix.ipojo.parser.ParseUtils;
 import org.apache.felix.ipojo.util.Logger;
 
@@ -218,8 +219,8 @@
             
m_providedService.getInstanceManager().getFactory().getLogger().log(Logger.ERROR,
 "Illegal Access Exception in setValue on " + m_type);
             m_providedService.getInstanceManager().stop();
         } catch (InvocationTargetException e) {
-            
m_providedService.getInstanceManager().getFactory().getLogger().log(Logger.ERROR,
 "Invocation problem " + m_type);
-            m_providedService.getInstanceManager().stop();
+            
m_providedService.getInstanceManager().getFactory().getLogger().log(Logger.ERROR,
 "Invocation problem " + m_type + " : " + e.getTargetException().getMessage());
+            
m_providedService.getInstanceManager().setState(ComponentInstance.INVALID);
         }
     }
 
@@ -321,8 +322,8 @@
             
m_providedService.getInstanceManager().getFactory().getLogger().log(Logger.ERROR,
 "Illegal Access Exception in setArrayValue on " + internalType);
             m_providedService.getInstanceManager().stop();
         } catch (InvocationTargetException e) {
-            
m_providedService.getInstanceManager().getFactory().getLogger().log(Logger.ERROR,
 "Invocation problem " + internalType);
-            m_providedService.getInstanceManager().stop();
+            
m_providedService.getInstanceManager().getFactory().getLogger().log(Logger.ERROR,
 "Invocation problem " + internalType + " : " + 
e.getTargetException().getMessage());
+            
m_providedService.getInstanceManager().setState(ComponentInstance.INVALID);
         }
     }
 

Modified: felix/trunk/ipojo/plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/plugin/pom.xml?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- felix/trunk/ipojo/plugin/pom.xml (original)
+++ felix/trunk/ipojo/plugin/pom.xml Tue Oct 30 03:38:44 2007
@@ -6,7 +6,6 @@
     <relativePath>../../pom/pom.xml</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <!-- <artifactId>org.apache.felix.ipojo.plugin</artifactId>  -->
   <artifactId>maven-ipojo-plugin</artifactId>
   <version>0.7.5-SNAPSHOT</version>
   <name>Apache Felix iPOJO Maven Plugin</name>
@@ -40,7 +39,7 @@
     <dependency>
       <groupId>${pom.groupId}</groupId>
       <artifactId>org.apache.felix.ipojo.metadata</artifactId>
-      <version>${pom.version}</version>
+      <version>0.7.5-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>${pom.groupId}</groupId>

Modified: 
felix/trunk/ipojo/plugin/src/main/resources/archetype-resources/pom.xml
URL: 
http://svn.apache.org/viewvc/felix/trunk/ipojo/plugin/src/main/resources/archetype-resources/pom.xml?rev=590028&r1=590027&r2=590028&view=diff
==============================================================================
--- felix/trunk/ipojo/plugin/src/main/resources/archetype-resources/pom.xml 
(original)
+++ felix/trunk/ipojo/plugin/src/main/resources/archetype-resources/pom.xml Tue 
Oct 30 03:38:44 2007
@@ -6,6 +6,22 @@
   <version>${version}</version>
   <name>$YOUR_PROJECT_NAME</name>
   
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.snapshots</id>
+      <name>snapshot plugins</name>
+      <url>
+        http://people.apache.org/repo/m2-snapshot-repository
+      </url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+  
   <build>
     <plugins>
       <plugin>


Reply via email to