Re: setting http soTimeout via setHeader() is not working
On Wed, Jul 18, 2012 at 10:32 PM, khuss kamal.huss...@alcatel-lucent.com wrote: Hi All, I am trying to set a timeout for an HTTP connection. Based on the documentation, we need to pass a query parameter soTimeout=timeout value to activate the timeout. I am able to get this working with the following route definition from(direct:start) .to(http://test-timeout-url?httpClient.soTimeout=5000;) However, I need to dynamically create the URL so I am trying the following: from(direct:start) .setHeader(Exchange.HTTP_URI, simple(http://test-timeout-url?httpClient.soTimeout=5000;)) The above code doesn't enforce the timeout for some reason. Is there any other way to implement the timeout when we need to dynamically build a URL? See this FAQ http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html Thanks for your help. -- View this message in context: http://camel.465427.n5.nabble.com/setting-http-soTimeout-via-setHeader-is-not-working-tp5716218.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Dynamic generation of Camel routes
Hello, What you want to do sound a bit like what we did in a project. I'm not sure that this is a good solution or that it should be treated as best practice (in fact I'm quite sure that this is not the best solution) but this is how we solved it. Route recipes are stored in a database. These recipes contain information about the start and end enpoints (information used to create the URL) and also information if some optional transformation should be done in this route or not. We then have a RouteBuilder implementation that takes a recipe as a property. And in the configure we build the route based on the information in the recipe. Right now the decision is done at configure() time so a example from the configure() method would look something like this: RouteDefinition newRouteDef = from(recipe.getInput()) .routeId(recipe.getName()); if(recipe.recipe.getAmountOfRaisins() 0) { newRouteDef.process(new RaisinAdder(recipe.getAmountOfRaisins())); } /* more selections */ newRouteDef.to(recipe.getOutput()); return newRouteDef; We then have one JPA route that polls the database for new or updated recipes. If a new recipes is added we create a new RouteBuilder, set the recipe property and add it to the context. If a recipe has changed we first stop that route, remove the route and the add it in the same way as above. So far it works but we are only running about 10 routes per installation. And I am a bit worried that this solution will not scale very well since we create a completely new route for each recipe. As I said above I'm sure there are more elegant solutions to the problem. // Pontus On Thu, Jul 19, 2012 at 5:23 AM, Hadrian Zbarcea hzbar...@gmail.com wrote: The routing slip is a dynamic router that allows one to determine at runtime to what endpoints messages should be sent. It got nothing to do with the process of creating routes. The 2 choices are to either hardcode the logic described or the more elegant solution imo of defining a small dsl for that. I am going on a limb here and guess that there is some reason for generating the many routes. That reason I suspect could probably be expressed in a concise way, which would make a dsl appropriate. The requirements were quite vague but I hope my guesses are not way off. A bit more details may get you some sample code to get you started. Here are a few pointers: 1. To define a number of routes you would implement a RouteBuilder and its configure method. 2. Although virtually all examples show that you need to call from(x).to(y).blah()..., there is nothing that prevents you from implementing a method: protected void foo() { from(x).to(y).blah()...; } and call it within configure(), it'd have the same effect. 3. Next imagine that your method foo() actually takes some parameters, that would allow you to parameterize the route (you may have more than one such method). 4. Another thought is that you could actually use a Camel route (active only during startup) to extract the data from your store. Useful for unit testing and other goodies. 5. Bonus points for realizing that actually you can use a Camel Expression to evaluate the result of querying the data store and produce the value Object to parameterize the route. 6. An Expression may be useful to determine how many parameterized routes you need. 7. Add some syntactic sugar and you got your dsl. All of the above may sound complicated or advanced, but it's actually quite simple to implement. I hope this helps, Hadrian On 07/18/2012 06:55 PM, ychawla wrote: Would a routing slip work for you? You can dynamically configure where your message is going, not necessarily what your input is. However, depending on your requirements, this could suffice: http://camel.apache.org/routing-slip.html -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-generation-of-Camel-routes-tp5716223p5716225.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: soap over jms
Hi Thanks for information, but which version of jar will be helpful. I have XmlSchema-1.4.7.jar, I think this contains the said class. I also check for this class .It doesn't contain read method that takes Document String as input parameter(due to which error occured), it has other overloaded read methods. Please tell me version jar. -Thanks Bhushan -- View this message in context: http://camel.465427.n5.nabble.com/soap-over-jms-tp5715942p5716232.html Sent from the Camel - Users mailing list archive at Nabble.com.
process files in order
Hi, What is the best practice for processing 4 files one after another? The second may only start when the first is completely processed. Ordering the files is not an issue, this is working. For the moment I have 5 routes: - One for the file poller (with sorter) - 4 separate routes (direct) for each file (each has their own logic). When I run this, the files aren't processed in the right sequence... I was thinking in the direction of a wait-while (expression) thing but that doesn't exist (I think) Someone has an idea how to handle this? Thx Pieter -- View this message in context: http://camel.465427.n5.nabble.com/process-files-in-order-tp5716234.html Sent from the Camel - Users mailing list archive at Nabble.com.
NPE in CamelNamespaceHandler with JDK7
Hey everyone, after updating to JDK 7 I keep running into problems when starting up my Spring application: My Setup is: Oracle JDK 7 (build 1.7.0_05-b05), camel-{core, jms, spring}-2.10.0, spring-{beans, context, etc.}-3.1.2.RELEASE Do you have any hints how to address this issue? Thanks for your time! Kind regards, Hendrik -- View this message in context: http://camel.465427.n5.nabble.com/NPE-in-CamelNamespaceHandler-with-JDK7-tp5716241.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: cxfEndpoints and different transports (http, https) using PAX Web
Willem, thanks for the clarification regarding the registration of the cxf servlet. May I propose to add a configuration parameter to cxf that defines a service lookup filter to be used when cxf finds the http service. This should be fairly simple to introduce, if the filter config is defined then just supply it to the service lookup (should not break any existing code). No, I am not able to use an additional container since the webconsole and other web applications need to operate on the same container as my cxf endpoints / camel routes. When managed service factories were introduced (along with the CM Admin service) in OSGi (over ten years ago) on typical example that was brought up was to instantiate multiple http services from the same service bundle, and where each instance had its own configuration parameter set. I have seen no traces of Pax Web being designed to be capable of this, but if someone knows more about this I would be happy to receive some information. Thanks Lars -- View this message in context: http://camel.465427.n5.nabble.com/cxfEndpoints-and-different-transports-http-https-using-PAX-Web-tp5716216p5716233.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: cxfEndpoints and different transports (http, https) using PAX Web
I just realized from your description that CXF does not explicitly register with the http services, but rely on the Pax Web Whiteboard extender to perfom the registration. This means that it would not be possible to use a service filter between CXF and the http service (the whiteboard extender would also have to beware of this filter). I do not think that this is something that PAX Web whiteboard supports. /Lars -- View this message in context: http://camel.465427.n5.nabble.com/cxfEndpoints-and-different-transports-http-https-using-PAX-Web-tp5716216p5716236.html Sent from the Camel - Users mailing list archive at Nabble.com.
Question on Camel WireTap EIP custom thread pool creation
Hi Folks, I'm currently researching how to create custom thread pools for wiretap operations in my application. I have multiple routes and for each route I want to have an individual wiretap operation. The wiretap operation must run in a custom thread pool of poolSize maxPoolSize of 1, maxQueueSize = unbounded I've started a couple of spikes to test my configuration however i'm experiencing some unexpected behaviour. When I analyse the thread pools that are getting created, I see a custom thread pool for each route but I also see the wiretap default thread pool being created for each route aswell I'm wondering is there any way of configuring the wiretap operation to use only the custom thread pool and not both the wiretap default thread pool and custom thread pool? Any insights into this issue are much appreciated Thanks, Edwin My configuration looks like this: ThreadPoolProfile tpProfileOne= new ThreadPoolProfile(tpProfileOne); tpProfileOne.setMaxPoolSize(1); tpProfileOne.setMaxQueueSize(-1); tpProfileOne.setPoolSize(1); getContext().getExecutorServiceManager().registerThreadPoolProfile( tpProfileOne); from(EndpointA).to( EndpointB).wireTap(EndpointC).threads() .executorServiceRef(tpProfileOne) .to(EndpointD); -- View this message in context: http://camel.465427.n5.nabble.com/Question-on-Camel-WireTap-EIP-custom-thread-pool-creation-tp5716239.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel+quartz schedulers
Hi to all . I am using Camel and Quartz to schedule a job and in Quartz also i used SimpleTrigger. But the problem here is the trigger fires while we start the server itself, we don't want like that. It should fire on configured time only not at initial time. How to configure it. And the following is my configuration.. from(quartz://SchedulerJob?trigger.repeatInterval=+repeatInterval+trigger.repeatCount=+SimpleTrigger.REPEAT_INDEFINITELY) Thanks and Regards - Sudhakar Kaithepalli -- View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716240.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Question on Camel WireTap EIP custom thread pool creation
Remove the threads() as thats another EIP that also uses a thread poo.. On Thu, Jul 19, 2012 at 11:17 AM, Edwin edwin.rabbi...@gmail.com wrote: Hi Folks, I'm currently researching how to create custom thread pools for wiretap operations in my application. I have multiple routes and for each route I want to have an individual wiretap operation. The wiretap operation must run in a custom thread pool of poolSize maxPoolSize of 1, maxQueueSize = unbounded I've started a couple of spikes to test my configuration however i'm experiencing some unexpected behaviour. When I analyse the thread pools that are getting created, I see a custom thread pool for each route but I also see the wiretap default thread pool being created for each route aswell I'm wondering is there any way of configuring the wiretap operation to use only the custom thread pool and not both the wiretap default thread pool and custom thread pool? Any insights into this issue are much appreciated Thanks, Edwin My configuration looks like this: ThreadPoolProfile tpProfileOne= new ThreadPoolProfile(tpProfileOne); tpProfileOne.setMaxPoolSize(1); tpProfileOne.setMaxQueueSize(-1); tpProfileOne.setPoolSize(1); getContext().getExecutorServiceManager().registerThreadPoolProfile( tpProfileOne); from(EndpointA).to( EndpointB).wireTap(EndpointC).threads() .executorServiceRef(tpProfileOne) .to(EndpointD); -- View this message in context: http://camel.465427.n5.nabble.com/Question-on-Camel-WireTap-EIP-custom-thread-pool-creation-tp5716239.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: process files in order
On Thu, Jul 19, 2012 at 9:14 AM, pvunckx pieter.vun...@telenet.be wrote: Hi, What is the best practice for processing 4 files one after another? The second may only start when the first is completely processed. Ordering the files is not an issue, this is working. This is the default behavior of the file consumer. And if your connect routes with the direct component then its synchronous as well. So it should work processing in sequence. You must do something in your routes that goes async / concurrent. What do you do in your routes? For the moment I have 5 routes: - One for the file poller (with sorter) - 4 separate routes (direct) for each file (each has their own logic). When I run this, the files aren't processed in the right sequence... I was thinking in the direction of a wait-while (expression) thing but that doesn't exist (I think) Someone has an idea how to handle this? Thx Pieter -- View this message in context: http://camel.465427.n5.nabble.com/process-files-in-order-tp5716234.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: process files in order
Hi Claus, Thx for your tip ! Indeed, I'm calling webservices in my subroutes by adding the parameter synchronous=true they run in sequence I'll retry with a large amount of data now and post the result !! Thx Pieter -- View this message in context: http://camel.465427.n5.nabble.com/process-files-in-order-tp5716234p5716244.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel+quartz schedulers
Unless you are on a very old version the simple trigger will not fire when starting the route (the fireNow property) However if your repeat interval is small it might look like that. What I normally use is the option of delaying the start of the Quartz scheduler itself. Look for Starting the Quartz scheduler http://camel.apache.org/quartz.html 2012/7/19 Sudhakar.kaithepalli sudhakar.kaithepa...@gmail.com Hi to all . I am using Camel and Quartz to schedule a job and in Quartz also i used SimpleTrigger. But the problem here is the trigger fires while we start the server itself, we don't want like that. It should fire on configured time only not at initial time. How to configure it. And the following is my configuration.. from(quartz://SchedulerJob?trigger.repeatInterval=+repeatInterval+trigger.repeatCount=+SimpleTrigger.REPEAT_INDEFINITELY) Thanks and Regards - Sudhakar Kaithepalli -- View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716240.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: soap over jms
Hello All Thanks for your help. I am getting now following error, this error is new to me, I tried to search about this but could not get sufficient information. What is default model queue, is it required for what purpose. It also has prefix property, what are its valid values. Can any one tell me about this. [7/19/12 5:42:27:551 EDT] 000e SystemErr R Caused by: java.io.IOException: *Cannot send the request message.*[7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.cxf.transport.CamelOutputStream.commitOutputMessage(CamelOutputStream.java:98) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.cxf.transport.CamelOutputStream.doClose(CamelOutputStream.java:63) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:192) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) [7/19/12 5:42:27:551 EDT] 000e SystemErr R ... 75 more [7/19/12 5:42:27:551 EDT] 000e SystemErr R Caused by: org.apache.camel.RuntimeExchangeException: Failed to resolve replyTo destination on the exchange: Exchange[Message: [Body is instance of java.io.InputStream]] [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsProducer$1.createMessage(JmsProducer.java:161) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:211) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:154) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$1.doInJms(JmsConfiguration.java:168) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:165) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:355) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:173) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:108) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:115) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:285) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:333) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at
RE: Preventing reading of a large XML file in memory
Hi, Actually Camel already has support for what I was looking for. All I did was set the body of the message in my bean to a File object...when I pass this message down to a file endpoint it knows its a file handle and automatically reads from it. I am not sure which endpoints understand file object as message body and which dont but I suppose File and FTP atleast do. (by understand mean they realize that they are suppose to read from the File object and that the message is not just a string object). thanks From: Willem.Jiang [via Camel] [mailto:ml-node+s465427n5716226...@n5.nabble.com] Sent: Wednesday, July 18, 2012 10:10 PM To: Vishal Changrani Subject: Re: Preventing reading of a large XML file in memory Hi, How did you process the old file? Maybe you need some file cache to avoid loading the whole XML file into the memory. On 7/18/12 10:52 PM, vishal1981 wrote: Hi, Sorry to bug you again...but.. Now I have my route configuration as File - MyBean -Ftp Now MyBean converts the input file to a different format. I want to avoid doing a exchange.getOut().setBody(read new file) since the new file is huge. But somehow I want to convey to the FTP producer that FTP over the new file and not the one via message.getIn().getBody(). I tried by just setting the message header .setHeader(Exchange.FILE_NAME, new file path) but I think the FTP producer just does the getIn().getBody() irrespective of the file name. Is there a way to do this? Thanks for your help. -- View this message in context: http://camel.465427.n5.nabble.com/Preventing-reading-of-a-large-XML-file-in-memory-tp5716064p5716204.html Sent from the Camel - Users mailing list archive at Nabble.com. . -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang If you reply to this email, your message will be added to the discussion below: http://camel.465427.n5.nabble.com/Preventing-reading-of-a-large-XML-file-in-memory-tp5716064p5716226.html To unsubscribe from Preventing reading of a large XML file in memory, click herehttp://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5716064code=dmlzaGFsLmNoYW5ncmFuaUBlcmljc3Nvbi5jb218NTcxNjA2NHwxNTgwMjU0NDcx. NAMLhttp://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://camel.465427.n5.nabble.com/Preventing-reading-of-a-large-XML-file-in-memory-tp5716064p5716249.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: cxfEndpoints and different transports (http, https) using PAX Web
Hi Scott, I need to look more into your suggested solutions. Can I find more detailed information about them somewhere? Could you elaborate a bit more on what this means? locking Karaf's HTTP Service to local host Thanks Lars -- View this message in context: http://camel.465427.n5.nabble.com/cxfEndpoints-and-different-transports-http-https-using-PAX-Web-tp5716216p5716251.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Testing the routing logic in isolation (FitNesse)
Thanks David, I am implementing something along those lines. I am relatively new to Camel, and I am slightly overwhelmed by the various testing capabilities which are offered. In the integration space, I have been more used to have no testing capabilities at all ;) -- View this message in context: http://camel.465427.n5.nabble.com/Testing-the-routing-logic-in-isolation-FitNesse-tp5716212p5716252.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: soap over jms
It looks like camel have trouble the find the replyTo property. Can I have a look at you jms endpoint URI? On Thu Jul 19 21:09:49 2012, bhushand wrote: Hello All Thanks for your help. I am getting now following error, this error is new to me, I tried to search about this but could not get sufficient information. What is default model queue, is it required for what purpose. It also has prefix property, what are its valid values. Can any one tell me about this. [7/19/12 5:42:27:551 EDT] 000e SystemErr R Caused by: java.io.IOException: *Cannot send the request message.*[7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.cxf.transport.CamelOutputStream.commitOutputMessage(CamelOutputStream.java:98) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.cxf.transport.CamelOutputStream.doClose(CamelOutputStream.java:63) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:192) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) [7/19/12 5:42:27:551 EDT] 000e SystemErr R ... 75 more [7/19/12 5:42:27:551 EDT] 000e SystemErr R Caused by: org.apache.camel.RuntimeExchangeException: Failed to resolve replyTo destination on the exchange: Exchange[Message: [Body is instance of java.io.InputStream]] [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsProducer$1.createMessage(JmsProducer.java:161) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:211) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:154) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$1.doInJms(JmsConfiguration.java:168) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:165) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:355) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsProducer.processInOut(JmsProducer.java:173) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:108) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:115) [7/19/12 5:42:27:551 EDT] 000e SystemErr R at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:285) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [7/19/12 5:42:27:567 EDT] 000e SystemErr R at
Camel keeps dropping ActiveMQ connections
Hello All, I have an application running that has frequent lulls in activity. What I find is that the activemq consumers lose their connections. I have a read few posts about this and taken the suggestions to set keepAlive to true and use a connection pool: [1] keep alives http://camel.465427.n5.nabble.com/Camel-ActiveMQ-queue-listener-consumer-drops-after-inactivity-td3299709.html [2] pooled connection factory http://camel.465427.n5.nabble.com/Does-activemq-jms-component-have-keepalive-option-tc4282121.html#a4283140 Here are my activemq beans: bean id=jmsConnectionFactory class=org.apache.activemq.ActiveMQConnectionFactory property name=brokerURL value=tcp://0.0.0.0:61616?keepAlive=true / /bean bean id=pooledConnectionFactory class=org.apache.activemq.pool.PooledConnectionFactory property name=maxConnections value=8 / property name=maximumActive value=500 / property name=connectionFactory ref=jmsConnectionFactory / /bean bean id=jmsConfig class=org.apache.camel.component.jms.JmsConfiguration property name=connectionFactory ref=pooledConnectionFactory/ property name=transacted value=false/ property name=concurrentConsumers value=10/ /bean bean id=activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=configuration ref=jmsConfig/ /bean I am using Camel 2.2 and ActiveMQ 5.2. To confirm that the listeners stop, I go to the admin page and see no consumers: http://localhost:8161/admin/queues.jsp Any ideas? Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Camel-keeps-dropping-ActiveMQ-connections-tp5716255.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: cxfEndpoints and different transports (http, https) using PAX Web
As Christian suggested earlier, if you are using ServiceMix uncomment the ${SMX_HOME}/etc/org.ops4j.pax.web.cfg.empty.stub file. If you are using Karaf create the ${KARAF_HOME}/etc/org.ops4j.pax.web.cfg file. Using the SMX provided property file as the example enable the following: org.osgi.service.http.port=8181 org.ops4j.pax.web.config.file=etc/jetty.xml javax.servlet.context.tempdir=data/pax-web-jsp org.osgi.service.http.secure.enabled=true org.ops4j.pax.web.ssl.keystore=etc/servicemix.jks org.ops4j.pax.web.ssl.password=password org.ops4j.pax.web.ssl.keypassword=password org.osgi.service.http.port.secure=8443 Now add the following property to specify the bind address: org.ops4j.pax.web.listening.addresses = 127.0.0.1 This will configure the containers HTTP and HTTPS service to listen on localhost only. More configuration options and details are available here: http://team.ops4j.org/wiki/display/paxweb/Basic+Configuration You then use your Camel bundle to listen on an external port that proxies to the Localhost:Port/URI. I will do a quick write up and send out a note later today. Regards, Scott ES -- -- Scott England-Sullivan -- FuseSource Web: http://www.fusesource.com Blog: http://sully6768.blogspot.com Twitter: sully6768 On Thu, Jul 19, 2012 at 9:20 AM, helander leh...@gmail.com wrote: Hi Scott, I need to look more into your suggested solutions. Can I find more detailed information about them somewhere? Could you elaborate a bit more on what this means? locking Karaf's HTTP Service to local host Thanks Lars -- View this message in context: http://camel.465427.n5.nabble.com/cxfEndpoints-and-different-transports-http-https-using-PAX-Web-tp5716216p5716251.html Sent from the Camel - Users mailing list archive at Nabble.com.
testing pollEnrich via mock
Hello, I love the test-support of camel. Unfortunately, currently I have a problem: I want to create a route which uses a PollEnrich-component. And I want to write a test which mocks away the URI which is used by the pollEnrich-component. But I cannot manage this. I tried the following test, which fails. This means: Firstly the assertMockEndpointsSatisfied fails and secondly, when the route is executed it in fact accesses the endpoint file:asfd. (But it should not use this file since I wanted to mock it away) Any hints, how I can manage that the pollEnrich is mocked? @@Test public class TestPollEnrich extends CamelTestSupport { @Override public String isMockEndpointsAndSkip() { return file:*; } public void testStdFlow() throws Exception { getMockEndpoint(mock://file:asfd).expectedMessageCount(1); super.sendBody(direct:start, egal); assertMockEndpointsSatisfied(); } @Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from(direct:start).pollEnrich(file:asfd); } }; } } -- View this message in context: http://camel.465427.n5.nabble.com/testing-pollEnrich-via-mock-tp5716258.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: NPE in CamelNamespaceHandler with JDK7
Hello Hendrik! Thanks for reporting! Could you please ope a ticket at [1]. And it would really helpful, if you could provide a unit test or configuration which shows this problem. [1] https://issues.apache.org/jira/browse/CAMEL Best, Christian On Thu, Jul 19, 2012 at 1:00 PM, hschoeneberg schoeneb...@informatik.uni-wuerzburg.de wrote: Hey everyone, after updating to JDK 7 I keep running into problems when starting up my Spring application: My Setup is: Oracle JDK 7 (build 1.7.0_05-b05), camel-{core, jms, spring}-2.10.0, spring-{beans, context, etc.}-3.1.2.RELEASE Do you have any hints how to address this issue? Thanks for your time! Kind regards, Hendrik -- View this message in context: http://camel.465427.n5.nabble.com/NPE-in-CamelNamespaceHandler-with-JDK7-tp5716241.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: cxfEndpoints and different transports (http, https) using PAX Web
Hi Scott, and thank you very much for the information you provided so far. I am looking forward for the additional details you so kindly intended to provide. However at this point I do not understand how this will going to solve my requirements, but maybe that will be totally clear when you provide some more details Thanks Lars -- View this message in context: http://camel.465427.n5.nabble.com/cxfEndpoints-and-different-transports-http-https-using-PAX-Web-tp5716216p5716263.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Testing the routing logic in isolation (FitNesse)
Thanks for the very pleasant feedback! This helps to further improve Apache Camel. Have a nice Camel ride, Christian On Thu, Jul 19, 2012 at 4:33 PM, lorenzo ldeco...@gmail.com wrote: Thanks David, I am implementing something along those lines. I am relatively new to Camel, and I am slightly overwhelmed by the various testing capabilities which are offered. In the integration space, I have been more used to have no testing capabilities at all ;) -- View this message in context: http://camel.465427.n5.nabble.com/Testing-the-routing-logic-in-isolation-FitNesse-tp5716212p5716252.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel keeps dropping ActiveMQ connections
I assume upgrading is not an option for you? Camel 2.2 was released more than two years ago and is not supported anymore... [1] https://issues.apache.org/jira/browse/CAMEL/fixforversion/12315686 Best, Christian On Thu, Jul 19, 2012 at 5:07 PM, ychawla premiergenerat...@yahoo.comwrote: Hello All, I have an application running that has frequent lulls in activity. What I find is that the activemq consumers lose their connections. I have a read few posts about this and taken the suggestions to set keepAlive to true and use a connection pool: [1] keep alives http://camel.465427.n5.nabble.com/Camel-ActiveMQ-queue-listener-consumer-drops-after-inactivity-td3299709.html [2] pooled connection factory http://camel.465427.n5.nabble.com/Does-activemq-jms-component-have-keepalive-option-tc4282121.html#a4283140 Here are my activemq beans: bean id=jmsConnectionFactory class=org.apache.activemq.ActiveMQConnectionFactory property name=brokerURL value=tcp:// 0.0.0.0:61616?keepAlive=true / /bean bean id=pooledConnectionFactory class=org.apache.activemq.pool.PooledConnectionFactory property name=maxConnections value=8 / property name=maximumActive value=500 / property name=connectionFactory ref=jmsConnectionFactory / /bean bean id=jmsConfig class=org.apache.camel.component.jms.JmsConfiguration property name=connectionFactory ref=pooledConnectionFactory/ property name=transacted value=false/ property name=concurrentConsumers value=10/ /bean bean id=activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=configuration ref=jmsConfig/ /bean I am using Camel 2.2 and ActiveMQ 5.2. To confirm that the listeners stop, I go to the admin page and see no consumers: http://localhost:8161/admin/queues.jsp Any ideas? Thanks, Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Camel-keeps-dropping-ActiveMQ-connections-tp5716255.html Sent from the Camel - Users mailing list archive at Nabble.com.
How to invoke CXF webservice from processor bean
Hi, I have processor bean using which i would like to invoke an external webservice. I need to pass the operation name as well as parameters. If I pass the parameter in header then its ignored and if i send it via uri then I am getting error as invalid parameter name. public void process(Exchange exchange) throws Exception { ListString params = new ArrayListString(); params.add((String)exchange.getIn().getBody()); exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, processClient); try{ String reply = exchange.getContext().createProducerTemplate().requestBody(cxf:bean:PASLIEndpoint,params,String.class); System.out.println(Reply --- : +reply); exchange.getOut().setBody(reply); }catch(Exception ex){ ex.printStackTrace(); } } If I use the above code then the operation name is ignored and camel calls only the first operation in the webservice. If I use String reply = exchange.getContext().createProducerTemplate().requestBody(cxf:bean:PASLIEndpoint?operationName=processClient,params,String.class); then the parameter operationName is not identified and I get an exception. can you please tell me how should I be able to use the operation name and parameters using processor bean. Thanks a lot. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-invoke-CXF-webservice-from-processor-bean-tp5716272.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to invoke CXF webservice from processor bean
Hi, I think you didn't specify a right operation name. Can I have a look at your SEI (Service Endpoint Interface) ? On Fri Jul 20 09:34:22 2012, jeyaseelan78 wrote: Hi, I have processor bean using which i would like to invoke an external webservice. I need to pass the operation name as well as parameters. If I pass the parameter in header then its ignored and if i send it via uri then I am getting error as invalid parameter name. public void process(Exchange exchange) throws Exception { ListString params = new ArrayListString(); params.add((String)exchange.getIn().getBody()); exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, processClient); try{ String reply = exchange.getContext().createProducerTemplate().requestBody(cxf:bean:PASLIEndpoint,params,String.class); System.out.println(Reply --- : +reply); exchange.getOut().setBody(reply); }catch(Exception ex){ ex.printStackTrace(); } } If I use the above code then the operation name is ignored and camel calls only the first operation in the webservice. If I use String reply = exchange.getContext().createProducerTemplate().requestBody(cxf:bean:PASLIEndpoint?operationName=processClient,params,String.class); then the parameter operationName is not identified and I get an exception. can you please tell me how should I be able to use the operation name and parameters using processor bean. Thanks a lot. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-invoke-CXF-webservice-from-processor-bean-tp5716272.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang
Re: soap over jms
Hello Willem As I am trying to run example shared by Christian, all configuration are from that files. Please find below configurations For server: jaxws:endpoint address=camel://direct:greeterServerEndpoint id=server implementor=#greeterImpl endpointName=s2:JMSGreeterPortType serviceName=s2:JMSGreeterService xmlns:s2=http://examples/jms-greeter; / bean id=greeterImpl class=main.java.demo.jms_greeter.server.GreeterJMSImpl/ route is route from uri=jms:MyQueueName?exchangePattern=InOnly / to uri=direct:greeterServerEndpoint / setHeader headerName=SOAPJMS_contentType constanttext/xml/constant /setHeader setHeader headerName=SOAPJMS_requestURI constantjms://queue:MyQueueName/constant /setHeader /route For Client: jaxws:client id=greeterProxy address=camel://direct:greeterClientEndpoint endpointName=s2:JMSGreeterPortType serviceName=s2:JMSGreeterService xmlns:s2=http://examples/jms-greeter; serviceClass=main.java.examples.jms_greeter.JMSGreeterPortType / bean id=client class=main.java.demo.jms_greeter.client.Client property name=greeter ref=greeterProxy / /bean route is as follow, route from uri=direct:greeterClientEndpoint / setHeader headerName=SOAPJMS_contentType constanttext/xml/constant /setHeader setHeader headerName=SOAPJMS_requestURI constantjms://queue:MyQueueName/constant /setHeader to uri=jms:MyQueueName?exchangePattern=InOnly / /route Here I am running client getting previous error. From configuration my understanding is, When client is executed it will place message over queue then it will call server impl class. If I am wrong, please correct me. --Thanks Bhushan -- View this message in context: http://camel.465427.n5.nabble.com/soap-over-jms-tp5715942p5716279.html Sent from the Camel - Users mailing list archive at Nabble.com.