Re: how to get CamelContext using Spring

2013-03-07 Thread anver
Hi, Please give a id to the CamelContext. you can grab it using the Spring's getBean method. For example if you give the following camle context code inside your springs application context xml then you can get the FIRST-CAMLE-CONTEXT using the getBean() method camelContext

Re: Enrich with data from SQL

2013-03-07 Thread Jean Francois LE BESCONT
Sorry if my explanation are not good ... :) I have a csv file. I would like to process this file to enrich with data in sql table (then write enriched line in output). I process file with a binding in business class : .from(file://mycsv.csv) .split() .tokenize(\n) .streaming() .unmarshal()

Re: Enrich with data from SQL

2013-03-07 Thread Claus Ibsen
On Thu, Mar 7, 2013 at 9:25 AM, Jean Francois LE BESCONT jflebesc...@gmail.com wrote: Sorry if my explanation are not good ... :) I have a csv file. I would like to process this file to enrich with data in sql table (then write enriched line in output). I process file with a binding in

Re: Enrich with data from SQL

2013-03-07 Thread Raul Kripalani
If you want to query the DB once, you should definitely restructure the route a bit. Here's the simplest option IMO. The goal is to query once and make the query result available to all split tasks: - Run bindy before the split, which will generate a List of AED objects. - Create a small bean

Re: Enrich with data from SQL

2013-03-07 Thread Thibault Cassan
Hi Claus, I am no specialist, but in your case, it would seem the enrichment will happen only on the first line of the csv, isn't it ? From what I understood, Jean-François, would want to enrich each line, with the same data incoming from his database. What if he synchronizes two routes ? A first

Re: Enrich with data from SQL

2013-03-07 Thread 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 only for the first line of my file. .filter(simple(${property.CamelSplitIndex} == 0)) .enrich(direct:datasource, new

TransactionnalDeadLetterChannel ?

2013-03-07 Thread valerian.merkling
Hi, My route read a file, parse the xml stuff inside, valid and transform it to finally write it somewhere else. My goal is : on any unhandled error, rollback and redeliver up to X times, every Y seconds and finally send the original file on another queue. Right now, i've defined a

Re: TransactionnalDeadLetterChannel ?

2013-03-07 Thread Claus Ibsen
On Thu, Mar 7, 2013 at 11:10 AM, valerian.merkling valerian.merkl...@capgemini.com wrote: Hi, My route read a file, parse the xml stuff inside, valid and transform it to finally write it somewhere else. My goal is : on any unhandled error, rollback and redeliver up to X times, every Y

Re: Using routing slip as work around to parameterize the end point URI

2013-03-07 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 4:46 PM, ODarwish othman.darw...@progressoft.com wrote: recipient List or routing Slip will give the same result if we looking to solve the daynamic URI issue right Claus ? Yes, though with recipient list you do not need to set a header first. - Othman

Camel mina : data truncated to 1024 bytes

2013-03-07 Thread nil
Hi, I'm using camel mina component configured like this : bean id=myMinaConfig class=org.apache.camel.component.mina.MinaConfiguration property name=protocol value=tcp / property name=host value=${tcp.ip} / property name=port value=${tcp.port} / property name=sync value=false /

Re: Camel mina : data truncated to 1024 bytes

2013-03-07 Thread Claus Ibsen
Hi What Camel version do you use? I think when you use a custom codec, eg myCodecFactory Then you need to handle the line length in your codec. I think encoderMaxLineLength is only in use when using the out of box textline codec. On Thu, Mar 7, 2013 at 11:40 AM, nil icicn...@hotmail.com

Re: Camel mina : data truncated to 1024 bytes

2013-03-07 Thread nil
I forget to tell that i'm using camel 2.10.0 Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Camel-mina-data-truncated-to-1024-bytes-tp5728733p5728735.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: File component/language: preMove only

2013-03-07 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 6:40 AM, vss123 vss...@gmail.com wrote: Sorry. The Camel version we use is 2.10.3. We have a drop-zone in a file system where the other systems drop xml files. With this project we use camel to pickup these files and do processing to communicate with few other systems.

Re: Files cannot be moved on FTP

2013-03-07 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 12:05 PM, Lutter, Robin robin.lut...@t-systems.com wrote: Hi Claus, we use ftp. Setting separator to UNIX doesn't help. Contrary the error occurs earlier in process: WARN org.apache.camel.component.file.GenericFileOnCompletion - Caused by:

Re: Camel blueprint and drools

2013-03-07 Thread Claus Ibsen
Hi There is a Camel and Drools example here https://github.com/FuseByExample/camel-drools-example On Thu, Mar 7, 2013 at 1:03 PM, AlanFoster a...@alanfoster.me wrote: Hi all, Just wondering if there's any examples of drools running under blueprint? I can see that there is a camel-spring

Re: Camel blueprint and drools

2013-03-07 Thread AlanFoster
Hi Claus, Thanks for the response; I spotted this example before, but unfortunately the spring example doesn't work when trying to convert it to a blueprint bundle Do you happen to know where a blueprint bundle example can be found? :) Alan Claus Ibsen-2 wrote Hi There is a Camel and

SEAD and DIRECT route does not propagate back the exception to the calling route

2013-03-07 Thread ODarwish
SEAD and DIRECT route does not propagate back the exception to the calling route If I have route1 which has exception handling block defined at route scope , when I call route 2 using seda or direct point and exception generated for any reason inside route 2,this exception does not propagated

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 jflebesc...@gmail.com Thanks for all these explictions ! Hope I will give back my knowledge when I will have enough camel knowledge :) With filter, I goto my

Re: Camel mina : data truncated to 1024 bytes

2013-03-07 Thread nil
Hi, Thanks for reply. However, I don't see how to set this property in my app. We effectively have a custom codec bean id=myCodecFactory class=com.xxx.codec.CodecFactory property name=translator ref=translator / /bean bean id=translator

Re: How to get response from activeMQ when a message is put on queue?

2013-03-07 Thread ODarwish
hi you can add exception handler on route or context scope to send the nac reply , as for ack after sending the jms you can create the ack message and post it to tcp point e.g . from direct {onexception create nak response ,attach it to exchange body to tcp } to jms ceate ack response and

Re: Update database using Java DSL JPA

2013-03-07 Thread Claus Ibsen
On Tue, Mar 5, 2013 at 9:55 PM, Baalu golivams...@gmail.com wrote: I looked at your example and it used Camel 2.11, but we are using 2.10.3 where we dont have a hibernate component. We are using JPA component, is there any way we can use consumer.query or consumer.nativequery or a namedquery

Re: How to get response from activeMQ when a message is put on queue?

2013-03-07 Thread Claus Ibsen
On Thu, Mar 7, 2013 at 3:42 PM, jrpedersen jrpeder...@gmail.com wrote: Hi, I am trying to use Camel (mina, jms) where I receive messages on a tcp port, using mina, and decode the message before it is put on a activemq queue. I want to send a ack on tcp if the message is succesfully added to

Re: Camel blueprint and drools

2013-03-07 Thread Claus Ibsen
On Thu, Mar 7, 2013 at 2:04 PM, AlanFoster a...@alanfoster.me wrote: Hi Claus, Thanks for the response; I spotted this example before, but unfortunately the spring example doesn't work when trying to convert it to a blueprint bundle Do you happen to know where a blueprint bundle example

Re: Suspending route/context if one component can't process messages

2013-03-07 Thread Claus Ibsen
Hi Yeah you can implement a custom PollingConsumerPollingStrategy http://camel.apache.org/polling-consumer.html And then suspend/stop the consumer if it has failed to often. On Wed, Mar 6, 2013 at 5:15 PM, DOLECEK Ales ales.dole...@nextiraone.eu wrote: Hello, I have endpoints that

Re: Quartz component question

2013-03-07 Thread Claus Ibsen
On Mon, Mar 4, 2013 at 9:21 PM, Larry Meadors larry.mead...@gmail.com wrote: I have a weekly data export that uses a quart timer defined like this: quartz://circVendorRoyaltyTimer?cron=0+0+1+?+*+SAT+* The timer sends a message to a route that in turn sends a message with a date range in it

Re: SEDA and DIRECT route does not propagate back the exception to the calling route

2013-03-07 Thread ODarwish
the problem fixed by creating no error handler and refernce it in the sub routes ,then the exception back to the calling route camel:errorHandler id=noError type=NoErrorHandler - Othman Darwish ProgressSoft Corp. -- View this message in context:

Re: How to know if a component is InOnly by default

2013-03-07 Thread Hadrian Zbarcea
The route MEP is ignored by almost all the components and almost useless. So you can get it from the exchange, but it won't help you much. You need to read the doc for the components you're using and understand what they do given the uri configuration you used. My $0.02, Hadrian On

Re: Update database using Java DSL JPA

2013-03-07 Thread Baalu
Are you asking to do something like this: from(jpa1://Entity1) bean:beanName[?method=someMethod] .to(jpa1://Entity2) If possible can you tell me the actual flow... I have Entity1 and Entity2, I need to access Entity1, get a value of a column from Entity1 based on a criteria then take that

Re: Enable wire logs on Camel HTTP Proxy

2013-03-07 Thread rouble
Willem, Scott, Claus et al, Appreciate all your input. So, is there no camel way to get the logs from the client to the camel proxy? Or do I have to look at the web container (tomcat or Jetty) logs? Here is my topology: ClientCamel ProxyRemote Endpoint And my simple route:

Re: Viewing the contents of camel-cache

2013-03-07 Thread Willem jiang
camel-cache just let you know the change of the cache and help you change the content of the cache. If you want to read the content of the cache, you can use the ehcache API to access the cache content[1] [1]http://ehcache.org/documentation/code-samples#using-caches -- Willem Jiang Red

Re: Write enriched data after a split in a file

2013-03-07 Thread Willem jiang
Can you try to use the aggregator to put the transformed objects together before sending it to the file ? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com

Re: Enable wire logs on Camel HTTP Proxy

2013-03-07 Thread Willem jiang
Hi As you are using Servlet transport, I think you may consider to setup the log of web container. They you can get to whole picture of wire HTTP logs between the client and Camel Proxy. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com |

Re: How to get response from activeMQ when a message is put on queue?

2013-03-07 Thread Christian Müller
Try route id=receiver1 from uri=mina:tcp//localhost:6000?textline=falseamp;sync=trueamp;codec=#myCodec / inOnly uri=jms:myQueue /route Best, Christian On Thu, Mar 7, 2013 at 3:42 PM, jrpedersen jrpeder...@gmail.com wrote: Hi, I am trying to use Camel (mina, jms) where I receive

Re: AWS S3 Request/Reply

2013-03-07 Thread Christian Müller
Hello Daniel, please find my comments inline. Best, Christian On Tue, Mar 5, 2013 at 4:52 PM, json99 d...@vistit.se wrote: Hi, I'm trying to build a cloud enabled Camel client. To be able to transfer large files (65k) I first create a AWS S3 file with a UUID as filename. To be able to

Re: Camel multiple (nested) routes in one context

2013-03-07 Thread Christian Müller
Can you try Camel 2.10.4? http://camel.apache.org/download.html Best, Christian On Wed, Mar 6, 2013 at 10:15 AM, ddewaele ddewa...@gmail.com wrote: Hi, We're using 2.10.1. Any idea about the logging (don't know if this is related) ? The fact that it added complex-route instead of

Re: camel-smpp optional param issue ?

2013-03-07 Thread Christian Müller
Update: CAMEL-6116 is fixed. Will work on CAMEL-6121 in the next days... Best, Christian On Wed, Mar 6, 2013 at 5:07 PM, Christian Müller christian.muel...@gmail.com wrote: Will have look at the patch later today... Sent from a mobile device Am 06.03.2013 05:35 schrieb anuragg

Re: Camel mina : data truncated to 1024 bytes

2013-03-07 Thread Christian Müller
Which codec factory do you use (you didn't show us the configuration)? TextLineCodecFactory? - encoderMaxLineLength/decoderMaxLineLength are applied. ObjectSerializationCodecFactory? - encoderMaxLineLength/decoderMaxLineLength are *NOT* applied. A custom? Best, Christian On Thu, Mar 7, 2013 at

Re: Camel mina : data truncated to 1024 bytes

2013-03-07 Thread Christian Müller
Did you already checked this test: https://svn.apache.org/repos/asf/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVMCustomCodecTest.java And there are much more:

Re: Camel mina : data truncated to 1024 bytes

2013-03-07 Thread nil
We finally find the problem which was in our ProtocolEncoder implementation. In fact, the doDecode was reading just 1024 first bytes in the ByteBuffer whereas our frame (which know its length) was indicating more bytes. To prevent that, we resume reading in IoSession and returns false in doDocode