Re: Camel Exchange Patters

2010-09-24 Thread Claus Ibsen
On Tue, Sep 14, 2010 at 2:29 PM, Bengt Rodehav wrote: > Yeah I remember reading about the problems with losing message headers > somewhere on this list... > > To be perfectly honest I think that the number of mails on this thread > indicates the importance of documenting these rules and how things

Re: Camel Exchange Patters

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 10:27 AM, Claus Ibsen wrote: > On Tue, Sep 14, 2010 at 2:29 PM, Bengt Rodehav wrote: >> Yeah I remember reading about the problems with losing message headers >> somewhere on this list... >> >> To be perfectly honest I think that the number of mails on this thread >> indic

RE: Problem with XPATH filtering

2010-09-24 Thread Steve.Hedges
Willem Attached are sample XMLs, config and java code which replicates the problem. Unfortunately I don't know how to read from a file (I'm very new to this) and so it still depends on JMS. I am using Camel version 2.5-SNAPSHOT. Thanks for your help Steven Hedges -Original Message-

[Splitter] stopOnException behavior

2010-09-24 Thread Olivier.Roger
Hello Camel ! I am using Camel 2.4. After reading the documentation I was still wondering how error handling can be performed when using the splitter with POJO as aggregationStrategy. My POJO mehod is returning a List Object containing all my parts. I would like to avoid that only some part of

Route Id

2010-09-24 Thread Björn Bength
Hi List, We use JMX to monitor our camel routes. That works great, but we need to add a routeId("") to every route manually to get rid of the standard "route46" id. by default we just use the endpointuri of the route, because most of the time we create our routes with a consumer starting with fro

Re: Camel Exchange Patters

2010-09-24 Thread Bengt Rodehav
Perfect! /Bengt 2010/9/24 Claus Ibsen > On Fri, Sep 24, 2010 at 10:27 AM, Claus Ibsen > wrote: > > On Tue, Sep 14, 2010 at 2:29 PM, Bengt Rodehav > wrote: > >> Yeah I remember reading about the problems with losing message headers > >> somewhere on this list... > >> > >> To be perfectly hones

Re: Route Id

2010-09-24 Thread Claus Ibsen
Hi There is a JIRA ticket to add a pluggable API in the future for a naming strategy. Since its java code in Java DSL you can do String uri = "cxf:xxx"); from(uri).routeId(uri). 2010/9/24 Björn Bength : > Hi List, > > We use JMX to monitor our camel routes. That works great, but we need

Re: [Splitter] stopOnException behavior

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 11:54 AM, Olivier.Roger wrote: > > Hello Camel ! > > I am using Camel 2.4. > > After reading the documentation I was still wondering how error handling can > be performed when using the splitter with POJO as aggregationStrategy. > My POJO mehod is returning a List Object co

Re: Camel Exchange Patters

2010-09-24 Thread Daniel Bevenius
>We have added information about this in Camel in action, > chapter 3 when we drill down and work the Processor which exposes the > Exchange API. I just took a look but could not find such information in chapter 3. But perhaps this version of the book has yet to be released? Thanks, /Daniel 2010

Re: Camel Exchange Patters

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 1:55 PM, Daniel Bevenius wrote: >>We have added information about this in Camel in action, >> chapter 3 when we drill down and work the Processor which exposes the >> Exchange API. > I just took a look but could not find such information in chapter 3. But > perhaps this ver

RE: Camel Exchange Patters

2010-09-24 Thread patrice.godard
Hello, I'm not sure I understand why I shouldn't be using getOut(). Here is what I do at the end of my processor (that is transforming the message Body): // propagate headers ex.getOut().setHeaders(ex.getIn().getHeaders()); Am I wrong? I saw a couple of Processor samples that were only dealing

Re: Camel Exchange Patters

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 2:44 PM, wrote: > Hello, > I'm not sure I understand why I shouldn't be using getOut(). > Here is what I do at the end of my processor (that is transforming the > message Body): > > // propagate headers > ex.getOut().setHeaders(ex.getIn().getHeaders()); > > Am I wrong? N

can't tranform Body to DOM

2010-09-24 Thread patrice.godard
Hi, I receive JMS messages which are actually XML documents. In a processor I'm trying to get them as a DOM document since I need to process them in a certain way. I'm doing this: org.w3c.dom.Document doc = ex.getIn().getBody(org.w3c.dom.Document.class); And it does not seem to work (doc is alw

RE: Camel Exchange Patters

2010-09-24 Thread patrice.godard
> "But the Camel routing engine will automatic handle using IN if there > is no OUT message." So this is the magic behind! :-) I don't remember reading this anywhere previously and I was wondering how data was flowing from in to out messages. > > Working on IN is just much easier to explain and

Re: Camel Exchange Patters

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 2:51 PM, wrote: >> "But the Camel routing engine will automatic handle using IN if there >> is no OUT message." > > So this is the magic behind! :-) > I don't remember reading this anywhere previously and I was wondering how > data was flowing from in to out messages. > >

Re: can't tranform Body to DOM

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 2:48 PM, wrote: > Hi, > I receive JMS messages which are actually XML documents. > In a processor I'm trying to get them as a DOM document since I need to > process them in a certain way. > I'm doing this: >  org.w3c.dom.Document doc = ex.getIn().getBody(org.w3c.dom.Docum

RE: can't tranform Body to DOM

2010-09-24 Thread patrice.godard
> > use getMandatoryBody if you want Camel to barf if it could not convert > it. > I actually want Camel to convert it :-) I did a quick & dirty workaround by parsing the Body to JDOM myself, until I understand why Camel type conversion does not seem to work. I'll search the doc for this getMa

Re: Camel Exchange Patters

2010-09-24 Thread Tarjei Huse
Hi, On 09/24/2010 10:36 AM, Claus Ibsen wrote: > > I also added a couple of FAQs as well, such as > https://cwiki.apache.org/confluence/display/CAMEL/Using+getIn+or+getOut+methods+on+Exchange Maybe the FAQ item could be flashed out with something like: getIn and getOut are not related to the mes

Re: Camel Exchange Patters

2010-09-24 Thread Hadrian Zbarcea
Let me try to clarify this a bit, because there are 2 or 3 things mixed up in this thread. Because "Working on IN is just much easier to explain and use for end users" doesn't necessarily mean that that is what you should do. And the "use" part is debatable anyway. Every node on the route is a

Re: Camel Exchange Patters

2010-09-24 Thread Hadrian Zbarcea
That's a bit extreme, but yes, that's the idea. More precisely, not when you want to change the Exchange, you cannot do that, but when you want the message processed by the remaining of the route to be different. One more thing to keep in mind is that there are 2 kinds of "headers", we call the

RE: can't tranform Body to DOM

2010-09-24 Thread patrice.godard
I just noticed that my BodyType is set to byte[]. Maybe it explains why the conversion to Dom produces a null? My messages are XML files dropped in a scanned folder and then picked-up by a route that forwards them into a JMS Topic where they are picked-up by my main route. > -Message d'orig

Re: Camel Exchange Patters

2010-09-24 Thread Hadrian Zbarcea
Let's not get there (again). The community agreed already at least twice that this api is a good abstraction of what we try to do. As any abstraction it has to be properly documented. If it's not clear enough, that's where I would focus. Hadrian On Sep 24, 2010, at 8:53 AM, Claus Ibsen wrote:

Re: can't tranform Body to DOM

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 3:17 PM, wrote: > I just noticed that my BodyType is set to byte[]. > Maybe it explains why the conversion to Dom produces a null? What version of Camel are you using? I would assume we had a byte[] -> Dom converter out of the box. But maybe I am mistaking. And we recent

Re: Camel Exchange Patters

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 3:22 PM, Hadrian Zbarcea wrote: > Let's not get there (again). The community agreed already at least twice that > this api is a good abstraction of what we try to do. As any abstraction it > has to be properly documented. If it's not clear enough, that's where I would >

RE: can't tranform Body to DOM

2010-09-24 Thread patrice.godard
> -Message d'origine- > De : Claus Ibsen [mailto:claus.ib...@gmail.com] > Envoyé : vendredi 24 septembre 2010 15:23 > À : users@camel.apache.org > Objet : Re: can't tranform Body to DOM > > On Fri, Sep 24, 2010 at 3:17 PM, > wrote: > > I just noticed that my BodyType is set to byte[].

Re: Camel Exchange Patters

2010-09-24 Thread Hadrian Zbarcea
But see, that's the thing, the model and api is not based on jbi, and we should correct that in the wiki as well. Web services use the same model. So it's really not jbi not even wsdl, but the same model, that's mostly related to the integration space than a spec in particular. I personally thi

Re: [Splitter] stopOnException behavior

2010-09-24 Thread Olivier.Roger
I had an older version of the book, chapter 8 was not available then. I just updated and it seems to be what I was looking for ;) Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Splitter-stopOnException-behavior-tp2852371p2852687.html Sent from the Camel - Users mailin

[Aggregator] Howto remove from persistency

2010-09-24 Thread Olivier.Roger
Hello, I am using the new HawtDB aggregatorRepository. I saw in the documentation that aggregated messages can be published using one of the 5 completion checks. I was wondering if there was a way not to publish message if completion is not reach after a given time. In my case I split a messag

Re: [Aggregator] Howto remove from persistency

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 4:27 PM, Olivier.Roger wrote: > > Hello, > > I am using the new HawtDB aggregatorRepository. > I saw in the documentation that aggregated messages can be published using > one of the 5 completion checks. > > I was wondering if there was a way not to publish message if compl

Re: [Aggregator] Howto remove from persistency

2010-09-24 Thread Olivier.Roger
I see. I was thinking about something like a removeOnTimeout (default=false of course) that would use the existing completionTimeout attribute but change its behavior to remove the aggregated message instead of publishing it. -- View this message in context: http://camel.465427.n5.nabble.com/Ag

Re: [Aggregator] Howto remove from persistency

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 4:45 PM, Olivier.Roger wrote: > > I see. > > I was thinking about something like a removeOnTimeout (default=false of > course) that would use the existing completionTimeout attribute but change > its behavior to remove the aggregated message instead of publishing it. > --

RE: [SPAM] - Re: [Aggregator] Howto remove from persistency - Number of numbers in MIME From exceeds maximum threshold

2010-09-24 Thread Olivier.Roger
Indeed, I intended to use that header in a CBR to trigger the repository cleanup when needed. Thanks for the fast reply Olivier Roger (olivier.ro...@bsb.com) Consultant BSB Belgium (www.bsb.com) Avenue Ath?na,2

Re: Problem with XPATH filtering

2010-09-24 Thread Claus Ibsen
Hi You are using namespaces in your XML and therefore the XPath expression must use namespace as well. See this unit test for example http://svn.apache.org/viewvc?rev=1000916&view=rev On Fri, Sep 24, 2010 at 11:14 AM, wrote: > Willem > > Attached are sample XMLs, config and java code which r

Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread shaun.bar...@rulefinancial.com
Hi, I started with the ETL example (http://camel.apache.org/etl-example.html) as I am looking at this library to do some message routing and transformation for a test facility in work. I simply wanted to see how to write and use a Custom Transformer - but it seems that this is not as straightforwa

Re: [Aggregator] Howto remove from persistency

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 4:45 PM, Olivier.Roger wrote: > > I see. > > I was thinking about something like a removeOnTimeout (default=false of > course) that would use the existing completionTimeout attribute but change > its behavior to remove the aggregated message instead of publishing it. > --

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread shaun.bar...@rulefinancial.com
Sorry - this is for version 2.4.0 -- View this message in context: http://camel.465427.n5.nabble.com/Newbie-Pls-help-ETL-Example-Modification-Doesn-t-work-tp2852839p2852848.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread Claus Ibsen
You need to add a special file in the JAR to have the converts auto register in Camel when it boot up. See section _Writing your own .._ http://camel.apache.org/type-converter.html Also the Camel in Action book covers transformation and type converters in chapter 3. The book may help clear up a t

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread shaun.bar...@rulefinancial.com
Hi Claus - that is why I was modifying the example project - since it already has the org/apache/camel/TypeConverter file: and I have added a new @Converter method to the class that it was already using as the TypeConverter in the first place . So would I still need to add in any new configuration

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 5:53 PM, shaun.bar...@rulefinancial.com wrote: > > Hi Claus > - that is why I was modifying the example project - since it already has the > org/apache/camel/TypeConverter file: and I have added a new @Converter > method to the class that it was already using as the TypeCon

Re: [Aggregator] Howto remove from persistency

2010-09-24 Thread Olivier.Roger
That's exactly the idea. I agree that deleting messages is dangerous. That's why the option should be set explicitly (disabled by default). -- View this message in context: http://camel.465427.n5.nabble.com/Aggregator-Howto-remove-from-persistency-tp2852702p2852893.html Sent from the Camel - U

Re: [Aggregator] Howto remove from persistency

2010-09-24 Thread Claus Ibsen
On Fri, Sep 24, 2010 at 6:03 PM, Olivier.Roger wrote: > > That's exactly the idea. > > I agree that deleting messages is dangerous. That's why the option should be > set explicitly (disabled by default). > -- Feel free to create a ticket in JIRA > View this message in context: > http://camel.4

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread shaun.bar...@rulefinancial.com
So - given that info any ideas why my converter method is simply ignored and the PersonDocument not being marshalled? See the screen shot attached which is the breakpoint at the time my constructor is called - it passes in a String argument which is the file contents. No attempt at conversion occ

RE: Problem with XPATH filtering

2010-09-24 Thread Steve.Hedges
Claus Thanks very much Steven Hedges -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: 24 September 2010 16:40 To: users@camel.apache.org Subject: Re: Problem with XPATH filtering Hi You are using namespaces in your XML and therefore the XPath expression mus

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread shaun.bar...@rulefinancial.com
Ok - done some more experimentation and am more confused than ever if I try to convert from a person to the jpa endpoint it works fine (and uses the customertransformer @Converter annotated method. However if you try to convert it to the class end point (the 2nd example below) the transformer is

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread shaun.bar...@rulefinancial.com
.. So to recap is - I am confused by the behaviour here: I want to be able to a) read from a source b) convert it from/to something c) write it to a destination but the example only does the conversion if the destination is jpa and not a class?? -- View this message in context: http://camel.46

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread shaun.bar...@rulefinancial.com
if anyone can help - all I want to do is read from jms convert from/to and then write back to jms something like: from( "jms:queue:camel" ) .to( "class:com.source.etf.integration.WibblyWobbly" ); from ("class:com.source.etf.integration.WibblyWobbly")

Re: Newbie Pls help: ETL Example Modification Doesn't work

2010-09-24 Thread Claus Ibsen
Use the method option on the class endpoint to tell Camel which method to invoke http://camel.apache.org/class class:xxx?method=foo On Fri, Sep 24, 2010 at 7:22 PM, shaun.bar...@rulefinancial.com wrote: > > > Ok - done some more experimentation and am more confused than ever if I try > to conve

Re: can't tranform Body to DOM

2010-09-24 Thread Donald Whytock
Would org.w3c.dom.Document doc = ex.getIn(org.w3c.dom.Document.class); work any better? Don On Fri, Sep 24, 2010 at 9:33 AM, wrote: > > >> -Message d'origine- >> De : Claus Ibsen [mailto:claus.ib...@gmail.com] >> Envoyé : vendredi 24 septembre 2010 15:23 >> À : users@camel.apache.org