incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r881797 - /incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
Date Wed, 18 Nov 2009 15:13:44 GMT
Author: ozzy
Date: Wed Nov 18 15:13:44 2009
New Revision: 881797

URL: http://svn.apache.org/viewvc?rev=881797&view=rev
Log:
ARIES-48 Correct the destroy logic for BeanRecipe to invoke BeanProcessor. 

Modified:
    incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java

Modified: incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java?rev=881797&r1=881796&r2=881797&view=diff
==============================================================================
--- incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
(original)
+++ incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
Wed Nov 18 15:13:44 2009
@@ -659,7 +659,8 @@
         return obj;
     }
     
-    public void destroyInstance(Object obj) {
+    @Override
+    public void destroy(Object obj) {
         for (BeanProcessor processor : blueprintContainer.getProcessors(BeanProcessor.class))
{
             processor.beforeDestroy(obj, getName());
         }
@@ -676,18 +677,6 @@
         }
     }
 
-    @Override
-    public void destroy(Object instance) {
-        Method method = getDestroyMethod(instance);
-        if (method != null) {
-            try {
-                invoke(method, instance, (Object[]) null);
-            } catch (Throwable e) {
-                LOGGER.info("Error destroying bean " + getName(), getRealCause(e));
-            }
-        }
-    }
-
     public void setProperties(Object instance) throws ComponentDefinitionException {
         // clone the properties so they can be used again
         Map<String,Object> propertyValues = new LinkedHashMap<String,Object>(properties);



Mime
View raw message