You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Tim Dudgeon <td...@gmail.com> on 2015/06/25 13:40:49 UTC
route specification in web.xml
I was trying to get some servlets working, based on the
camel-example-servlet-tomcat-no-spring example.
I'm a bit confused by this section:
<context-param>
<param-name>routeBuilder-MyRoute</param-name>
<!-- define the routes as a resource from the classpath by
prefixing the value with classpath: -->
<!-- note: instead of using a XML file we can also define the
routes in Java code in a RouteBuilder class -->
<param-value>classpath:camel-config.xml</param-value>
</context-param>
I worked out by trial and error how to specify an individual
RouteBuilder implementation as a Java class:
<param-value>foo.bar.bazMyRouteBuilderClass</param-value>
and how to do a package scan for multiple RouteBuilders:
<param-value>packagescan:foo.bar.baz</param-value>
But is there and more detailed information on this sort of thing anywhere?
For instance, what other options are available here, and if you needed
to run multiple camel contexts (separate servlets?) how could you do this.
Thanks
Tim
RE: route specification in web.xml
Posted by Hans Orbaan <ha...@docdata.eu>.
Hi,
Apparently all code snippets on camel.apache.org are invisible at the moment. I think it is a syntax highlighter issue.
You can still look up the code in the page source. Just right click and view page source
-----Oorspronkelijk bericht-----
Van: Tim Dudgeon [mailto:tdudgeon.ml@gmail.com]
Verzonden: Sunday 28 June 2015 11:43
Aan: users@camel.apache.org
Onderwerp: Re: route specification in web.xml
Thanks. That's what I need.
But are you aware that all the code snippets are missing from that page?
Tim
On 27/06/2015 09:30, Claus Ibsen wrote:
> Hi
>
> Yes there is more documentation here
> http://camel.apache.org/servletlistener-component.html
>
> On Thu, Jun 25, 2015 at 1:40 PM, Tim Dudgeon <td...@gmail.com> wrote:
>> I was trying to get some servlets working, based on the
>> camel-example-servlet-tomcat-no-spring example.
>>
>> I'm a bit confused by this section:
>>
>> <context-param>
>> <param-name>routeBuilder-MyRoute</param-name>
>> <!-- define the routes as a resource from the classpath by
>> prefixing the value with classpath: -->
>> <!-- note: instead of using a XML file we can also define the
>> routes in Java code in a RouteBuilder class -->
>> <param-value>classpath:camel-config.xml</param-value>
>> </context-param>
>>
>> I worked out by trial and error how to specify an individual
>> RouteBuilder implementation as a Java class:
>> <param-value>foo.bar.bazMyRouteBuilderClass</param-value>
>>
>> and how to do a package scan for multiple RouteBuilders:
>> <param-value>packagescan:foo.bar.baz</param-value>
>>
>> But is there and more detailed information on this sort of thing anywhere?
>>
>> For instance, what other options are available here, and if you
>> needed to run multiple camel contexts (separate servlets?) how could you do this.
>>
>> Thanks
>> Tim
>
>
Re: route specification in web.xml
Posted by Tim Dudgeon <td...@gmail.com>.
Thanks. That's what I need.
But are you aware that all the code snippets are missing from that page?
Tim
On 27/06/2015 09:30, Claus Ibsen wrote:
> Hi
>
> Yes there is more documentation here
> http://camel.apache.org/servletlistener-component.html
>
> On Thu, Jun 25, 2015 at 1:40 PM, Tim Dudgeon <td...@gmail.com> wrote:
>> I was trying to get some servlets working, based on the
>> camel-example-servlet-tomcat-no-spring example.
>>
>> I'm a bit confused by this section:
>>
>> <context-param>
>> <param-name>routeBuilder-MyRoute</param-name>
>> <!-- define the routes as a resource from the classpath by prefixing the
>> value with classpath: -->
>> <!-- note: instead of using a XML file we can also define the routes in
>> Java code in a RouteBuilder class -->
>> <param-value>classpath:camel-config.xml</param-value>
>> </context-param>
>>
>> I worked out by trial and error how to specify an individual RouteBuilder
>> implementation as a Java class:
>> <param-value>foo.bar.bazMyRouteBuilderClass</param-value>
>>
>> and how to do a package scan for multiple RouteBuilders:
>> <param-value>packagescan:foo.bar.baz</param-value>
>>
>> But is there and more detailed information on this sort of thing anywhere?
>>
>> For instance, what other options are available here, and if you needed to
>> run multiple camel contexts (separate servlets?) how could you do this.
>>
>> Thanks
>> Tim
>
>
Re: route specification in web.xml
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yes there is more documentation here
http://camel.apache.org/servletlistener-component.html
On Thu, Jun 25, 2015 at 1:40 PM, Tim Dudgeon <td...@gmail.com> wrote:
> I was trying to get some servlets working, based on the
> camel-example-servlet-tomcat-no-spring example.
>
> I'm a bit confused by this section:
>
> <context-param>
> <param-name>routeBuilder-MyRoute</param-name>
> <!-- define the routes as a resource from the classpath by prefixing the
> value with classpath: -->
> <!-- note: instead of using a XML file we can also define the routes in
> Java code in a RouteBuilder class -->
> <param-value>classpath:camel-config.xml</param-value>
> </context-param>
>
> I worked out by trial and error how to specify an individual RouteBuilder
> implementation as a Java class:
> <param-value>foo.bar.bazMyRouteBuilderClass</param-value>
>
> and how to do a package scan for multiple RouteBuilders:
> <param-value>packagescan:foo.bar.baz</param-value>
>
> But is there and more detailed information on this sort of thing anywhere?
>
> For instance, what other options are available here, and if you needed to
> run multiple camel contexts (separate servlets?) how could you do this.
>
> Thanks
> Tim
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/