You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jay Walters <ja...@verizon.net> on 2012/11/19 20:03:42 UTC

Using Camel with Java DSL and minimal Spring

I am trying to understand if it is feasible to configure routes and things at runtime from Java rather than having to deploy a bunch of fixed xml files for spring configuration.  I can work through simple examples easy enough (say sending data through activeMQ) but am having some problem with the BAM example. if I just copy the java DSL bit the activity monitoring does not happen and I can't figure out if the routes aren't there or why it would not work.  Is there a strict dependency in BAM that requires setup in Spring?  I don't have my code with me, but the BAM bit was a cut and paste from the example and a copy of the files (invoice/purchase order) into my project.  I don't get any exceptions either which is sort of odd.

Thanks

Re: Using Camel with Java DSL and minimal Spring

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Do you have any stack trace? Did you setup the jpa persistence layer 
properly? That's the bit that is mandatory and in our example is done 
via spring (iirc).

Hadrian

On 11/19/2012 02:03 PM, Jay Walters wrote:
> I am trying to understand if it is feasible to configure routes and things at runtime from Java rather than having to deploy a bunch of fixed xml files for spring configuration.  I can work through simple examples easy enough (say sending data through activeMQ) but am having some problem with the BAM example. if I just copy the java DSL bit the activity monitoring does not happen and I can't figure out if the routes aren't there or why it would not work.  Is there a strict dependency in BAM that requires setup in Spring?  I don't have my code with me, but the BAM bit was a cut and paste from the example and a copy of the files (invoice/purchase order) into my project.  I don't get any exceptions either which is sort of odd.
>
> Thanks
>

Re: Using Camel with Java DSL and minimal Spring

Posted by Henryk Konsek <he...@gmail.com>.
Hi Jay,

> I don't get any exceptions either which is sort of odd.

If you set your logger level to DEBUG, you will see if the routes
you're interested in are started or not. You will also get details
information about routing of each message.

If magic still happens and logs can't tell you why, then consider:
* using Interceptors [1] for debugging
* connecting with JPDA to the component that should be called and
verify that the code is not executed in fact

Best regards.

[1] http://camel.apache.org/intercept.html

--
Henryk Konsek
http://henryk-konsek.blogspot.com