felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r531477 - in /incubator/felix/trunk/ipojo: ./ src/main/java/org/apache/felix/ipojo/InstanceCreator.java src/main/java/org/apache/felix/ipojo/architecture/ComponentDescription.java
Date Mon, 23 Apr 2007 14:19:20 GMT
Author: rickhall
Date: Mon Apr 23 07:19:17 2007
New Revision: 531477

URL: http://svn.apache.org/viewvc?view=rev&rev=531477
Log:
Applied patch (FELIX-273) to correctly dispose created component 
instances once a factory goes away.

Modified:
    incubator/felix/trunk/ipojo/   (props changed)
    incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/InstanceCreator.java
    incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/architecture/ComponentDescription.java

Propchange: incubator/felix/trunk/ipojo/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Apr 23 07:19:17 2007
@@ -14,4 +14,4 @@
 .settings
 .wtpmodules
 .deployables
-
+.checkstyle

Modified: incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/InstanceCreator.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/InstanceCreator.java?view=diff&rev=531477&r1=531476&r2=531477
==============================================================================
--- incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/InstanceCreator.java
(original)
+++ incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/InstanceCreator.java
Mon Apr 23 07:19:17 2007
@@ -218,7 +218,7 @@
         m_context.removeServiceListener(this);
         for (int i = 0; i < m_configurations.length; i++) {
             if (m_configurations[i].getInstance() != null) {
-                m_configurations[i].getInstance().stop();
+                m_configurations[i].getInstance().dispose();
             }
             m_configurations[i].setInstance(null);
             m_configurations[i].setFactory(null);

Modified: incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/architecture/ComponentDescription.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/architecture/ComponentDescription.java?view=diff&rev=531477&r1=531476&r2=531477
==============================================================================
--- incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/architecture/ComponentDescription.java
(original)
+++ incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/architecture/ComponentDescription.java
Mon Apr 23 07:19:17 2007
@@ -109,6 +109,10 @@
      * @param pd : the property to add
      */
     public void addProperty(PropertyDescription pd) {
+        if (pd.getName().equals("name")) {
+            pd = new PropertyDescription(pd.getName(), pd.getType(), null); // Erase the
instance name
+        }
+        
         for (int i = 0; i < m_properties.length; i++) {
             if (m_properties[i].getName().equals(pd.getName())) {
                 return;



Mime
View raw message