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 2015/02/14 14:32:58 UTC

[5/5] camel git commit: CAMEL-8354: Bean component - Should not support consumer

CAMEL-8354: Bean component - Should not support consumer


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/279e604f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/279e604f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/279e604f

Branch: refs/heads/master
Commit: 279e604fe20cf888aaf67ae86e5d196113e4d625
Parents: 3d7fba1
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Feb 14 12:12:12 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Feb 14 12:12:12 2015 +0100

----------------------------------------------------------------------
 components/camel-ejb/pom.xml                                 | 6 ++++++
 .../java/org/apache/camel/component/ejb/EjbComponent.java    | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/279e604f/components/camel-ejb/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-ejb/pom.xml b/components/camel-ejb/pom.xml
index c9269bc..a63e4cb 100644
--- a/components/camel-ejb/pom.xml
+++ b/components/camel-ejb/pom.xml
@@ -47,6 +47,12 @@
           <artifactId>openejb-core</artifactId>
           <version>${openejb-version}</version>
           <scope>test</scope>
+          <exclusions>
+            <exclusion>
+              <groupId>org.slf4j</groupId>
+              <artifactId>slf4j-jdk14</artifactId>
+            </exclusion>
+          </exclusions>
         </dependency>
         <dependency>
           <groupId>org.apache.camel</groupId>

http://git-wip-us.apache.org/repos/asf/camel/blob/279e604f/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java b/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java
index d7375f5..0a06900 100644
--- a/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java
+++ b/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java
@@ -23,8 +23,8 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.Processor;
 import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.component.bean.BeanHolder;
 import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.spi.Registry;
 
@@ -49,10 +49,10 @@ public class EjbComponent extends BeanComponent {
 
         // plugin registry to lookup in jndi for the EJBs
         Registry registry = new JndiRegistry(getContext());
-        answer.setBeanHolder(new EjbRegistryBean(registry, getCamelContext(), answer.getBeanName()));
+        // and register the bean as a holder on the endpoint
+        BeanHolder holder = new EjbRegistryBean(registry, getCamelContext(), answer.getBeanName());
+        answer.setBeanHolder(holder);
 
-        Processor processor = answer.getProcessor();
-        setProperties(processor, parameters);
         return answer;
     }