camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jason.parr" <>
Subject Stubbing jms with an inprocess transport when using CamelTestSupport
Date Wed, 10 Aug 2011 08:36:56 GMT

I want to test my 'production' route unchanged using CamelTestSupport.

As show in the doco I stub out jms component with an inprocess trasnport say

  protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();
    context.addComponent("jms", context.getComponent("seda"));

This works fine until any of my jms endpoints in the 'production' route have
jms specific parameter, e.g.


When I run my test I now get:

org.apache.camel.FailedToCreateRouteException: ... There are 1 parameters
that couldn't be set on the endpoint. Check the uri if the parameters are
spelt correctly and that they are properties of the endpoint. Unknown

What's the best way of replacing jms with an inprocess transport without
having to change the original route?

In my test I add an extra a file endpoint to play messages into the original
route, which seems to work fine.

  protected RouteBuilder createRouteBuilder() throws Exception {
    return new RadialRouteBuilder() {
      public void configure() {



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message