Re: Help to re-write route

2013-10-11 Thread richie.rivi...@gmail.com
scrap this question. I'm following the camel-example-etl code from the camel examples instead. thanks -- View this message in context: http://camel.465427.n5.nabble.com/Help-to-re-write-route-tp5741339p5741389.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Email Attachments - Adding to Exchange Attachments

2013-10-11 Thread contactreji
hi Finally after a lot of struggle and handson, i have a fix here. We have to comment out *javax.activation;version="1.1", \* from two places inside the file */etc/jre.properties* . There are 2 places where it occurs.. *Very Important: THIS HAS TO BE DONE BEFORE THE FIRST KARAF BOOT. Else this

Apache Camel multithread processing

2013-10-11 Thread astorath
I want the route to operate in several thread simultainously. from(¨timer://foo¨).to(¨jdbc://myDataSource¨).to(¨mock:results¨) I can use two routes (timer + seda) to get that kind of result, but this is ugly (besides using additional thread and queue), or I can create the route several times. Is

Re: Help to re-write route

2013-10-11 Thread richie.rivi...@gmail.com
No quite. I know that If I want to create a separate class for the route i can do this... public class MyRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from("file:src/data?noop=true") .split(stax(Recor

Java DSL: do I have to have a child for a split()?

2013-10-11 Thread Keith Freeman
My route is built in parts from different spots in my code, and at one point I do a split: choice().when(...).bean(...).split().method(splitBean, "splitMethod").endChoice().otherwise().bean(...); This results in a "IllegalArgumentException: Definition has no children on Split...". But

Re: How do I convert the map returned to Camel into JSON?

2013-10-11 Thread James Carman
No problem. Happy camel riding! On Fri, Oct 11, 2013 at 3:38 PM, erj2code wrote: > Thanks, that worked! > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-do-I-convert-the-map-returned-to-Camel-into-JSON-tp5741370p5741377.html > Sent from the Camel - Users mailin

Re: How do I convert the map returned to Camel into JSON?

2013-10-11 Thread erj2code
Thanks, that worked! -- View this message in context: http://camel.465427.n5.nabble.com/How-do-I-convert-the-map-returned-to-Camel-into-JSON-tp5741370p5741377.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How do I convert the map returned to Camel into JSON?

2013-10-11 Thread James Carman
Try something like this: On Fri, Oct 11, 2013 at 3:22 PM, erj2code wrote: > Would I use convertBodyTo described on > http://camel.apache.org/convertbodyto.html to convert the body to String? > > I'm still a newbie with Camel; could you show me an example? > > > > -- > View

Re: How do I convert the map returned to Camel into JSON?

2013-10-11 Thread erj2code
Would I use convertBodyTo described on http://camel.apache.org/convertbodyto.html to convert the body to String? I'm still a newbie with Camel; could you show me an example? -- View this message in context: http://camel.465427.n5.nabble.com/How-do-I-convert-the-map-returned-to-Camel-into-JSON-

Re: How do I convert the map returned to Camel into JSON?

2013-10-11 Thread James Carman
Try converting the body to a String first (since it looks like it's a byte[]), then log just the body. On Fri, Oct 11, 2013 at 2:19 PM, erj2code wrote: > This seems like such a simple thing to do, yet I can't seem to find it in the > Camel documentation. > > Related to my last question i.e., > ht

Re: How do I convert the map returned to Camel into JSON?

2013-10-11 Thread erj2code
Actually to clarify I don't need the , Out: null] part. Just this part would be fine: {"fruit1DataType":"String","fruit1":"apple","fruit1Calories":"95","fruit1ColorDataType":"String","fruit1CaloriesDataType":"int","fruit1Color":"red"} -- View this message in context: http://camel.465427.n5.na

Re: Netty: messages not propagated back from netty producer

2013-10-11 Thread javakurious
Thanks for the clarification.. So, that won't have anything to do with the message not being returned up the chain back to the caller. would it ? Thanks Vineet -- View this message in context: http://camel.465427.n5.nabble.com/Netty-messages-not-propagated-back-from-netty-producer-tp5741315p5

How do I convert the map returned to Camel into JSON?

2013-10-11 Thread erj2code
This seems like such a simple thing to do, yet I can't seem to find it in the Camel documentation. Related to my last question i.e., http://camel.465427.n5.nabble.com/Get-BeanCreationException-when-try-to-add-Jackson-Library-to-my-applicationContext-xml-td5741314.html I now have my code putting th

Re: Get BeanCreationException when try to add Jackson Library to my applicationContext.xml

2013-10-11 Thread erj2code
I moved it, and that worked. -- View this message in context: http://camel.465427.n5.nabble.com/Get-BeanCreationException-when-try-to-add-Jackson-Library-to-my-applicationContext-xml-tp5741314p5741369.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Netty: messages not propagated back from netty producer

2013-10-11 Thread Claus Ibsen
Yeah the sync option is sorta inherited from camel-mina many many years ago. Its really for doing request/reply. But the threading model can still be asynchronous etc. Using synchronous is a general option you can use on any endpoint. That forces the threading model to be synchronous. On Fri,

Re: Netty: messages not propagated back from netty producer

2013-10-11 Thread javakurious
Just a quick clarification for Netty.. What's the difference between sync and synchronous parameter ? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Netty-messages-not-propagated-back-from-netty-producer-tp5741315p5741364.html Sent from the Camel - Users mailing li

Re: Help with Dynamic route

2013-10-11 Thread gudiseashok
Thanks Allot James, I will use this test case and tweak more on ActiveMQ side as you suggested. -- View this message in context: http://camel.465427.n5.nabble.com/Help-with-Dynamic-route-tp5741336p5741363.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Help with Dynamic route

2013-10-11 Thread James Carman
There is a test case here: https://github.com/jwcarman/camel-sandbox Which will show you how to do JMS in camel using a topic. It's just a sandbox, but it sets up what you need to play with JMS/camel using ActiveMQ On Fri, Oct 11, 2013 at 9:56 AM, gudiseashok wrote: > Hi James, > > Yeah thank

Re: Help with Dynamic route

2013-10-11 Thread Andreas Gies
Hi again, this comes from one of my test classes: @Test public void assortmentTest() throws Exception { final String country = getTestProperties().getProperty("country"); final String location = headerLocation(getTestProperties().getProperty("location")); CamelTestSupport cts

Re: Help with Dynamic route

2013-10-11 Thread gudiseashok
Hi Muller, I am afraid, basically the solution you have provided is for "Routing", in order to do this I have to add when ever I found new server then can call for routing - Which is basically decisions based. But my thing is , I need to have a main route which kick-off other "Routes" (which are

Re: Help with Dynamic route

2013-10-11 Thread gudiseashok
Hi James, Yeah thanks for pouring plenty of options :-), and I feel JMS Topic would fit more in this situation. Because what I want is, to have a main route (load on startup) which kick-off another routes which does FTP download (with poll-enrich so it will be keep on going), so by adding another

Re: Help with Dynamic route

2013-10-11 Thread James Carman
Have you tried just using a JMS topic? On Fri, Oct 11, 2013 at 6:40 AM, gudiseashok wrote: > Hi I have a requirement, I want start some routes and leave them with > polling, after some time I want to add some more like that kind. > > > example > > > > > > > > > > > If I want to add another r

Re: Help with Dynamic route

2013-10-11 Thread Christian Müller
I think you are looking for the dynamic router pattern. Have a look at [1]. [1] http://camel.apache.org/dynamic-router.html Best, Christian - Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache Incubator PMC M

Re: Moving from Spring 3.0.6 to 3.2.3 results in exception - Cannot find any Camel Context from the Application Context.

2013-10-11 Thread Christian Müller
Camel 2.11 also supports Spring 3.2.x. So it SHOULD work. Can you assemble a small sample project which shows the issue? Than it's much easier for us to dig into the issue. Best, Christian - Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member

Re: Help to re-write route

2013-10-11 Thread Andreas Gies
AehmAre you asking how to get your route into its own class so that you could use it in a container ? Andreas On 10/11/2013 01:22 PM, richie.rivi...@gmail.com wrote: Hi guys, I was wondering if someone could give me some help out how to re-write this camel test into a proper camel program.

Help to re-write route

2013-10-11 Thread richie.rivi...@gmail.com
Hi guys, I was wondering if someone could give me some help out how to re-write this camel test into a proper camel program. The issue is I know how to write a simple route and then execute it. But after the route is executed and I want to grab the parsed xml in a fashion similar to testStaxExpres

Re: Help with Dynamic route

2013-10-11 Thread Andreas Gies
Just noted, that I copied the wrong link in my answer earlier on. [1] http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/MulticastProcessor.html Sorry for this Andreas On 10/11/2013 01:05 PM, Andreas Gies wrote: Hi, if I understand correctly, you want to mod

Re: Help with Dynamic route

2013-10-11 Thread Andreas Gies
Hi, if I understand correctly, you want to modify the multicast processor and add another branch to it rather than adding another route to the camel context. I had (a very brief) look at the MulticastProcessor. You can find the Javadoc at [1] [1] http://camel.apache.org/maven/current/camel-

Help with Dynamic route

2013-10-11 Thread gudiseashok
Hi I have a requirement, I want start some routes and leave them with polling, after some time I want to add some more like that kind. example If I want to add another router dynamically to the multicast, like . is this possible if I add if i use dynamicroute configure ( .

Re: Camel with Multiple types of Endpoints

2013-10-11 Thread Andreas Gies
Hi, I forgo to add, that for sanity reasons (at least of your ops guys) you want to run the show inside a container. If that's a web container or an OSGi container is up to you. Personally I prefer OSGi, but that's just my preference. Running in a container definitely makes it easier to enabl

Re: Camel with Multiple types of Endpoints

2013-10-11 Thread Andreas Gies
Hi, the short answer is: Yes. A bit more elaborate, I think that is a very common use case and kind of screams for something like Camel - if not Camel itself ;) What you would typically do is: 1) Implement a route that calls out to your core business logic. This route id your service pr