servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r641068 - /servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
Date Tue, 25 Mar 2008 23:04:05 GMT
Author: gnodet
Date: Tue Mar 25 16:03:59 2008
New Revision: 641068

URL: http://svn.apache.org/viewvc?rev=641068&view=rev
Log:
SM-1136: PreDestroy being called for each exchange when it's not configured that way

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java?rev=641068&r1=641067&r2=641068&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-bean/src/main/java/org/apache/servicemix/bean/BeanEndpoint.java
Tue Mar 25 16:03:59 2008
@@ -405,7 +405,10 @@
 
     protected void checkEndOfRequest(Request request, Object corId) {
         if (request.getExchange().getStatus() != ExchangeStatus.ACTIVE) {
-            ReflectionUtils.callLifecycleMethod(request.getBean(), PreDestroy.class);
+            Object beanFromRequest = request.getBean();
+            if (beanFromRequest != bean) {
+                ReflectionUtils.callLifecycleMethod(beanFromRequest, PreDestroy.class);
+            }
             //request.setBean(null);
             //request.setExchange(null);
             requests.remove(corId);



Mime
View raw message