Re: threads question

2010-08-12 Thread Claus Ibsen
On Fri, Aug 13, 2010 at 2:26 AM, Ron Smith wrote: > I don't really want a new bean every time it is called. I just want one for > each thread. Why do you want to share state on the bean? You can easily code a method which is thread safe by not using any shared objects. And what's there really to

Re: ApplicationContextTestSupport class not found in Camel 2.3

2010-08-12 Thread Claus Ibsen
Hi On Fri, Aug 13, 2010 at 4:22 AM, vcheruvu wrote: > > Hi, > >  I am looking at Camel-Mock component site. According to the spring example > comments, I believe it is out of date for Camel 2.0+ versions. I haven't > been able to follow your example with Camel 2.3 version. Could you please > let

ApplicationContextTestSupport class not found in Camel 2.3

2010-08-12 Thread vcheruvu
Hi, I am looking at Camel-Mock component site. According to the spring example comments, I believe it is out of date for Camel 2.0+ versions. I haven't been able to follow your example with Camel 2.3 version. Could you please let me know if you could update the example that works with Camel 2.3

Re: threads question

2010-08-12 Thread Ron Smith
I don't really want a new bean every time it is called. I just want one for each thread. On Thu, Aug 12, 2010 at 1:22 PM, Claus Ibsen wrote: > On Thu, Aug 12, 2010 at 7:19 PM, Ron Smith wrote: > > I have created a route like this: > > > > from("tibco:queue:myqueue") > >.threads(10) > >.

camel 1.6.2 and jaxb-impl 2.1.12 and errorHandlerRef

2010-08-12 Thread Eric Haszlakiewicz
I'm having some problems with using a default errorHandlerRef on a camelContext element in my spring config. I am using camel 1.6.2. Everything works fine when I use a version of jaxb-impl that is prior to 2.1.12, but if I use 2.1.12 or newer the errorHandlerRef doesn't seem to take effect. Sp

Re: Blog: Dynamic FTP Client using Apache Camel and Spring

2010-08-12 Thread Mattias Severson
Thank you very much for your comments, highly appreciated. Of course, you are welcome to link to my post. I have corrected the blog post with the error that you found. Regards, Mattias Severson -- View this message in context: http://camel.465427.n5.nabble.com/Blog-Dynamic-FTP-Client-using-Ap

Scala DSL: splitting

2010-08-12 Thread Andrey Popp
Hello, I want to implement that piece of configuration in Scala DSL, but can't find the solution: from("direct:in").split(body()).to("direct:out") The problem is the split() statement, Scala DSL's split has type (Exhange => Any) but what should I do inside this function? Thanks! -- Andrey Popp

Re: threads question

2010-08-12 Thread Claus Ibsen
On Thu, Aug 12, 2010 at 7:19 PM, Ron Smith wrote: > I have created a route like this: > > from("tibco:queue:myqueue") >    .threads(10) >    .bean(StepOne.class, "handleMessage") >    .bean(StepTwo.class, "handleMessage") > > > I had been testing my app without the threads(). After adding the thre

Re: Blog: Dynamic FTP Client using Apache Camel and Spring

2010-08-12 Thread Claus Ibsen
The only issue I could spot from the code is that you have a method createFtpUri but in the send method you invoke getFtpUri method. On Thu, Aug 12, 2010 at 8:15 PM, Claus Ibsen wrote: > Hi Mattias > > Just commented on your blog. I think its a very well written blog. I > took the liberty and ad

Re: Blog: Dynamic FTP Client using Apache Camel and Spring

2010-08-12 Thread Claus Ibsen
Hi Mattias Just commented on your blog. I think its a very well written blog. I took the liberty and added a link to it from the camel website https://cwiki.apache.org/confluence/display/CAMEL/Articles It will be synced to the static html pages in several hours. On Thu, Aug 12, 2010 at 7:56 PM

Blog: Dynamic FTP Client using Apache Camel and Spring

2010-08-12 Thread Mattias Severson
Hi all! I have written a blog post about how Apache Camel and Spring can be used to implement a dynamic FTP client. Feel free to add comments, questions or suggestions how it can be improved: http://blog.jayway.com/2010/08/12/dynamic-ftp-client-using-apache-camel-and-spring/ http://blog.jayway.c

threads question

2010-08-12 Thread Ron Smith
I have created a route like this: from("tibco:queue:myqueue") .threads(10) .bean(StepOne.class, "handleMessage") .bean(StepTwo.class, "handleMessage") I had been testing my app without the threads(). After adding the threads() I was surprised to find that it still only creates one in

Re: Camel, OSGI and container wide Camel route lookups

2010-08-12 Thread rlg673
Let me know if the following Servicemix-NMR method will accomplish what you are looking to do: nmr.getEndpointRegistry().lookup(yourTargetEndpoint). The camel-nmr docs describe how the "nmr" component is exposed in camel. You may also find the following link useful: http://servicemix.apache.org/SM

AW: request / response example

2010-08-12 Thread Schneider Christian
Hi Mark, you don´t have to set the header by hand. If you use a route for the client then Camel will automatically create a temporary reply queue, set the header field and listen for the response. The code below would allow you to send requests to the direct endpoint that travel to the jms que

Re: request / response example

2010-08-12 Thread Claus Ibsen
On Thu, Aug 12, 2010 at 4:33 PM, Mark Webb wrote: > OK, cool.  I got that to work.  Now what about the case in which I do > not want to set the JMSReplyTo header field?  How would that work? > Thats the event message EIP pattern http://camel.apache.org/event-message.html > Thanks for the help

Re: request / response example

2010-08-12 Thread Mark Webb
OK, cool. I got that to work. Now what about the case in which I do not want to set the JMSReplyTo header field? How would that work? Thanks for the help On Wed, Aug 11, 2010 at 4:51 PM, Claus Ibsen wrote: > If the JMS message has a JMSReplyTo header then the JMS consumer will > use request

Re: Camel 2.4 - InterceptStrategy error

2010-08-12 Thread Claus Ibsen
Charles can you attach / post your interceptor logic in the JIRA ticket? If there is company sensitive information in it, then remove/change the stuff. I just wanna see how you have created the interceptor stuff. On Thu, Aug 12, 2010 at 1:12 PM, Charles Moulliard wrote: > It works fine if I rem

Re: Camel, OSGI and container wide Camel route lookups

2010-08-12 Thread Christian Mueller
Hello Ade, Ron and Claus! Thanks for your responses. I assume that I can send/receive a message in SMX using Camel in this way: first OSGI bundle: {code} from("direct:start") .to("nmr:orderEntryPreProcessor"); {code} second OSGI bundle: {code} from("nmr:orderEntryPreProcessor") .to("moc

Re: Camel 2.4 - InterceptStrategy error

2010-08-12 Thread Claus Ibsen
On Thu, Aug 12, 2010 at 1:12 PM, Charles Moulliard wrote: > It works fine if I remove the intercept strategy in the camel route > >                // getContext().addInterceptStrategy( >                //        new AuditInterceptStrategy(getRepository())); > > Here is the trace about what the moc

Re: Camel 2.4 - InterceptStrategy error

2010-08-12 Thread Charles Moulliard
It works fine if I remove the intercept strategy in the camel route // getContext().addInterceptStrategy( //new AuditInterceptStrategy(getRepository())); Here is the trace about what the mock:error endpoint receive 35531 [main] INFO org.apache.camel.compon

Re: Camel 2.4 - InterceptStrategy error

2010-08-12 Thread Claus Ibsen
And it only occurs when you use the intercept strategy? If you remove it, does it work then? Sending to the mock:error endpoint? On Thu, Aug 12, 2010 at 12:50 PM, Charles Moulliard wrote: > Hi, > > We get the following error when we try to use the following camel route + > test > Is it a bad con

Camel 2.4 - InterceptStrategy error

2010-08-12 Thread Charles Moulliard
Hi, We get the following error when we try to use the following camel route + test Is it a bad configuration or a bug ? 1) Error 40781 [main] INFO org.apache.camel.impl.DefaultCamelContext - Route: route1 started and consuming from: Endpoint[direct://in-only] 40781 [main] INFO org.apache.camel.i

Re: content based routing based on header value

2010-08-12 Thread Mark Webb
I see that the latest MEAP of Camel In Action answers this question in the first page of Appendix A. On Tue, Aug 10, 2010 at 11:56 AM, Claus Ibsen wrote: > On Tue, Aug 10, 2010 at 5:42 PM, Mark Webb wrote: >> I am setting up a route in XML and want to send messages to a >> destination based on a

Re: Consumers need to restart when ActivemQ restarts

2010-08-12 Thread Sri
I have tried with setting jms.prefetchPolicy.queuePrefetch=1 but still there is no difference. -- View this message in context: http://camel.465427.n5.nabble.com/camel-failover-and-prefetchPolicy-are-not-working-together-tp2428233p2473072.html Sent from the Camel - Users (activemq) mailing list

Re: Error Handling in Camel routes

2010-08-12 Thread Claus Ibsen
On Thu, Aug 12, 2010 at 10:33 AM, somemightsay wrote: > > I've been looking into this for quite a while but still haven't been able to > find a definitive answer. > > How do you add error handling to a route such as the following: > > from("inputdir") > .startupOrder(1) > .setBody(constant(query))

Error Handling in Camel routes

2010-08-12 Thread somemightsay
I've been looking into this for quite a while but still haven't been able to find a definitive answer. How do you add error handling to a route such as the following: from("inputdir") .startupOrder(1) .setBody(constant(query)) .to("jdbc:vprsitdb") .marshal(csv) .to("TargetDir"); Obviously you c

Re: Consumers need to restart when ActivemQ restarts

2010-08-12 Thread Claus Ibsen
On Tue, Aug 10, 2010 at 3:21 PM, Sri wrote: > > It works when I remove jms.prefetchPolicy.queuePrefetch=0 from the URI but > not when I included > -- And if you set the value to 1 instead of 0, just to see if this makes a difference. > View this message in context: > http://camel.465427.n5.nab