Re: Aggregate exchanges until before EoF

2013-03-06 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 4:05 PM, cristisor wrote: > Yes, I already used aggregators to build batches of data that I will later > use for db operations and they work great. But I don't know how to implement > a custom splitter that, for example, sets the file complet flag only on the > last split li

Re: Enrich with data from SQL

2013-03-06 Thread Claus Ibsen
On Thu, Mar 7, 2013 at 8:03 AM, Jean Francois LE BESCONT wrote: > 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 ? > I dont think people can understand what you try to do and pasting a lot of code and with little

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 example : > > .from(...) > .split() > .tokeniz

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

2013-03-06 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 11:10 PM, fbarbat wrote: > In http://camel.apache.org/event-message.html it says that "The default > behaviour of many Components is InOnly such as for JMS, File or SEDA". How > can I know if a specific component is InOnly? For example, the "direct" > component. > You can r

How to know if a component is InOnly by default

2013-03-06 Thread fbarbat
In http://camel.apache.org/event-message.html it says that "The default behaviour of many Components is InOnly such as for JMS, File or SEDA". How can I know if a specific component is InOnly? For example, the "direct" component. Thanks. -- View this message in context: http://camel.465427.n5.

Database driven quartz triggers to manage HA in application

2013-03-06 Thread gilboy
Hi I am planning on deploying 2 instances of my application to a cluster. I want both instances to be running in a Hot mode. Within my application I have a number of routes which are driven by a quartz scheduler. I was planning on using the database driven triggers for the quartz component. >Fro

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
I made a mistake in my test. It doesn't do what expected ... Still the same example : .from(...) .split() .tokenize("\n") .streaming() .unmarshal() .bindy(BindyType.Csv, AED.class) .enrich("direct:refreshReferentielDynamic", new AggregationEnrichissementZone()) And a : from("direct:refreshRefer

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

2013-03-06 Thread DOLECEK Ales
Hello, I have endpoints that communicate with 3rd party proprietary backend server. If connection to the server is lost processing fails and Camel tries to re-process the exchanges again and again, until the connection is restored and the exchanges might pass through. Since there is high traffi

Re: camel-smpp optional param issue ?

2013-03-06 Thread Christian Müller
Will have look at the patch later today... Sent from a mobile device Am 06.03.2013 05:35 schrieb "anuragg" : > Hi , > > Attached the patch which includes support for optional params and added the > test case . The optional params have to be set in exchange headers and > value > of which should be

Re: Aggregate exchanges until before EoF

2013-03-06 Thread cristisor
Yes, I already used aggregators to build batches of data that I will later use for db operations and they work great. But I don't know how to implement a custom splitter that, for example, sets the file complet flag only on the last split line, is this possible? -- View this message in context:

Re: Aggregate exchanges until before EoF

2013-03-06 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 3:51 PM, cristisor wrote: > No, I want to send that last line without aggregating it, or aggregating it > as the first and only exchange of that aggregation strategy. What I actually > need is to have a final exchange, containing a line from the file and the > FILE_COMPLETE

Re: Aggregate exchanges until before EoF

2013-03-06 Thread cristisor
No, I want to send that last line without aggregating it, or aggregating it as the first and only exchange of that aggregation strategy. What I actually need is to have a final exchange, containing a line from the file and the FILE_COMPLETE header, that gets sent through a few service units, each p

Re: Aggregate exchanges until before EoF

2013-03-06 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 3:02 PM, cristisor wrote: > Hello, > > Hi guys, > > I'm processing a file line by line and I want to aggregate all the exchanges > (lines) until the one that has "Exchange.SPLIT_COMPLETE", basically I want > to send the aggregated exchanges just before aggregating the final

Re: Feature creation properties

2013-03-06 Thread Claus Ibsen
Hi You also posted this question a bit earlier to http://fusesource.com/forums/thread.jspa?threadID=4680&tstart=0 Please when you post the same question multiple places, then tell us. So when people read this post months later if they have similar question, they can find the other place where a

Re: Catch NoSuchComponentException in org.apache.camel.impl.CompositeRegistry#lookup

2013-03-06 Thread Willem jiang
Yes, The CompositeRegistry should keep looking the registry and catch the exception. I just fill a JIRA[1] for it. [1]https://issues.apache.org/jira/browse/CAMEL-6135 -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog:

Feature creation properties

2013-03-06 Thread jinaLu
Hi, I need to have possibility to turn off or turn on route execution. I was thinking about route stopping in serviceMix, but it starts again after server restart or redeployment of bundle. The only idea I came with is to have some property there it will be configured which routes to create, but I

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 called every time. > > > > When I pars

Aggregate exchanges until before EoF

2013-03-06 Thread cristisor
Hello, Hi guys, I'm processing a file line by line and I want to aggregate all the exchanges (lines) until the one that has "Exchange.SPLIT_COMPLETE", basically I want to send the aggregated exchanges just before aggregating the final one. When the last exchange arrives it should be in the case w

Re: Enrich with data from SQL

2013-03-06 Thread 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 called every time. > > When I parse a file, big query with all the datasource while be called > every, is there

Send file via POST request

2013-03-06 Thread jamalissimo
Hello guys, I am currently working on quite exciting assignment. Here is what I want to do: @GET REST response -> CXF to get parameters from exchange -> 3rd Party API to get session_id -> BEAN to send data via POST method and in multipart/mixed( it is for uploading files ) My first problem is th

Re: camel-smpp optional param issue ?

2013-03-06 Thread anuragg
Hi , Attached the patch which includes support for optional params and added the test case . The optional params have to be set in exchange headers and value of which should be OptionalParam(jsmpp object) . More, we would also need the changes for CAMEL-6116. If possible, please ensure these cha

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
When we do an enrich, the *resourceUri ( in my example *.enrich("direct:ds", new AggregationStrategyRessource())) is called every time. When I parse a file, big query with all the datasource while be called every, is there a trick to tell the route to execute only one ? I have watch camel cache b

Re: Files cannot be moved on FTP

2013-03-06 Thread Lutter, Robin
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: [org.apache.camel.component.file.GenericFileOperationFailedException - File operation failed: 550 Failed to change

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 > wrote: > > My

Re: Files cannot be moved on FTP

2013-03-06 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 10:31 AM, Lutter, Robin wrote: > Hi Filippo Balicchia, > > i can confirm, that move works with camel-ftp 2.10.4 and apache > ftpserver project on windows maschine with JDK 1.6.0_33. > While running with ftp server under RHEL 6 move failed with errorcode > 550. Rename works w

Re: direct-vm in OSGI

2013-03-06 Thread Antoni Myłka
2013/3/6 Guillaume Nodet : > On Wed, Mar 6, 2013 at 2:17 AM, Raúl Kripalani wrote: > >> Blueprint starts bundles asynchronously, which leads to the start level >> not being honoured in most cases. And if it is honoured, it's by fluke and >> not by design. >> Aries Blueprint 0.4 introduces an optio

Re: Files cannot be moved on FTP

2013-03-06 Thread Lutter, Robin
Hi Filippo Balicchia, i can confirm, that move works with camel-ftp 2.10.4 and apache ftpserver project on windows maschine with JDK 1.6.0_33. While running with ftp server under RHEL 6 move failed with errorcode 550. Rename works with commandline. Logs from ftpserver: > CWD 2012120100.OML

Re: Enrich with data from SQL

2013-03-06 Thread Claus Ibsen
On Wed, Mar 6, 2013 at 10:26 AM, Jean Francois LE BESCONT wrote: > My mistake ...I used resource.getOut().getBody(); instead > od resource.getIn().getBody(); > Yeah see this FAQ http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html > > public Exchange aggregate(Exchange ori

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
My mistake ...I used resource.getOut().getBody(); instead od resource.getIn().getBody(); public Exchange aggregate(Exchange original, Exchange resource) { AED originalBody = (AED)original.getIn().getBody(); Object resourceResponse = (Object) resource.getIn().getBody(); LOG.info("or

Re: Camel XQuery - Saxon

2013-03-06 Thread Phobos
Hi, I've tried the following; Define myNamespaces in the context as a spring bean; Route; > from("direct:transform-queue"). > to("xquery:transform.xqy?namespaces=#myNamespaces"). > to("l

Re: Camel multiple (nested) routes in one context

2013-03-06 Thread ddewaele
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 "main-route" in the log for an exchange that never entered the complex-route ? [Camel (camelContext) thread #8 - vm://input] complex-route - Using real dispatche

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
Thanks Raul ! I haven't found simple example enrich here ( http://camel.apache.org/content-enricher.html, direct:resource in never explains ). Perharps that I haven't understand fondamental but it's a huge framework and learning needs time :) So I have a querie : from("direct:refreshReferentiel

Re: Camel multiple (nested) routes in one context

2013-03-06 Thread Claus Ibsen
Hi What Camel version do you use. We had a bug a while back with the onException may select the wrong one. On Wed, Mar 6, 2013 at 9:14 AM, ddewaele wrote: > I guess the xml snippet got lost in the markup > > I've simplified the flows somewhat but everything should be in there > > The

Re: Enrich with data from SQL

2013-03-06 Thread Jean Francois LE BESCONT
Hey ! A picture is sometime better than explication :) I try to make a really simple test ( equivalent of MAP with lookup in ETL) : - | TABLE TEST |

Re: Enrich with data from SQL

2013-03-06 Thread Raul Kripalani
You are returning the original exchange. That's why it appears as if nothing happened in the enrichment. The idea behind enriching is that you alter the original exchange with some values from the "call out" exchange, e.g. adding properties or headers, augmenting the body with more data, etc. Ther

Catch NoSuchComponentException in org.apache.camel.impl.CompositeRegistry#lookup

2013-03-06 Thread smokemaker
Hi, all! I use Camel 2.10.3 in ServiceMix 4.5.0 Could someone please explain how to use org.apache.camel.impl.CompositeRegistry? I've got CamelContext, defined in bundle "A" and want to dynamically add to it a registry for resolving components from bundle "B". 1. I get the context's registry:

Re: Camel multiple (nested) routes in one context

2013-03-06 Thread ddewaele
I guess the xml snippet got lost in the markup I've simplified the flows somewhat but everything should be in there The main questions are : * why is the complex-route's onException triggered when an exchange never went into the complex-route but stayed in the main-route * logging :