Re: adding headers to a message based on a databse query

2012-06-06 Thread Alexander Kaiser
Hi Claus, thanks for your answer! Isn't it so that setHeader only sets one (named) header? So to set multiple headers from a single query I do have to use content enricher + custom aggregation strategy? Alexander 2012/6/7 Claus Ibsen > The setHeader DSL uses an expression, so if you can write

Re: java.lang.ClassNotFoundException: org.apache.cxf.message.MessageContentsList

2012-06-06 Thread Christian Müller
Do you have camel-cxf on your classpath? Best, Christian Sent from a mobile device Am 07.06.2012 05:26 schrieb "semecamel" : > I am trying to put an object to jms queue, i am getting this error. > > java.lang.ClassNotFoundException: > org.apache.cxf.message.MessageContentsList > > Here is my ro

Re: How to force rollback in spring DSL route?

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 10:16 PM, dunnlow wrote: > Hi, I have a transacted route in Spring DSL that calls a service (via HTTP > post).  I want to examine the response from that service and force a > rollback depending on the returned value.  Basically something like: > > >   >   >   headerName=

Re: Java or Scala DSL in a Web App

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 10:09 PM, rdifrango wrote: > I was looking at how to integrate Camel into a Web app and according to this: > > http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html > > It is only possible to do if you are using Spring and you are using the > Spring DSL.

Re: sftp to remote server and move ftpied file to other location on remote server

2012-06-06 Thread Claus Ibsen
Hi The move option is only for the *consumer* as its listed in the consumer table http://camel.apache.org/file2 In the producer you can use the tempFilename to write using a temporary file, and then afterwards have the file moved/renamed to the target file name. On Wed, Jun 6, 2012 at 9:41 PM,

Re: adding headers to a message based on a databse query

2012-06-06 Thread Claus Ibsen
The setHeader DSL uses an expression, so if you can write an expression that gets the SQL result then that can be done without a processor. You can also use the content enricher, but then you would need to write a custom aggregation strategy to enrich the headers. On Wed, Jun 6, 2012 at 11:18 PM,

Re: Rethrow original exception

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 8:34 PM, pvenini wrote: > Hi, > I've a situation where a route can throw many kinds of exceptions, say A, B, > and C. If exception is class A I should let it pass; if it's any other kind > of exception I should throw a new exception of class A. > > doTry(). >  . >  . >  . >

Re: java.lang.ClassNotFoundException: org.apache.cxf.message.MessageContentsList

2012-06-06 Thread Claus Ibsen
Hi Which version of Camel do you use? And where do you get the exception? And btw its not a good idea to send Objects to a JMS queue. Then the consumer need to have the classes on its classpath, and they need to be compatible etc. Since you use web services you can send Text instead, which mean t

Re: Transacted vs DeadLetterQueue

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 6:13 PM, James Carman wrote: > What if I want to do this the "camel way"?  Is there any support in Camel > to handle this type of situation reliably without losing messages? > Nothing is reliable. You would need to use for example Camel's dead letter channel, and send the

Re: Define Point of Entry for Redelivery Attempts

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 4:15 PM, Nick Dimos wrote: > Hi all, > > Is there a best practice in redelivery policy to define the point of entry > for redelivery attempts? > I would like to override the default behavior of redelivering from the > point of problem and define > i.e. as header in the onExc

Re: Difference between splitter and custom thread

2012-06-06 Thread Claus Ibsen
On Thu, Jun 7, 2012 at 3:29 AM, Deepthi wrote: > What is the difference between camel splitter and creating a custom thread > using thread pool profile. > You cannot compare that. Its apples to oranges. The splitter is an EIP And a thread is a thread. > Thanks, > Deepthi > > -- > View this mess

Re: Generate a thread for each db record

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 6:26 PM, James Carman wrote: > I was just saying don't generate a new thread for each record, use a pool. > Yes I agree a pool is better and the splitter uses that already if enabling concurrency, either with the parallel or executorService ref options. > > On Wed, Jun

Re: Camel Error handling throwing exception; not moving to error queue

2012-06-06 Thread javaxmlsoapdev
Apparently stacktrace in my previous thread was coming from EndpointMessageListener. Means exception was being thrown before camel receiving the message hence all efforts to configure onException() and errorHandler() on a route failed. After configuring following two properties on a camel JMS comp

How to force rollback in spring DSL route?

2012-06-06 Thread dunnlow
Hi, I have a transacted route in Spring DSL that calls a service (via HTTP post). I want to examine the response from that service and force a rollback depending on the returned value. Basically something like: POST utf-8 test/xml ${header.CamelHttpRes

Java or Scala DSL in a Web App

2012-06-06 Thread rdifrango
I was looking at how to integrate Camel into a Web app and according to this: http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html It is only possible to do if you are using Spring and you are using the Spring DSL. Is there a way other than having to use Spring? -- View thi

sftp to remote server and move ftpied file to other location on remote server

2012-06-06 Thread paramjyotsingh
I have two server A and B. I am trying to sftp a file from A to B. A is source and B is destination. When I sftp to B location is /a/test1, after my sftp is done I want to move my file from /a/test1 to /a/test2 i tried following configuration ftp://@://?move=" /> Can someo

java.lang.ClassNotFoundException: org.apache.cxf.message.MessageContentsList

2012-06-06 Thread semecamel
I am trying to put an object to jms queue, i am getting this error. java.lang.ClassNotFoundException: org.apache.cxf.message.MessageContentsList Here is my route code: String cxfEndpoint = "cxf:/MyOrderService" + "?serviceClass=integration.camel.ws.MyOrderService"; from(

Re: Generate a thread for each db record

2012-06-06 Thread James Carman
I was just saying don't generate a new thread for each record, use a pool. On Wed, Jun 6, 2012 at 12:16 PM, Claus Ibsen wrote: > On Wed, Jun 6, 2012 at 6:11 PM, James Carman > wrote: > > You'd be better off using a thread pool. Try using the "threads" DSL > > construct. > > > > That wont help

Re: Generate a thread for each db record

2012-06-06 Thread Deepthi
Thanks Claus. This works. I have another question. When I use the split and parallel processing as true, can i control the number of threads to be processed simultaneously. If the split EIP doesnt support it, should I use multi-threading? Thanks, Deepthi -- View this message in context: http://

Rethrow original exception

2012-06-06 Thread pvenini
Hi, I've a situation where a route can throw many kinds of exceptions, say A, B, and C. If exception is class A I should let it pass; if it's any other kind of exception I should throw a new exception of class A. doTry(). . . . doCatch(A.class). //Let it pass forward doCatch(Exception.cl

Re: Generate a thread for each db record

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 6:11 PM, James Carman wrote: > You'd be better off using a thread pool.  Try using the "threads" DSL > construct. > That wont help as he want a seperate thread for each record in the SQL result set. So if it returns 53 rows, he want 53 tasks, to be executed by a thread pool

Re: Transacted vs DeadLetterQueue

2012-06-06 Thread James Carman
What if I want to do this the "camel way"? Is there any support in Camel to handle this type of situation reliably without losing messages? On Wed, Jun 6, 2012 at 12:11 PM, Claus Ibsen wrote: > On Wed, Jun 6, 2012 at 6:08 PM, James Carman > wrote: > > What happens if you have a "poisonous" (ju

Re: Generate a thread for each db record

2012-06-06 Thread James Carman
You'd be better off using a thread pool. Try using the "threads" DSL construct. On Wed, Jun 6, 2012 at 12:09 PM, Deepthi wrote: > Hi, > > In my route my source is retrieving records from a table by executing > following query: > select * from tablename > and I would like to generate a thread fo

Re: Generate a thread for each db record

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 6:09 PM, Deepthi wrote: > Hi, > > In my route my source is retrieving records from a table by executing > following query: > select * from tablename > and I would like to generate a thread for each record to process the records > simultaneously. > How can I achieve this in c

Re: Transacted vs DeadLetterQueue

2012-06-06 Thread Claus Ibsen
On Wed, Jun 6, 2012 at 6:08 PM, James Carman wrote: > What happens if you have a "poisonous" (just plain bad) message on the queue > and not a system outage?  You'll continually put the message back on the > queue (by rolling back your transaction) and retry it, thereby blocking all > the subseque

Generate a thread for each db record

2012-06-06 Thread Deepthi
Hi, In my route my source is retrieving records from a table by executing following query: select * from tablename and I would like to generate a thread for each record to process the records simultaneously. How can I achieve this in camel spring 2.8.0? If i use a timer as my source and give the

Re: Transacted vs DeadLetterQueue

2012-06-06 Thread James Carman
What happens if you have a "poisonous" (just plain bad) message on the queue and not a system outage? You'll continually put the message back on the queue (by rolling back your transaction) and retry it, thereby blocking all the subsequent messages in the queue. Right? -- View this message in co

Help Cfx ws endpoint to JMS not Working

2012-06-06 Thread semecamel
I have ws as entry point, but my ws is not being called when I send a soap message. How I do send an object web service call to jms queue and then process object from the queue? Here is the detail String cxfEndpoint = "cxf:/ServiceWSPort" + "?serviceClass=com.ServiceWS"

Re: connectionFactory must be specified

2012-06-06 Thread Willem Jiang
Hi, You are not use the cxf jms transport rightly. In CXF there are lots of transports component and they are do nothing with the camel-jms component, unless you are using camel transport of cxf[1]. You can setup the JMS URI[2] like the camel-jms component as the cxf endpoint address. [1]h

Define Point of Entry for Redelivery Attempts

2012-06-06 Thread Nick Dimos
Hi all, Is there a best practice in redelivery policy to define the point of entry for redelivery attempts? I would like to override the default behavior of redelivering from the point of problem and define i.e. as header in the onException declaration the name of processor from where to retry the

Re: Tokenize Group - Spring DSL

2012-06-06 Thread Leandro Franchi
Ok, It works! I've used 2.10-SNAPSHOT ... tks On Wed, Jun 6, 2012 at 10:49 AM, Claus Ibsen wrote: > Hi > > You need Camel 2.10 > > On Wed, Jun 6, 2012 at 3:39 PM, Leandro Franchi > wrote:

Possible threading issue

2012-06-06 Thread jhart
*When I run this route heavily multithreaded camel route I am getting a NullPointerException thrown in the CaseInsensitiveMap when it is copying the exchanges for the multicast. I am using version 2.9.2, though 2.10-SNAPSHOT has the same issue. I am doing this to reduce the latency and increase t

Re: Tokenize Group - Spring DSL

2012-06-06 Thread Claus Ibsen
Hi You need Camel 2.10 On Wed, Jun 6, 2012 at 3:39 PM, Leandro Franchi wrote: > Hi, > > I'm having an error when I'm using the folow Spring DSL: > > > errorHandlerRef="switchReaderErrorHandler"> > > > > ${file:ext} == 'txt' > > > > > > > > > > > > The stacktrace: > > Caused by: org.x

Re: Transacted vs DeadLetterQueue

2012-06-06 Thread gramanero
Thanks Claus. So is collision avoidance a different mechanism than the exponential back-off settings or do they work together? -- View this message in context: http://camel.465427.n5.nabble.com/Transacted-vs-DeadLetterQueue-tp5713992p5714060.html Sent from the Camel - Users mailing list archive

connectionFactory must be specified

2012-06-06 Thread semecamel
Hello, I am working with camel and cxf, but I am new to camel. I want cxf endpoint to put a message to a jms queue (activemq). I setup activemq in beans.xml and create java dsl code, but during deployment time I am getting org.apache.camel.RuntimeCamelException: java.lang.IllegalArgumentException

Re: [FTP] Sending a file via FTP from a Windows machine to a Linux machine creates a new folder

2012-06-06 Thread Aida
That worked, thank you! -- View this message in context: http://camel.465427.n5.nabble.com/FTP-Sending-a-file-via-FTP-from-a-Windows-machine-to-a-Linux-machine-creates-a-new-folder-tp5714030p5714050.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Help with setting multiple parameters with SQL

2012-06-06 Thread Claus Ibsen
On Tue, Jun 5, 2012 at 8:17 PM, Deepthi wrote: > If i want to generate 1 thread for each of the row retrieved by executing > select statement, using quartz will not help me rite? > > How can I implement it? > Take a look at the EIP patterns. They are the building blocks. http://camel.apache.org/e

Re: Transacted vs DeadLetterQueue

2012-06-06 Thread Claus Ibsen
On Tue, Jun 5, 2012 at 8:12 PM, gramanero wrote: > Thanks for the response Christian. > > I have been reading through the Camel in Action and ActiveMQ in Action books > most of the day today. I'm starting to get a better understanding of how > transactions work and that definitely seems like the w

Re: No hit during Multicast

2012-06-06 Thread kenhans
I use the filter EIP as described in previous post, but I can not seem to find the CamelFilterMatched property anywhere. How do I obtain it? The only properties I see are the three listed below. Should the CamelFilterMatched be in the same list? I'm using Camel 2.9.0 http://camel.465427.n5.nabble.