Hi all, I am trying to use RSS and EJB components together, inside new JBoss 7.1. I want the RSS component to consume some data from a real rss location and call an EJB with this data (using the EJB component).
I have written 2 different routes that both of them call the same EJB, using its "name" value [@Stateless(name="MyEJBServiceImplName")]. 1) SimpleRoute1: from("direct:myroute1").log("I got: ${body}").to("ejb:java:module/MyEJBServiceImplName?method=echo"); 2) PollRoute2: from("rss:http://sample.com/feed/?consumer.delay=30000").log("I got: ${body}").to("ejb:java:module/MyEJBServiceImplName?method=echo"); Both Camel context and EJB are in the same WAR. As you can see both Routes try to call the same EJB. I trigger SimpleRoute1, within another EJB, using the following code: myCamelContext.createProducerTemplate().requestBody("direct:myroute1", msg); This works and my "MyEJBServiceImplName" is called successfully. The PollRoute2 is triggered by itself as RSS component extends "ScheduledPollConsumer". This route fails with the following exception: org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: java:module/MyEJBServiceImplName When SimpleRoute1 is invoked by another EJB, the JNDI Context contains the EJB that I want to call. But when PollRoute2 triggered, the JNDI Context does not contain the same EJB. Both Routes and both EJBs are in the same WAR file. The difference is that the first time the method "org.apache.camel.impl.JndiRegistry.createContext()" returns a JNDI Context that contains all the EJB of the WAR, but on the PollRoute2 case, the same method returns another Context that does NOT contain any EJB of the WAR. Do you have any idea why is this happening? The only thing that I suspect is the JBoss Modules, which have changed the Classloading procedure in JBoss. Notes: The prefix "java:module/" before EJB name (" java:module/MyEJBServiceImplName") is correct. This is how JBoss works. Environment: JDK: HotSpot 1.6.0_26 Camel: 2.9 JBoss AS: 7.1 OS: GNU/Linux Debian wheezy Thanks in advance, Adrianos Dadis. -- Democracy requires Free Software -- View this message in context: http://camel.465427.n5.nabble.com/EJB-and-RSS-Component-in-JBoss-7-tp5583762p5583762.html Sent from the Camel - Users mailing list archive at Nabble.com.