You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by uprooter <up...@gmail.com> on 2009/10/06 14:51:10 UTC

human friendliness of camel

Hello.
I have some thoughts on how to design my camel based application.
Basically it has to do JMS mediation most of the time, I want to stick to
java code rather than XML configuration so I have a bunch of routes written
in java DSL.

Right now I have one or two RouteBuilders, each holding a bunch of routes.
but it's not comfortable to work with as the IDE(netbeans in that case)
cannot distinguish between routes.
Is there another way to split the routes into classes or have some other way
to make things more organized for the human reader ?

PS I tried to create a graph using camel-dot however it doesn't seems to
work with java DSL. 

-- 
View this message in context: http://www.nabble.com/human-friendliness-of-camel-tp25768104p25768104.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: human friendliness of camel

Posted by Willem Jiang <wi...@gmail.com>.
<camelContext> also supports to find the router within the package.
Here is an example:

<camelContext xmlns="http://camel.apache.org/schema/spring">
         <packageScan>
             <package>org.apache.camel.spring.config.scan</package>
             <excludes>**/*Excluded*</excludes>
             <includes>**/*</includes>
         </packageScan>
</camelContext>

Willem

Jon Anstey wrote:
> I know lately I've been designing most of my Camel apps using a combination
> of Spring configuration and Java RouteBuilder classes... something like
> 
> <bean id="myrouter1" class="com.mycompany.MyRouteBuilder1"/>
> <bean id="myrouter2" class="com.mycompany.MyRouteBuilder1"/>
> ...
> 
>     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>        <routeBuilder ref="myrouter1"/>
>        <routeBuilder ref="myrouter2"/>
>     </camelContext>
> 
> Which keeps things nice and separated.
> 
> Also, if visualization is something you are looking for, the FUSE
> Integration Designer lets you create routes visually
> http://fusesource.com/products/fuse-integration-designer/
> 
> 
> On Tue, Oct 6, 2009 at 11:28 AM, Bruno Borges <br...@gmail.com>wrote:
> 
>> I don't know how to do this exactly, but what the maven goal does is to
>> start Spring Context, that starts Camel Context, and then process the
>> routes
>> built by the XML configuration file. If you do something through Spring, to
>> load the routes written in Java, you can achieve the same thing.
>>
>> For your organization, I believe it depends on your design. Specific
>> RouteBuilders for specific routes. Global RouteBuilders for macro routes
>> that interconnect those specific routes. Anyway, the good thing of DSL in
>> Java/Scala is that you can design the way you think is more appropriate,
>> though in XML the same can be done.
>>
>> Cheers,
>> Bruno Borges
>> blog.brunoborges.com.br
>> +55 21 76727099
>>
>> "The glory of great men should always be
>> measured by the means they have used to
>> acquire it."
>> - Francois de La Rochefoucauld
>>
>>
>> On Tue, Oct 6, 2009 at 9:51 AM, uprooter <up...@gmail.com> wrote:
>>
>>> Hello.
>>> I have some thoughts on how to design my camel based application.
>>> Basically it has to do JMS mediation most of the time, I want to stick to
>>> java code rather than XML configuration so I have a bunch of routes
>> written
>>> in java DSL.
>>>
>>> Right now I have one or two RouteBuilders, each holding a bunch of
>> routes.
>>> but it's not comfortable to work with as the IDE(netbeans in that case)
>>> cannot distinguish between routes.
>>> Is there another way to split the routes into classes or have some other
>>> way
>>> to make things more organized for the human reader ?
>>>
>>> PS I tried to create a graph using camel-dot however it doesn't seems to
>>> work with java DSL.
>>>
>>> --
>>> View this message in context:
>>>
>> http://www.nabble.com/human-friendliness-of-camel-tp25768104p25768104.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
> 
> 
> 


Re: human friendliness of camel

Posted by Jon Anstey <ja...@gmail.com>.
I know lately I've been designing most of my Camel apps using a combination
of Spring configuration and Java RouteBuilder classes... something like

<bean id="myrouter1" class="com.mycompany.MyRouteBuilder1"/>
<bean id="myrouter2" class="com.mycompany.MyRouteBuilder1"/>
...

    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
       <routeBuilder ref="myrouter1"/>
       <routeBuilder ref="myrouter2"/>
    </camelContext>

Which keeps things nice and separated.

Also, if visualization is something you are looking for, the FUSE
Integration Designer lets you create routes visually
http://fusesource.com/products/fuse-integration-designer/


On Tue, Oct 6, 2009 at 11:28 AM, Bruno Borges <br...@gmail.com>wrote:

> I don't know how to do this exactly, but what the maven goal does is to
> start Spring Context, that starts Camel Context, and then process the
> routes
> built by the XML configuration file. If you do something through Spring, to
> load the routes written in Java, you can achieve the same thing.
>
> For your organization, I believe it depends on your design. Specific
> RouteBuilders for specific routes. Global RouteBuilders for macro routes
> that interconnect those specific routes. Anyway, the good thing of DSL in
> Java/Scala is that you can design the way you think is more appropriate,
> though in XML the same can be done.
>
> Cheers,
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
>
>
> On Tue, Oct 6, 2009 at 9:51 AM, uprooter <up...@gmail.com> wrote:
>
> >
> > Hello.
> > I have some thoughts on how to design my camel based application.
> > Basically it has to do JMS mediation most of the time, I want to stick to
> > java code rather than XML configuration so I have a bunch of routes
> written
> > in java DSL.
> >
> > Right now I have one or two RouteBuilders, each holding a bunch of
> routes.
> > but it's not comfortable to work with as the IDE(netbeans in that case)
> > cannot distinguish between routes.
> > Is there another way to split the routes into classes or have some other
> > way
> > to make things more organized for the human reader ?
> >
> > PS I tried to create a graph using camel-dot however it doesn't seems to
> > work with java DSL.
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/human-friendliness-of-camel-tp25768104p25768104.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
>



-- 
Cheers,
Jon

http://janstey.blogspot.com/

Re: human friendliness of camel

Posted by Bruno Borges <br...@gmail.com>.
I don't know how to do this exactly, but what the maven goal does is to
start Spring Context, that starts Camel Context, and then process the routes
built by the XML configuration file. If you do something through Spring, to
load the routes written in Java, you can achieve the same thing.

For your organization, I believe it depends on your design. Specific
RouteBuilders for specific routes. Global RouteBuilders for macro routes
that interconnect those specific routes. Anyway, the good thing of DSL in
Java/Scala is that you can design the way you think is more appropriate,
though in XML the same can be done.

Cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Tue, Oct 6, 2009 at 9:51 AM, uprooter <up...@gmail.com> wrote:

>
> Hello.
> I have some thoughts on how to design my camel based application.
> Basically it has to do JMS mediation most of the time, I want to stick to
> java code rather than XML configuration so I have a bunch of routes written
> in java DSL.
>
> Right now I have one or two RouteBuilders, each holding a bunch of routes.
> but it's not comfortable to work with as the IDE(netbeans in that case)
> cannot distinguish between routes.
> Is there another way to split the routes into classes or have some other
> way
> to make things more organized for the human reader ?
>
> PS I tried to create a graph using camel-dot however it doesn't seems to
> work with java DSL.
>
> --
> View this message in context:
> http://www.nabble.com/human-friendliness-of-camel-tp25768104p25768104.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>