You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/07/30 07:20:53 UTC
camel git commit: Removed unusued code
Repository: camel
Updated Branches:
refs/heads/master 560844c2c -> 1233ea02a
Removed unusued code
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1233ea02
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1233ea02
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1233ea02
Branch: refs/heads/master
Commit: 1233ea02ae4414a07b76d16b709beefbb0b1e448
Parents: 560844c
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Jul 30 09:18:51 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jul 30 09:18:51 2016 +0200
----------------------------------------------------------------------
.../camel/spring/CamelBeanPostProcessor.java | 19 -------------------
1 file changed, 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1233ea02/components/camel-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java
index 50b5ceb..9810154 100644
--- a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java
+++ b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.spring;
-import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import javax.xml.bind.annotation.XmlAccessType;
@@ -26,11 +25,9 @@ import javax.xml.bind.annotation.XmlTransient;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
-import org.apache.camel.Service;
import org.apache.camel.core.xml.CamelJMXAgentDefinition;
import org.apache.camel.impl.CamelPostProcessorHelper;
import org.apache.camel.impl.DefaultCamelBeanPostProcessor;
-import org.apache.camel.util.ServiceHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanInstantiationException;
@@ -49,8 +46,6 @@ import org.springframework.context.ApplicationContextAware;
public class CamelBeanPostProcessor implements BeanPostProcessor, ApplicationContextAware {
private static final Logger LOG = LoggerFactory.getLogger(CamelBeanPostProcessor.class);
@XmlTransient
- Set<String> prototypeBeans = new LinkedHashSet<String>();
- @XmlTransient
private CamelContext camelContext;
@XmlTransient
private ApplicationContext applicationContext;
@@ -120,20 +115,6 @@ public class CamelBeanPostProcessor implements BeanPostProcessor, ApplicationCon
return applicationContext.isSingleton(beanName);
}
}
-
- protected void startService(Service service, Object bean, String beanName) throws Exception {
- if (isSingleton(bean, beanName)) {
- getCamelContext().addService(service);
- } else {
- // only start service and do not add it to CamelContext
- ServiceHelper.startService(service);
- if (prototypeBeans.add(beanName)) {
- // do not spam the log with WARN so do this only once per bean name
- CamelBeanPostProcessor.LOG.warn("The bean with id [" + beanName + "] is prototype scoped and cannot stop the injected service when bean is destroyed: "
- + service + ". You may want to stop the service manually from the bean.");
- }
- }
- }
};
}
return camelPostProcessorHelper;