camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Multiple camel contexts/Unit Testing/DOT graph generation and General Strategy for
Date Fri, 07 Mar 2008 17:46:59 GMT
On 06/03/2008, Kevin Ross <kevin.ross@metova.com> wrote:
> So I'm working my way through camel, implementing our necessary routes and
>  processors to solve our workflow needs.
>
>  For each route I build, I have been creating a different <camelContext> to
>  the same file with a unique id named appropriately for the purpose.  So far,
>  I have done this so I may easily unit test the results of each route and it
>  has worked well.
>
>  As my routes get more and more complex, I was interested in seeing the
>  generated DOT graph.
>
>  Copying the IntegrationTest.java from the camel-spring tests, I attempted to
>  use the following line:
>
>  Main.main( "-a", DEFAULT_CAMEL_CONTEXT_RESOURCE_PATH, "-duration", "4s",
>  "-o", "target" );
>
>  Checking the generated dot file within target, I see the following content:
>
>  digraph CamelRoutes {
>
>  node [style = "rounded,filled", fillcolor = yellow,
>  fontname="Helvetica-Oblique"];
>
>  }
>
>
>  Am I missing something?  Is there any reason why having multiple contexts
>  would cause an issue?  Is this going to impact the total workflow when we
>  have completed each part?

We should create some kinda integration test to try reproduce this
problem. Having multiple CamelContext's shouldn't create a problem;
maybe there's some kinda bug in the code generating the DOT files?

What happens if you add the maven plugin and run 'mvn site' or 'mvn camel:dot'?
http://activemq.apache.org/camel/camel-maven-plugin.html

FWIW you could create, say, a RouteBuilder for each route then just
combine whatever routes you want into a CamelContext.

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message