Re: @CsvRecord reject

2013-03-05 Thread Jean Francois LE BESCONT
> Web: http://www.fusesource.com | http://www.redhat.com > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) > (English) > http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) > Twitter: willemjiang > Weibo: 姜宁willem > > > > > > On T

Re: @CsvRecord reject

2013-03-05 Thread Jean Francois LE BESCONT
If the CSVRecord is in the same package than the route it doesnt work ( in my previous project) but if I put it in a sub package it works fine 2013/3/5 Jean Francois LE BESCONT > Thanks Willem for the help. > > I used 2.10.3 passed in 2.10.4 verify my toString method. I finally &g

Re: Opposite of split

2013-03-05 Thread Jean Francois LE BESCONT
eName="+ OUT_DIR +"OUT.csv&encoding=UTF-8") Write in a file renamed " ${file " 2013/3/5 Claus Ibsen > On Tue, Mar 5, 2013 at 9:36 AM, Jean Francois LE BESCONT > wrote: > > Christian, The stream file mecanism is awsome ! > > But I h

Re: @CsvRecord reject

2013-03-05 Thread Jean Francois LE BESCONT
OK ! Thanks Ib 2013/3/5 lb > > As today if you have more bind-annotated classes you have to place them in > separate packages, I'm supposed to work on this issue as soon as I have a > little time. > > https://issues.apache.org/jira/browse/CAMEL-5958 > > > > > > -- > View this message in context

Re: Opposite of split

2013-03-05 Thread Jean Francois LE BESCONT
the same file. Any interest to use recipient in place of aggregate ? method START END EXEC TIME recipientList 13:23:15 13:24:11 00:00:56 aggre 13:30:55 13:31:39 00:00:44 2013/3/5 Claus Ibsen > On Tue, Mar 5, 2013 at 11:03 AM, Jean Francois LE BESCONT > wrote: > > Thanks

Re: Handle exception

2013-03-05 Thread Jean Francois LE BESCONT
But the rejected line stay in the route ... I have in my output line not validated by the process. Do you know how to ignore / skip not validate element passed to my error direct route ? 2013/3/5 Jean Francois LE BESCONT > Thanks ! > > Very helpfull ! > > I would thi

Re: Enrich with data from SQL

2013-03-05 Thread Jean Francois LE BESCONT
013/3/6 Raúl Kripalani > Can we see the code of AggregationStrategyRessource? > > Regards, > Raúl. > > On Mar 5, 2013, at 23:30, Jean Francois LE BESCONT wrote: > > > Hey, > > > > I have this > > > > http://camel.465427.n5.nabble.com/Enrich

Re: Enrich with data from SQL

2013-03-05 Thread Jean Francois LE BESCONT
If i do: public class AggregationStrategyRessource implements AggregationStrategy { @Override public Exchange aggregate(Exchange original, Exchange resource) { int i = 1 / 0; return original; } } no exception are thows. 2013/3/6 Jean Francois LE BESCONT > thks Raul >

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
| >>>>>>>>> | | >>>>>>>>> | jack | cool | 2 | | bob | foo | | | | bob| foo | 3 | --- -------- 2013/3/

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
-- > | jack | cool| >>>>>>>>> | | >>>>>>>>> | jack > | cool | 2 | > | bob | foo | | | > | bob| foo | 3 | > --- > > > &g

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
("originalBody " + originalBody ) ; LOG.info("resourceResponse " + resourceResponse ) ; // do stuff with return resource; } Thanks raul for the help ! :) 2013/3/6 Jean Francois LE BESCONT > Thanks Raul ! > > I haven't found si

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
Thanks Claus for the link ( have you an HashMap off the FAQ in the head ? :) Don't forget to add : original.getOut().setHeaders(original.getIn().getHeaders()); When enrich with strategy ! 2013/3/6 Claus Ibsen > On Wed, Mar 6, 2013 at 10:26 AM, Jean Francois LE BESCONT > wr

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
amel cache but I have understand that it is used for something else. Thanks ! 2013/3/6 Jean Francois LE BESCONT > Thanks Claus for the link ( have you an HashMap off the FAQ in the head ? > :) > > Don't forget to add : > > >original.getOut().setHeaders(origin

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
Thanks Claus ! Tricky but it works :) 2013/3/6 Claus Ibsen > On Wed, Mar 6, 2013 at 1:05 PM, Jean Francois LE BESCONT > wrote: > > When we do an enrich, the *resourceUri ( in my example > *.enrich("direct:ds", > > new AggregationStrategyRessource())) is ca

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
l, Exchange resource) { Map zones = (Map) resource.getIn().getBody(); Any idea ? Thanks ! 2013/3/6 Jean Francois LE BESCONT > Thanks Claus ! > > Tricky but it works :) > > > 2013/3/6 Claus Ibsen > >> On Wed, Mar 6, 2013 at 1:05 PM, Jean Franc

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
it is a really simple studies case no ? I can't be the first guy who don't want to reload the datasource on each line isn't it ? 2013/3/6 Jean Francois LE BESCONT > I made a mistake in my test. It doesn't do what expected ... > > Still the same examp

Re: Enrich with data from SQL

2013-03-07 Thread Jean Francois LE BESCONT
o("jdbc:dataSource") .to("direct:ds") .end(); But direct:datasource is called for each line which cost to much time. I would like to make the database query only once for my csv file. Thanks JF 2013/3/7 Claus Ibsen > On Thu, Mar 7, 2013 at 8:03 AM, Jean Francois LE BE

Re: Enrich with data from SQL

2013-03-07 Thread Jean Francois LE BESCONT
t; > Hope this helps! > Raúl. > > Sent while on the move. > On 7 Mar 2013 08:25, "Jean Francois LE BESCONT" > wrote: > > > Sorry if my explanation are not good ... :) > > > > I have a csv file. I would like to process this file to enrich

Re: Enrich with data from SQL

2013-03-07 Thread Jean Francois LE BESCONT
I have found a solution I will post a whole example when every thing will work in my project. 2013/3/7 Jean Francois LE BESCONT > Thanks for all these explictions ! Hope I will give back my knowledge when > I will have enough camel knowledge :) > > With filter, I goto my enrich

Re: Write enriched data after a split in a file

2013-03-08 Thread Jean Francois LE BESCONT
Thanks Willem for help. My explaination are sometime to complicate, I will present it differently. I have a "big" file to process efficiently, for that if I have tried : Method 1 : from("file://C:/Temp/camel/input_test/?noop=true") .split() .tokenize("\n") // Busine

Re: Write enriched data after a split in a file

2013-03-08 Thread Jean Francois LE BESCONT
m("file://") > .bean(fwBean, "openFileForProcessing") > .split().tokenize("\n") > // do your enrichment > .bean(fwBean, "writeLine") > .end() > .bean(fwBean, "closeFile"); > } > > regards, Marco > > > Am 08.03.2013 12:23, schrie

Re: Write enriched data after a split in a file

2013-03-08 Thread Jean Francois LE BESCONT
That is the best practice for do it ? 2013/3/8 Jean Francois LE BESCONT > Thanks Marco ! > > It is an idea ! Claused to the Composed Message Processor ( > http://camel.apache.org/composed-message-processor.html paragraph Example > using only Splitter). > > I am really sup

Re: Write enriched data after a split in a file

2013-03-08 Thread Jean Francois LE BESCONT
OK ! I have create a jira : https://issues.apache.org/jira/browse/CAMEL-6147 ( my first :) By the way the solution is a route like this : from("file://C:/Temp/camel/input_test/?noop=true") .setProperty("OutputFileName" , simple("C:/Temp/camel/output_test/${headers.CamelFileName}")) .split() .

Re: Write enriched data after a split in a file

2013-03-08 Thread Jean Francois LE BESCONT
It works fine with the simple example that is present but in a seda queue executed with concurrentConsumers the bean throw an exception due to concurrency ... 2013/3/8 Jean Francois LE BESCONT > OK ! > > I have create a jira : https://issues.apache.org/jira/browse/CAMEL-6147 ( my

Re: Write enriched data after a split in a file

2013-03-08 Thread Jean Francois LE BESCONT
ho need to deal with giga bytes of file ! Thanks JF 2013/3/8 Jean Francois LE BESCONT > It works fine with the simple example that is present but in a seda queue > executed with concurrentConsumers the bean throw an exception due to > concurrency ... > > > 2013

Re: doTry docatch slow down the execution

2013-03-12 Thread Jean Francois LE BESCONT
Kripalani > Btw - It looks like you decided to go with the approach I suggested. First > enrich, then split. > > Is the aggregation strategy storing the SQL results in a property, which > you access later? > On 12 Mar 2013 08:23, "Jean Francois LE BESCONT" > wrote: >

Re: Files cannot be moved on FTP

2013-03-20 Thread Jean Francois LE BESCONT
Hi all ! I have the same problem with ftp transfert ( 550 Failed to change directory.) I am working with the 2.10.5-SNAPSHOT An anonymous transfert from public ftp like : from(" ftp://ftp.mozilla.org/pub/mozilla.org/b2g/manifests/1.0.0/2012/08/2012-08-15?stepwise=false ") .to("file://C:/temp/

Re: Files cannot be moved on FTP

2013-03-20 Thread Jean Francois LE BESCONT
ftp://devcyp05@192.168.0.203:21 Strange no ? 2013/3/20 Jean Francois LE BESCONT > Hi all ! > > I have the same problem with ftp transfert ( 550 Failed to change > directory.) > > I am working with the 2.10.5-SNAPSHOT > > An anonymous transfert from public ftp like :

Re: Log in file

2013-04-12 Thread Jean Francois LE BESCONT
Thanks for the answer Christian, After re-read my question, I think that I am not enough specific and not explain correctly my point. :) In my case I scan a directory and would like to produce one log ( logEIP ) file per file processed. something like : from("file://C:/test) .log("found $

Re: Log in file

2013-04-16 Thread Jean Francois LE BESCONT
; http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani > http://blog.raulkr.net | twitter: @raulvk > > On Fri, Apr 12, 2013 at 1:23 PM, Jean Francois LE BESCONT < > jflebesc...@gmail.com> wrote: > > > Thanks for the answer Christian, > > > >

Re: Detect is a route is started

2013-04-25 Thread Jean Francois LE BESCONT
O resume route 1 [1) thread #0 - timer://runOnce] SpringCamelContext INFO Route: ROUTE_1 resumed and consuming from: Endpoint[file://C:/Temp/camel/?noop=true] [1) thread #0 - timer://runOnce] MyProcessorINFO end MyProcessor I am using camel 2.11 / JRE 1.7 Bye

Re: Detect is a route is started

2013-04-25 Thread Jean Francois LE BESCONT
Thanks Claus for the link ! 2013/4/25 Claus Ibsen > Hi > > There is a getRouteStatus method > > http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html#getRouteStatus(java.lang.String) > > On Thu, Apr 25, 2013 at 10:48 AM, Jea

From bind to bind

2013-05-07 Thread Jean Francois LE BESCONT
Hi ! I would like to know if someone has already found a clean solution to this point. I have a directory with CSV file with : A;1 B;2 ... The bind is like : @CsvRecord(separator = ";" ) public class BindFileCSV { @DataField(pos = 1) public String COL1; @DataField(pos = 2 ) public String COL

Re: From bind to bind

2013-05-07 Thread Jean Francois LE BESCONT
Ho By the way , I am using JRE 1.7 and CAMEL 2.11 2013/5/7 Jean Francois LE BESCONT > Hi ! > > I would like to know if someone has already found a clean solution to this > point. > > I have a directory with CSV file with : > > A;1 > B;2 > ... > > The bin

Re: From bind to bind

2013-05-07 Thread Jean Francois LE BESCONT
quot; ) public class TicketOUT { @DataField(pos = 2, required = true) public String TCK_TYPE2; [...] } Not necessary the best intergration solution but it is fast and pretty clean. With 20 fields per class, the route convert 68 000 body per second. Jeff 2013/5/7 Jean Francois LE BESCONT > H

Re: From bind to bind

2013-05-08 Thread Jean Francois LE BESCONT
My job works fine with a route which used a dozerMapper get from getBean of spring context. I have try with a simple convertbody : from("file://C:/Temp/camel/rep1/?noop=true") .split().tokenize("\n") .streaming() .unmarshal() .bindy(BindyType.Csv, Ticket.class) .convertBodyTo(TicketOUT.class)

Re: From bind to bind

2013-05-12 Thread Jean Francois LE BESCONT
Hey Oh I mist this part on the dozer type conversion documentation ... :) For community, with this pom : org.apache.camel camel-dozer ${org.apache.camel.version} And a spring config: META-INF/dozer-global-configuration.xml Conversion based with dozer in xml works perfectly ( not wi

bind programmatically

2013-05-14 Thread Jean Francois LE BESCONT
Hey ! I would like to programmatically marshal and bind my body to do : from("file://C:/Temp/camel/rep1/?noop=true") .split().tokenize("\n") .unmarshal() .bindy(BindyType.Csv, Ticket.class) .process(new Processor() { public void process(Exchange exchange) throws Exception {

Re: bind programmatically

2013-05-14 Thread Jean Francois LE BESCONT
hod manually. > > Its a bit unusual to do it like that, but you can do it. > > On Tue, May 14, 2013 at 4:02 PM, Jean Francois LE BESCONT > wrote: > > Hey ! > > > > I would like to programmatically marshal and bind my body to do : > > > > from("

stream:file closeOnDone not close all time

2013-05-15 Thread Jean Francois LE BESCONT
Hey ! A new option is available for the stream:file to close it when done (closeOnDone). This option is appeared in 2.11 after my jira ( https://issues.apache.org/jira/browse/CAMEL-6147) File unlock (or released or closed) looks to doesn't works fine if last line is not passed to the endpoint Ex

Re: stream:file closeOnDone not close all time

2013-05-15 Thread Jean Francois LE BESCONT
Hi, what should I do ? Thanks Jeff 2013/5/15 Jean Francois LE BESCONT > Hey ! > > A new option is available for the stream:file to close it when done > (closeOnDone). This option is appeared in 2.11 after my jira ( > https://issues.apache.org/jira/browse/CAMEL-6147) >

Re: stream:file closeOnDone not close all time

2013-05-16 Thread Jean Francois LE BESCONT
> > Hi > > > > That is because you do write to 2 files. The option was intended for > > writing to the same file. > > > > > > > > > > On Thu, May 16, 2013 at 7:43 AM, Jean Francois LE BESCONT > > wrote: > >> Hi, > >> >

Re: stream:file closeOnDone not close all time

2013-05-16 Thread Jean Francois LE BESCONT
fileName=C:/Temp/camel/rep1/out/out_1.csv&closeOnDone=true") .end() .end() .end(); Jeff 2013/5/16 Jean Francois LE BESCONT > Hi, > > Thanks Claus for the answer. I have logged a jira ( > https://issues.apache.org/jira/browse/CAMEL-636

Re: stream:file closeOnDone not close all time

2013-05-19 Thread Jean Francois LE BESCONT
Hi, Could you please tell me Claus how to use the addOnCompletion to close the stream ? THanks Jeff 2013/5/16 Jean Francois LE BESCONT > By the way, the problem appears not on if there are two files. It appears > if the last exchange is not passed to the endpoint. > > Example w

Re: stream:file closeOnDone not close all time

2013-05-19 Thread Jean Francois LE BESCONT
If it is possible ! 2013/5/19 Jean Francois LE BESCONT > Hi, > > Could you please tell me Claus how to use the addOnCompletion to close > the stream ? > > THanks > > > Jeff > > > 2013/5/16 Jean Francois LE BESCONT > >> By the way, the problem appe

Re: stream:file closeOnDone not close all time

2013-05-20 Thread Jean Francois LE BESCONT
Hi ! Please h o w can I pass by this limitation ? Le 19 mai 2013 22:58, "Jean Francois LE BESCONT" a écrit : > If it is possible ! > > > 2013/5/19 Jean Francois LE BESCONT > >> Hi, >> >> Could you please tell me Claus how to use the addOnCompl

Re: stream:file closeOnDone not close all time

2013-05-21 Thread Jean Francois LE BESCONT
Hi, Sorry if I spam ( I also speak in jira ) Hi, ( Sorry if I spam, I also speak in jira ) I have found a solution, based on the idea of send the exchange to both endpoint : public void configure() throws Exception { // Properties final String PROP_WRITE_IN_FILE_1 = "PROP_WRITE_I

Re: sample camel program

2013-05-21 Thread Jean Francois LE BESCONT
Hi, You can use http://fusesource.com/products/fuse-ide/ There are also example in the d istribution. JF 2013/5/21 nettome > Hi, > I'm new to camel and Im trying to create a sample program in eclipse ide.

Marshal with quote in CSV

2013-05-23 Thread Jean Francois LE BESCONT
Hi, I have found a strange behavior with the bindy in CSV. It is said in the doc that : Notice that if you want to marshal from Object to CSV and use quotes, then you need to specify which quote character to use, using the quote attribute on the @CsvRecord as shown below: @CsvRecord( separator

Camel File Discard empty file

2013-05-30 Thread Jean Francois LE BESCONT
Hi, I undig an old point ( http://camel.465427.n5.nabble.com/Camel-File-Discard-empty-file-td472234.html ) My camel application wait file send from a tierce application ( which is generate from a file:stream by an other application) and has to process it and delete it after. The file can be empt

Re: Camel File Discard empty file

2013-05-30 Thread Jean Francois LE BESCONT
developed my own filter as you suggest. 2013/5/30 Claus Ibsen > Hi > > It does, see the readLock option > http://camel.apache.org/file2 > > On Thu, May 30, 2013 at 10:24 AM, Jean Francois LE BESCONT > wrote: > > Hi, > > > > I undig an old point ( >

Re: Camel File Discard empty file

2013-06-11 Thread Jean Francois LE BESCONT
Hi, Do you think that we could enhance camel to manage it correctly ? Jeff 2013/5/30 Jean Francois LE BESCONT > I have play with readLock but : > > *changed : (with "**?readLock=changed&readLockTimeout=2&delete=true") > : doesn't detect empty file.* >

Simple split / tokenize problem

2014-04-07 Thread Jean Francois LE BESCONT
Hey ! I am a little bit disappointed about an apache camel simple example. The configuration is : project.build.sourceEncoding : UTF-8 project.reporting.outputEncoding : UTF-8 org.apache.camel.version: 2.11.0 org.spring.version :3.0.7.RELEASE The source code of this spring camel project is here

Re: Simple split / tokenize problem

2014-04-07 Thread Jean Francois LE BESCONT
I have trailed that it arrives when there are specials caracters in the line. Here it breaks wtih " ° " https://github.com/0loky0/camel-spring-test/blob/master/input_dir/VDE20140326184821.MGC1.05.00026.csv 2014-04-07 15:16 GMT+02:00 Jean Francois LE BESCONT : > Hey ! >

Re: Simple split / tokenize problem

2014-04-07 Thread Jean Francois LE BESCONT
(if > any) it has been fixed > http://camel.apache.org/support > > On Mon, Apr 7, 2014 at 3:16 PM, Jean Francois LE BESCONT > wrote: >> Hey ! >> >> I am a little bit disappointed about an apache camel simple example. >> >> The configuration is : >&

Re: Simple split / tokenize problem

2014-04-07 Thread Jean Francois LE BESCONT
Hey, I forget to specify that this problem can be reproduce this other special caracter like ¤ Thanks JF 2014-04-07 21:30 GMT+02:00 Jean Francois LE BESCONT : > Thanks claus ! > > Oh I didn't realized that "Camel versions 2.11.x and older are no longer > actively

Re: Simple split / tokenize problem

2014-04-08 Thread Jean Francois LE BESCONT
D file.encoding option or something. > > Also java.util.Scanner parsing with those special chars is likely a > common problem, so you can find detail on the internet how to deal > with that. > > On Mon, Apr 7, 2014 at 9:39 PM, Jean Francois LE BESCONT > wrote: > > Hey, >

possible duplication in spring boot example

2017-02-08 Thread Jean Francois LE BESCONT
Hi, There are two examples : https://github.com/apache/camel/tree/master/examples/camel-example-spring-boot https://github.com/apache/camel/tree/master/examples/camel-example-spring-boot-starter Which are very similar (POC of timer). After a winmerge of these two example and as a java camel user

Re: possible duplication in spring boot example

2017-02-08 Thread Jean Francois LE BESCONT
+01:00 Jean Francois LE BESCONT : > Hi, > > There are two examples : > > https://github.com/apache/camel/tree/master/examples/ > camel-example-spring-boot > https://github.com/apache/camel/tree/master/examples/ > camel-example-spring-boot-starter > > Which are very s

Re: possible duplication in spring boot example

2017-02-08 Thread Jean Francois LE BESCONT
> On Wed, Feb 8, 2017 at 4:29 PM, Jean Francois LE BESCONT > wrote: > > Hi, > > > > There are two examples : > > > > https://github.com/apache/camel/tree/master/examples/ > camel-example-spring-boot > > https://github.com/apache/camel/tree/master/examples