Thank you Claus.
For others, I added the route the builder in spring XML:

  <camelContext id="camel5" xmlns="http://camel.apache.org/schema/spring";>
    <routeBuilder ref="myBuilder" />
  </camelContext>

  <bean id="myBuilder"
class="org.apache.camel.spring.example.test1.MyRouteBuilder"/>
</beans>


It is working now :)



On Fri, Apr 24, 2015 at 12:26 PM, Claus Ibsen <[email protected]> wrote:
> Hi
>
> See this page how to use spring and java routes together
> http://camel.apache.org/spring.html
>
> On Fri, Apr 24, 2015 at 10:17 AM, Mansour Al Akeel
> <[email protected]> wrote:
>> Hello,
>>
>> I am creating a small prototype project, that needs to access the DB.
>> I am using fluent API to add routes in the Main method. How can I
>> define the JDBC connection properties in XML, and at the sametime use
>> fluent API to add routes ??
>>
>> In order to use and load Spring XML, I need to use
>> org.apache.camel.spring.Main class. However to add routes from fluent,
>> I have to use org.apache.camel.main.Main.
>>
>> The method in org.apache.camel.spring.Main.addRouteBuilder does not
>> seem to work from Fluent.
>>
>>
>> Any idea, how I can define routes in both XML and java ??
>>
>> Thank you.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [email protected]
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/

Reply via email to