simply try this in your ide (no maven, no fuse-ide). If you can
reproduce this, your routes should work as well...
The test class:
public class TestBean extends CamelSpringTestSupport {
@EndpointInject(uri = "mock://out")
private MockEndpoint out;
@Override
protected AbstractApplicationContext createApplicationContext() {
return new
ClassPathXmlApplicationContext("/META-INF/spring/camel-context.xml");
}
@Test
public void testBean() throws InterruptedException{
out.expectedMessageCount(1);
template.sendBody("direct://start", "foo");
assertMockEndpointsSatisfied(5000, TimeUnit.MILLISECONDS);
}
}
the bean:
public class Hello {
public String sayHello(String in){
return "hello " + in;
}
}
the context:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<bean id="hello" class="Hello" />
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:start" />
<bean method="sayHello" ref="hello" />
<log message="request generated" />
<to uri="mock://out" />
</route>
</camelContext>
</beans>
On 15.06.2011 16:14, Andrè wrote:
yeah the fuse-ide...
but still the same, hm maybe my maven is doing something...
--
View this message in context:
http://camel.465427.n5.nabble.com/what-did-i-forgot-Bean-integration-through-direct-start-tp4490510p4491358.html
Sent from the Camel - Users mailing list archive at Nabble.com.