Re: mvn build with -Pfastinstall not enabling noassembly flag?
On Wed, Jul 31, 2013 at 2:45 AM, Willem jiang willem.ji...@gmail.com wrote: It looks like setting the properties through the Profile doesn't work. To work around it we could disable the assembly step by default, but we need to enable it by using -Passembly when doing deploy and release. Any thought? -1 I want the assembly to run when I do my builds to ensure that it works. And this has been the default every since the start of the project. -- 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 (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, July 31, 2013 at 5:39 AM, Christian Müller wrote: It's the same for me. I think the intention was to skip the assembly step... Feel free to fix it. Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Fri, Jul 19, 2013 at 12:14 PM, Aki Yoshida elak...@gmail.com (mailto:elak...@gmail.com) wrote: I would like to avoid the lengthy assembly step in the build at the end when I quickly just build the camel project. By looking at camel's parent/pom.xml, it seems that it was intended to not assemble the distribution when built with the fastinstall profile. profile idfastinstall/id activation property namefastinstall/name /property /activation properties maven.test.skip.exectrue/maven.test.skip.exec noassemblytrue/noassembly /properties but I see the assembly phase is always executed when I built it with -Pfastinstall. I can only disable the assembly step by setting the noassembly flag explicitly like: mvn -Dnoassembly=true -Pfastinstall Not sure if anyone have this problem, it is intended that way or has something to do with my environment? thanks. aki -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: best practice for logging execution time
Claus, I have to figure out how many messages we can put trough one Camel instance. We need to at least manage to route 1000 messages a second. Looking at the JMX stats I see each message takes about 10ms. I was wondering how can Identify where the times are spent and how I can improve my route! What the route does is receive a messages from JMS topic convert it from JSON String to a JSON Object and for send tto javaspaces. The javaspaces right is a clusted write do the performance is bad. So I added a aggregator in front of the javaspaces and now I am writing 10 messages at the time to javaspaces. So the question how to measure the times from receiving the 10 messages received until they get written in javaspaces. route from uri=jms:topic:topic1 unmarshal ref=csJSON/ to uri=direct:javaspaces/ route route id=javaspaces shutdownRunningTask=CompleteCurrentTaskOnly autoStartup=true from uri=direct:javaspaces/ transacted/ aggregate strategyRef=aggregatorStrategy completionSize=10 completionTimeout=1000 correlationExpression simple${body.entity}/simple /correlationExpression bean ref=jsInterface/ /aggregate /route - Alireza Salemi -- View this message in context: http://camel.465427.n5.nabble.com/best-practice-for-logging-execution-time-tp2844045p5736506.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel Enrich in a Loop
Hello, I have the following use case, From a route, I want to call a remote service A using CXF which gives me a list of data. For each data element in the list, I populate a response object, and then I again have to call service B to get addtional data to enrich this response object. Finally, I will return a collection of response objects. How should I implement this in the best way? For example, Response - CollectionX X f1 f2 f3 f4 Service A returns CollectionP I map from each element of this collection to create a new X with fields f1 and f2 populated. Then I call Service B which returns object Q with which I populate fields f3 and f4. Finally I return a collection of X What are the best patterns to realize this use case? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Enrich-in-a-Loop-tp5736543.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: mvn build with -Pfastinstall not enabling noassembly flag?
Than let's remove the misleading noassembly property. Best, Christian Am 31.07.2013 08:14 schrieb Claus Ibsen claus.ib...@gmail.com: On Wed, Jul 31, 2013 at 2:45 AM, Willem jiang willem.ji...@gmail.com wrote: It looks like setting the properties through the Profile doesn't work. To work around it we could disable the assembly step by default, but we need to enable it by using -Passembly when doing deploy and release. Any thought? -1 I want the assembly to run when I do my builds to ensure that it works. And this has been the default every since the start of the project. -- 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 (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, July 31, 2013 at 5:39 AM, Christian Müller wrote: It's the same for me. I think the intention was to skip the assembly step... Feel free to fix it. Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Fri, Jul 19, 2013 at 12:14 PM, Aki Yoshida elak...@gmail.com(mailto: elak...@gmail.com) wrote: I would like to avoid the lengthy assembly step in the build at the end when I quickly just build the camel project. By looking at camel's parent/pom.xml, it seems that it was intended to not assemble the distribution when built with the fastinstall profile. profile idfastinstall/id activation property namefastinstall/name /property /activation properties maven.test.skip.exectrue/maven.test.skip.exec noassemblytrue/noassembly /properties but I see the assembly phase is always executed when I built it with -Pfastinstall. I can only disable the assembly step by setting the noassembly flag explicitly like: mvn -Dnoassembly=true -Pfastinstall Not sure if anyone have this problem, it is intended that way or has something to do with my environment? thanks. aki -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: mvn build with -Pfastinstall not enabling noassembly flag?
Have you tried the assembly.skipAssembly property instead? Regards, Raúl. On 19 Jul 2013 11:14, Aki Yoshida elak...@gmail.com wrote: I would like to avoid the lengthy assembly step in the build at the end when I quickly just build the camel project. By looking at camel's parent/pom.xml, it seems that it was intended to not assemble the distribution when built with the fastinstall profile. profile idfastinstall/id activation property namefastinstall/name /property /activation properties maven.test.skip.exectrue/maven.test.skip.exec noassemblytrue/noassembly /properties but I see the assembly phase is always executed when I built it with -Pfastinstall. I can only disable the assembly step by setting the noassembly flag explicitly like: mvn -Dnoassembly=true -Pfastinstall Not sure if anyone have this problem, it is intended that way or has something to do with my environment? thanks. aki
camel-sql, connection test required?
Hi all, when using camel-sql should connection pooling and connection test be implemented? I am building a camel based application which will run as a daemon and might write the database once every few days. This means between writes the connection to the database (mysql) might timeout. Is camel testing connection before writing to the database or will it throw an exception in case the connection runs in timeout? Thanks, Marco -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-connection-test-required-tp5736549.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-sql, connection test required?
Hi Yeah your connection pool may allow to setup keep alive queries or test the connection before handing it over to the client. There is no logic in camel-sql for validating the connection. You can use Camels error handler to retry also which then would get a new connection from the data source etc. On Wed, Jul 31, 2013 at 10:18 AM, Marco Crivellaro marco.cr...@gmail.com wrote: Hi all, when using camel-sql should connection pooling and connection test be implemented? I am building a camel based application which will run as a daemon and might write the database once every few days. This means between writes the connection to the database (mysql) might timeout. Is camel testing connection before writing to the database or will it throw an exception in case the connection runs in timeout? Thanks, Marco -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-connection-test-required-tp5736549.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: getting error while deploying camel-spring integration in tomcat 6.0
If you are using an earlier version of Java 7 then upgrade that as its buggy in the JAXB. This has resolved similar problems like your stacktrace for other ppl. On Wed, Jul 31, 2013 at 11:25 AM, bhushand bhushan_bde...@yahoo.co.in wrote: Hello All I am trying to deploy camel-spring application in tomcat 6.0. We have camel-spring integration. I am using camel 2.9.2, cxf 2.6.1, spring 3.0.7. When I try to deploy application, it was showing me different errors. I searched for the errors and saw few post saying to include jars in classpath of tomcat. I included jars, that solved my few problems but now I am getting following error.(I tried with camle 2.10.0 also, but same error) SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/camel-config.xml]; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.NullPointerException at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown
Re: getting error while deploying camel-spring integration in tomcat 6.0
Hi Thank for reply. We are using java 6. Is it neccessary to use latest version of java 7 for tomcat, or *which java version is compatible.* Thanks Bhushan -- View this message in context: http://camel.465427.n5.nabble.com/getting-error-while-deploying-camel-spring-integration-in-tomcat-6-0-tp5736551p5736554.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-sql, connection test required?
I've found out you can use c3p0 library (http://www.mchange.com/projects/c3p0) so you can rely on connection pooling are not forced to write your own connection testing in the route. here is an example of the jdbc datasource bean: bean id=mysqlPooled class=com.mchange.v2.c3p0.ComboPooledDataSource property name=driverClass value=com.mysql.jdbc.Driver / property name=jdbcUrl value=jdbc:mysql://localhost:3306/test / property name=user value=user / property name=password value=pass / property name=minPoolSize value=1 / property name=maxPoolSize value=5 / property name=maxIdleTime value=60 / property name=maxStatements value=0 / property name=preferredTestQuery value=SELECT 1; / property name=idleConnectionTestPeriod value=30 / /bean just include c3p0 in your dependencies dependency groupIdc3p0/groupId artifactIdc3p0/artifactId version0.9.1.1/version /dependency -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-connection-test-required-tp5736549p5736555.html Sent from the Camel - Users mailing list archive at Nabble.com.
a camel based solution that can read message headers without de-queuing a message from the MQ
I am Trying to make a utility to read the header of a activemq message without dequeing it using camel please suggest some ideas... -- View this message in context: http://camel.465427.n5.nabble.com/a-camel-based-solution-that-can-read-message-headers-without-de-queuing-a-message-from-the-MQ-tp5736556.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Enums in spring config
Hi Christian, Thanks for your reply. Does it work in the spring xml? It appears like static attributes work, but not enums. See log output and example. simple${header.EventCategory} == ${type:org.apache.camel.component.quickfix.QuickfixjEventCategory.AppMessageReceived}/simple [pool-1-thread-1] WARN org.apache.camel.util.ObjectHelper - Cannot find class: org.apache.camel.component.quickfix.QuickfixjEventCategory.AppMessageReceived [pool-1-thread-1] WARN org.apache.camel.util.ObjectHelper - Cannot find class: org.apache.camel.component.quickfix.QuickfixjEventCategory Yes, I have the module in my classpath dependency groupIdorg.apache.camel/groupId artifactIdcamel-quickfix/artifactId /dependency Geoffrey A Gershaw Credit eTrading Development +1 919 994 6412 (*102 6412) -Original Message- From: Christian Müller [mailto:christian.muel...@gmail.com] Sent: Tuesday, July 30, 2013 6:51 PM To: users@camel.apache.org Subject: Re: Enums in spring config It works with 2.11.0 [1]. What's the exception do you get? [1] https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=camel-core/src/test/java/org/apache/camel/processor/CBRSimpleTypeTest.java;h=aaf9051b9e97a1971e923f8319b688c8bd80b686;hb=99b5784e1fc5fd529c0178f9a8f60ac37fed5682 Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Tue, Jul 30, 2013 at 10:20 PM, Gershaw, Geoffrey geoffrey.gers...@credit-suisse.com wrote: Hello All, I was under the impression that enums can now be specified in the Spring config as in the below example. Having issues. Any advice? simple${header.EventCategory} == ${type:org.apache.camel.component.quickfix.QuickfixjEventCategory.AppMes sageReceived}/simple [pool-1-thread-1] WARN org.apache.camel.util.ObjectHelper - Cannot find class: org.apache.camel.component.quickfix.QuickfixjEventCategory.AppMessageRec eived [pool-1-thread-1] WARN org.apache.camel.util.ObjectHelper - Cannot find class: org.apache.camel.component.quickfix.QuickfixjEventCategory Yes, I have the module in my classpath J dependency groupIdorg.apache.camel/groupId artifactIdcamel-quickfix/artifactId /dependency Geoffrey A Gershaw CREDIT SUISSE Information Technology | Credit eTrading Development, KFVB 525 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States Phone +1 919 994 6412 geoffrey.gers...@credit-suisse.com | www.credit-suisse.com http://www.credit-suisse.com/ === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html === === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===
Retrieve ActiveMQ URI from Camel XML
Looking for an example where the broker URI (e.g., tcp://localhost:61616) is stored in XML and then used for sending a JMS message using ActiveMQ. I don't want the URI in the source code so can be changed (different host, add failover, set debug options, etc.) for all producers consumers. -- View this message in context: http://camel.465427.n5.nabble.com/Retrieve-ActiveMQ-URI-from-Camel-XML-tp5736570.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problems using async threads
Yes, that was the reason. Now after decreasing the queue size i see the threads are growing. Thanks. Br, Rajesh -- View this message in context: http://camel.465427.n5.nabble.com/Problems-using-async-threads-tp3025934p5736573.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Retrieve ActiveMQ URI from Camel XML
There is this tutorial http://camel.apache.org/tutorial-jmsremoting.html And you can also use property placeholders http://camel.apache.org/using-propertyplaceholder.html On Wed, Jul 31, 2013 at 2:40 PM, mdconner64 michael.d.con...@lmco.com wrote: Looking for an example where the broker URI (e.g., tcp://localhost:61616) is stored in XML and then used for sending a JMS message using ActiveMQ. I don't want the URI in the source code so can be changed (different host, add failover, set debug options, etc.) for all producers consumers. -- View this message in context: http://camel.465427.n5.nabble.com/Retrieve-ActiveMQ-URI-from-Camel-XML-tp5736570.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: getting error while deploying camel-spring integration in tomcat 6.0
No you can use java6 or java7. Just try upgrading the JDK as it can be buggy in JAXB. As well you include jaxb-api and jaxb-impl. You need to use jaxb 2.1 for java 6, and jaxb 2.2 for java7. On Wed, Jul 31, 2013 at 11:38 AM, bhushand bhushan_bde...@yahoo.co.in wrote: Hi Thank for reply. We are using java 6. Is it neccessary to use latest version of java 7 for tomcat, or *which java version is compatible.* Thanks Bhushan -- View this message in context: http://camel.465427.n5.nabble.com/getting-error-while-deploying-camel-spring-integration-in-tomcat-6-0-tp5736551p5736554.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Camel testing
Thanks a lot! Vlad -- View this message in context: http://camel.465427.n5.nabble.com/Camel-testing-tp5736444p5736579.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Validate Xml
Hi Christian, Do you have some examples handy for how to use CXF to validate a PAYLOAD request? Thanks! John -- View this message in context: http://camel.465427.n5.nabble.com/Validate-Xml-tp472122p5736583.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Validate Xml
there is a validate option you can set on cxf if you use camel-cxf to setup the CXF web service with Camel Just a snippet I could find on my laptop. Then you can turn that schema validation on|off. ... camelcxf:properties entry key=dataFormat value=POJO/ entry key=schema-validation-enabled value=false/ /camelcxf:properties /camelcxf:cxfEndpoint On Wed, Jul 31, 2013 at 5:03 PM, bocamel johnz...@gmail.com wrote: Hi Christian, Do you have some examples handy for how to use CXF to validate a PAYLOAD request? Thanks! John -- View this message in context: http://camel.465427.n5.nabble.com/Validate-Xml-tp472122p5736583.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Correct way to read a CXF Message in MESSAGE format
Hi all I'm dynamically binding a CXF endpoint to a processor instance, using a route like this: from(simpleEndpointURI + ?dataFormat=MESSAGEwsdlURL=wsdl/Import.wsdlloggingFeatureEnabled=true).process(new ImportProcessor()); I setup a simple way of reading this body using an InputStream, but this seems wrong. I'm trying to get the soap headers and the soap body of the message. I'm using MESSAGE dataFormat because I can't seem to get the mustunderstand to process correctly without it. From the docs: MESSAGEMESSAGE is the raw message that is received from the transport layer. It is not suppose to touch or change Stream, some of the CXF interceptor will be removed if you are using this kind of DataFormat so you can't see any soap headers after the camel-cxf consumer and JAX-WS handler is not supported. Which is fine for me, all I need is some data simply from the body. But is it possible to access the headers? I see everything fine in the InputStream, but it would make more sense if this were available somehow in a POJO/Java format. Is there a way I can use another dataFormat but get it to generate the MustUnderstand properly? Thanks, John
Re: Validate Xml
You'll need to add a CXF OUT Interceptor to detect the required exceptions (IOException, SAXException, XMLStreamException, etc.) and set the desired status code as part of the handleFault() method. CXF returns an HTTP 500 probably to comply strictly with this (underspecified) part of the SOAP 1.1 spec: In case of a SOAP error while processing the request, the SOAP HTTP server MUST issue an HTTP 500 Internal Server Error response and include a SOAP message in the response containing a SOAP Fault element (see section 4.4) indicating the SOAP processing error. Regards, *Raúl Kripalani* Apache Camel PMC Member Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Wed, Jul 31, 2013 at 4:56 PM, bocamel johnz...@gmail.com wrote: Thanks Claus! Using what you suggested, CXF threw an error with much better information about the actual error with the input XML PAYLOAD message. But there is a little problem - the response sent back to the client is a simple HTTP 500 message without any explanation. In fact, in this case HTTP 500 is rather misleading - leading the client to think that the issue is a server issue when it is actually a client issue. A HTTP 400 would be more appropriate in my opinion. So I tried to catch the exception before it is sent back to the client. But none of the onException in Camel route would be able to catch it - I guess the exception was caught by CXF already. Any suggestion on how to catch the error in Camel route so that I can control what is sent back to the client? Here is what I saw on the console: [ qtp1563200034-16] PhaseInterceptorChain WARN Interceptor for {http://myService}myService#{http://cxf.component.camel.apache.org/}invoke has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not parse the XML stream caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag /soapenv:Body; expected /com:test. at [row,col {unknown-source}]: [8,17]. at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:253) at org.apache.cxf.databinding.source.XMLStreamDataReader.validate(XMLStreamDataReader.java:211) at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:107) at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:75) at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:60) at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:189) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319) at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1074) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1010) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:365) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:722) Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag /soapenv:Body; expected /com:test. at [row,col
RE: Validate Xml
Hi Raul, I added a CXF OutFaultInterceptor to my cxfendpoint (instead of defining a jaxws endpoint): cxfEndpoint … properties entry key=dataFormat value=PAYLOAD / entry key=schema-validation-enabled value=true/ /properties inInterceptors ref bean=loggingInInterceptor / /inInterceptors outInterceptors ref bean=loggingOutInterceptor / /outInterceptors outFaultInterceptors ref bean=myOutFaultInterceptor / /outFaultInterceptors /cxfEndpoint But the out fault interceptor did not get control. The actual response received by the client was the following HTTP response (not even containing a SOAP fault). HTTP/1.1 500 Server Error Content-Length: 0 Connection: close Server: Jetty(8.1.7.v20120910) It leads me to think that CXF did not even bother to generate a fault message. If that is the case, any CXF out fault interceptor probably would not get control anyway. Any suggestion? Thanks! From: Raul Kripalani [via Camel] [mailto:ml-node+s465427n5736589...@n5.nabble.com] Sent: Wednesday, July 31, 2013 1:37 PM To: bocamel Subject: Re: Validate Xml You'll need to add a CXF OUT Interceptor to detect the required exceptions (IOException, SAXException, XMLStreamException, etc.) and set the desired status code as part of the handleFault() method. CXF returns an HTTP 500 probably to comply strictly with this (underspecified) part of the SOAP 1.1 spec: In case of a SOAP error while processing the request, the SOAP HTTP server MUST issue an HTTP 500 Internal Server Error response and include a SOAP message in the response containing a SOAP Fault element (see section 4.4) indicating the SOAP processing error. Regards, *Raúl Kripalani* Apache Camel PMC Member Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Wed, Jul 31, 2013 at 4:56 PM, bocamel [hidden email] wrote: Thanks Claus! Using what you suggested, CXF threw an error with much better information about the actual error with the input XML PAYLOAD message. But there is a little problem - the response sent back to the client is a simple HTTP 500 message without any explanation. In fact, in this case HTTP 500 is rather misleading - leading the client to think that the issue is a server issue when it is actually a client issue. A HTTP 400 would be more appropriate in my opinion. So I tried to catch the exception before it is sent back to the client. But none of the onException in Camel route would be able to catch it - I guess the exception was caught by CXF already. Any suggestion on how to catch the error in Camel route so that I can control what is sent back to the client? Here is what I saw on the console: [ qtp1563200034-16] PhaseInterceptorChain WARN Interceptor for {http://myService}myService#{http://cxf.component.camel.apache.org/}invoke has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not parse the XML stream caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag /soapenv:Body; expected /com:test. at [row,col {unknown-source}]: [8,17]. at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:253) at org.apache.cxf.databinding.source.XMLStreamDataReader.validate(XMLStreamDataReader.java:211) at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:107) at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:75) at org.apache.cxf.databinding.source.XMLStreamDataReader.read(XMLStreamDataReader.java:60) at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:189) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319) at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1074) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1010) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at
save message across exchanges
Is there a way to store a message across exchanges? It seems like you should be able to put something in to the context, but I’m not seeing anything obvious. For now, I’m just using a bean to save off a static reference, but this seems sorta dirty. Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/save-message-across-exchanges-tp5736593.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: save message across exchanges
Did you had a look at Camel cache [1]? [1] http://camel.apache.org/cache.html Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Wed, Jul 31, 2013 at 8:53 PM, javamonkey79 javamonke...@gmail.comwrote: Is there a way to store a message across exchanges? It seems like you should be able to put something in to the context, but I’m not seeing anything obvious. For now, I’m just using a bean to save off a static reference, but this seems sorta dirty. Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/save-message-across-exchanges-tp5736593.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-sql, connection test required?
Apache commons dbcp [1] is more common IMO. [1] http://commons.apache.org/proper/commons-dbcp/ Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Wed, Jul 31, 2013 at 12:45 PM, Marco Crivellaro marco.cr...@gmail.comwrote: I've found out you can use c3p0 library (http://www.mchange.com/projects/c3p0) so you can rely on connection pooling are not forced to write your own connection testing in the route. here is an example of the jdbc datasource bean: bean id=mysqlPooled class=com.mchange.v2.c3p0.ComboPooledDataSource property name=driverClass value=com.mysql.jdbc.Driver / property name=jdbcUrl value=jdbc:mysql://localhost:3306/test / property name=user value=user / property name=password value=pass / property name=minPoolSize value=1 / property name=maxPoolSize value=5 / property name=maxIdleTime value=60 / property name=maxStatements value=0 / property name=preferredTestQuery value=SELECT 1; / property name=idleConnectionTestPeriod value=30 / /bean just include c3p0 in your dependencies dependency groupIdc3p0/groupId artifactIdc3p0/artifactId version0.9.1.1/version /dependency -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-connection-test-required-tp5736549p5736555.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: mvn build with -Pfastinstall not enabling noassembly flag?
Claus, do you still -1 this change? In this case Aki, I suggest to remove the line noassemblytrue/noassembly Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Wed, Jul 31, 2013 at 2:07 PM, Aki Yoshida elak...@gmail.com wrote: Hi, thanks Raúl,. setting assembly.skipAssembly in the fastinstall profile seems to work (goes into apache-camel and does a little bit of processing but skips the assembling itself), It's not as fast as using -Dnoassembly=true explicitly which completely skips the step, though. I have to rerun it to verify it. If it is verified to work, I'll add this prop setting line in the fastinstall profile. regards, aki 2013/7/31 Raul Kripalani r...@evosent.com: Have you tried the assembly.skipAssembly property instead? Regards, Raúl. On 19 Jul 2013 11:14, Aki Yoshida elak...@gmail.com wrote: I would like to avoid the lengthy assembly step in the build at the end when I quickly just build the camel project. By looking at camel's parent/pom.xml, it seems that it was intended to not assemble the distribution when built with the fastinstall profile. profile idfastinstall/id activation property namefastinstall/name /property /activation properties maven.test.skip.exectrue/maven.test.skip.exec noassemblytrue/noassembly /properties but I see the assembly phase is always executed when I built it with -Pfastinstall. I can only disable the assembly step by setting the noassembly flag explicitly like: mvn -Dnoassembly=true -Pfastinstall Not sure if anyone have this problem, it is intended that way or has something to do with my environment? thanks. aki
Re: save message across exchanges
You could place a copy in a header or preferably a property. Den 31. juli 2013 20:54 skrev javamonkey79 javamonke...@gmail.com følgende: Is there a way to store a message across exchanges? It seems like you should be able to put something in to the context, but I’m not seeing anything obvious. For now, I’m just using a bean to save off a static reference, but this seems sorta dirty. Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/save-message-across-exchanges-tp5736593.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Use MessageFilter to process files that are 30 or more days old
Add some logging statements to figure out what the actual values are... Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Tue, Jul 30, 2013 at 5:10 PM, Karim Garza karimga...@gmail.com wrote: Thank you for your reply. I tried using the EIP filter and I could not get it to work even after comparing milliseconds to milliseconds. I then tried Christian's suggestion and it work as expected. My route ended up as @Override public void configure() throws Exception { from(file:{{file.inbox}}?delete=truefilter=#FilterOldFiles) .process(new FileProcessor()); } and the class FilterOldFiles as public class FilterOldFilesT implements GenericFileFilterT { public boolean accept(GenericFileT file) { DateTime date = new DateTime(); if(date.minusDays(30).getMillis() file.getLastModified()) return true; return false; } } Thank you both for you help On Mon, Jul 29, 2013 at 5:11 PM, Christian Müller christian.muel...@gmail.com wrote: Use the file component option filter [1], not the filter EIP. Implement the org.apache.camel.component.file.GenericFileFilter class. Create a new Calendar instance, subtract 30 days and take the time in millis. If it's higher than the CamelFileLastModified header value, return true. Otherwise, return false. [1] http://camel.apache.org/file2.html Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Mon, Jul 29, 2013 at 10:45 PM, Karim Garza karimga...@gmail.com wrote: Hi, I am trying to use the MessageFilter to process files that are 30 days or older. I came up with this code to do the work, but it appears that the CamelFileLastModified header is a long and I do not know how to use to compare it with a date. public void configure() throws Exception { DateTime date = new DateTime(); from(file:{{file.inbox}}?delete=true) .filter(header(CamelFileLastModified).isLessThan(date.minusDays(30))) .process(new FileProcessor()); } I would appreciate any help you can provide, Karim
Re: Long - Date TypeConverter
Yeah, this could be a good improvement. As you know, we like contributions [1]. Feel free to raise a JIRA and attach a patch. [1] http://camel.apache.org/contributing.html Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Mon, Jul 29, 2013 at 1:50 PM, Marco Zapletal marco.zaple...@gmail.comwrote: Hi folks, I recently encountered the situation that we required a Long (unix timestamp) to java.util.Date conversion. I was pretty sure that such a converter will exist in core-camel, but it doesn't. Furthermore, I came across some pieces of code in camel-core, where this conversion is done manually and not via a type converter - e.g., FileOperations:328 Date date = exchange.getIn().getHeader(**Exchange.FILE_LAST_MODIFIED, Date.class); if (date != null) { last = date.getTime(); } else { // fallback and try a long last = exchange.getIn().getHeader(**Exchange.FILE_LAST_MODIFIED, Long.class); } Is there a special reason why no Long - Date converter exists in the DateTimeConverter? If not, I would suggest to open a JIRA issue and attach a patch there. Best regards, Marco
Re: how to consume messages by timestamp
Thank you all for the answers, eventually I implemented Raul's suggestion, my producer is a camel route and I set the TTL on the URI: route id=conversionLogRequestRoute from uri=direct:conversionLogRequest / log message=Sending conversion log request to ActiveMQ / to uri=activemq:Log.conversionLogRequestQueue?timeToLive=12 / /route and I configured an individual DLQ for Log.conversionLogRequestQueue. the Delay and Schedule Message Delivery sounds cleaner , I wonder if I can set the scheduler properties on the URI too, I will test that tomorrow. -- View this message in context: http://camel.465427.n5.nabble.com/how-to-consume-messages-by-timestamp-tp5736463p5736603.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: save message across exchanges
If you store the message into the exchange property, camel will copy the message reference across the exchange. -- 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 (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, August 1, 2013 at 3:48 AM, David Karlsen wrote: You could place a copy in a header or preferably a property. Den 31. juli 2013 20:54 skrev javamonkey79 javamonke...@gmail.com (mailto:javamonke...@gmail.com) følgende: Is there a way to store a message across exchanges? It seems like you should be able to put something in to the context, but I’m not seeing anything obvious. For now, I’m just using a bean to save off a static reference, but this seems sorta dirty. Thanks in advance. -- View this message in context: http://camel.465427.n5.nabble.com/save-message-across-exchanges-tp5736593.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: mvn build with -Pfastinstall not enabling noassembly flag?
I think the Aki's solution doesn't change the default behavior of mvn install. If we use the -Pfastinstall it will skip the assembly module automatically. -- 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 (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, August 1, 2013 at 3:43 AM, Christian Müller wrote: Claus, do you still -1 this change? In this case Aki, I suggest to remove the line noassemblytrue/noassembly Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Wed, Jul 31, 2013 at 2:07 PM, Aki Yoshida elak...@gmail.com (mailto:elak...@gmail.com) wrote: Hi, thanks Raúl,. setting assembly.skipAssembly in the fastinstall profile seems to work (goes into apache-camel and does a little bit of processing but skips the assembling itself), It's not as fast as using -Dnoassembly=true explicitly which completely skips the step, though. I have to rerun it to verify it. If it is verified to work, I'll add this prop setting line in the fastinstall profile. regards, aki 2013/7/31 Raul Kripalani r...@evosent.com (mailto:r...@evosent.com): Have you tried the assembly.skipAssembly property instead? Regards, Raúl. On 19 Jul 2013 11:14, Aki Yoshida elak...@gmail.com (mailto:elak...@gmail.com) wrote: I would like to avoid the lengthy assembly step in the build at the end when I quickly just build the camel project. By looking at camel's parent/pom.xml, it seems that it was intended to not assemble the distribution when built with the fastinstall profile. profile idfastinstall/id activation property namefastinstall/name /property /activation properties maven.test.skip.exectrue/maven.test.skip.exec noassemblytrue/noassembly /properties but I see the assembly phase is always executed when I built it with -Pfastinstall. I can only disable the assembly step by setting the noassembly flag explicitly like: mvn -Dnoassembly=true -Pfastinstall Not sure if anyone have this problem, it is intended that way or has something to do with my environment? thanks. aki
Re: Numbers of lines in a flat file
http://camel.apache.org/splitter.html On Wed, Jul 31, 2013 at 8:50 PM, jabe jabegr...@gmail.com wrote: How did you get the number of lines from header? Which Camel component did you use? -- View this message in context: http://camel.465427.n5.nabble.com/Numbers-of-lines-in-a-flat-file-tp5732455p5736604.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Enrich in a Loop
Hello Guys: Can you assist me with this please? Regards, Sushil -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Enrich-in-a-Loop-tp5736543p5736615.html Sent from the Camel - Users mailing list archive at Nabble.com.
Marshall xml with namespace prefix using xmljson
Hi, Has anyone successfully marshalled XML with namespace prefixed using camel-xmljson? A sample XML is shown below in which all elements are prefixed with namespace rdm, I'd like to split on Record element to produce 2 json outputs rdm:Results xmlns:rdm=http://www.arandomcompany.com; rdm:Recordset rdm:Record rdm:Id1/rdm:Id rdm:NameAlex/rdm:Name /rdm:Record rdm:Record rdm:Id2/rdm:Id rdm:NameBob/rdm:Name /rdm:Record /rdm:Recordset /rdm:Results My route looks like this: camelContext id=blueprintContext trace=false xmlns=http://camel.apache.org/schema/blueprint; camel:route id=xmlFeed camel:from uri=file://source / camel:split streaming=true camel:tokenize token=Record xml=true / camel:marshal camel:xmljson skipNamespaces=true removeNamespacePrefixes=true/ /camel:marshal camel:log message=${body} / /camel:split /camel:route /camelContext And I'm getting the following error: Caused by: nu.xom.ParsingException: The prefix rdm for element rdm:Record is not bound. at line 1, column 26 at nu.xom.Builder.build(Unknown Source)[258:nu.xom:1.2.5.osgi] at nu.xom.Builder.build(Unknown Source)[258:nu.xom:1.2.5.osgi] at net.sf.json.xml.XMLSerializer.read(XMLSerializer.java:309)[256:org.apache.servicemix.bundles.json-lib:2.4.0.1] ... 83 more Caused by: org.xml.sax.SAXParseException: The prefix rdm for element rdm:Record is not bound. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1236)[:1.7.0_25] ... 86 more Seems to me I need to bind the namespace with the marshaller so it's aware of the namespace but nothing in the doc (http://camel.apache.org/xmljson.html) shows that this can be do on xmljson. btw, xmljson is able to perform the transformation If I add xmlns to each Record elements, e.g. rdm:Record xmlns:rdm=http://www.arandomcompany.com; but unfortunately I have no control over the format of XML file It's much appreciated if someone could please shed some lights on this Thanks Phil -- View this message in context: http://camel.465427.n5.nabble.com/Marshall-xml-with-namespace-prefix-using-xmljson-tp5736616.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel route stop consuming
Can you show us your camel route? I'm not sure if it related to the SEDA queue is full. -- 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 (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, August 1, 2013 at 10:01 AM, jaime.salvador wrote: Hi, I have a big number of messages routed to a ActiveMQ queue. the route works fine at begining, but after some hours of work, Camel stop comsuming the messages from queue. I try to get out activemq and use SEDA and the same problema apears. I have the next message when I try to stop Camel: 2013-07-28 11:32:53,140 INFO [org.apache.camel.impl.DefaultShutdownStrategy] - Waiting as there are still 2262 inflight and pending exchanges to complete, timeout in 287 seconds. Any idea? Thanks a lot -- View this message in context: http://camel.465427.n5.nabble.com/Camel-route-stop-consuming-tp5736611.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: Camel Enrich in a Loop
Splitter[1] + Aggregator[2]. [1]http://camel.apache.org/splitter.html [2]http://camel.apache.org/aggregator2.html -- 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 (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, July 31, 2013 at 3:17 PM, sushil_vsk5 wrote: Hello, I have the following use case, From a route, I want to call a remote service A using CXF which gives me a list of data. For each data element in the list, I populate a response object, and then I again have to call service B to get addtional data to enrich this response object. Finally, I will return a collection of response objects. How should I implement this in the best way? For example, Response - CollectionX X f1 f2 f3 f4 Service A returns CollectionP I map from each element of this collection to create a new X with fields f1 and f2 populated. Then I call Service B which returns object Q with which I populate fields f3 and f4. Finally I return a collection of X What are the best patterns to realize this use case? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Enrich-in-a-Loop-tp5736543.html Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
Re: Marshall xml with namespace prefix using xmljson
Sorted. The issue is not so much about xmljson but the way my XML is tokenized where I should have inherited the namespace from top element rdm:Results so that when xmljson does the parsing it knows about the namespace Adding inheritNamespaceTagName to tokenize fixed my issue: camel:tokenize token=Record xml=true inheritNamespaceTagName=Results/ -- View this message in context: http://camel.465427.n5.nabble.com/Marshall-xml-with-namespace-prefix-using-xmljson-tp5736616p5736619.html Sent from the Camel - Users mailing list archive at Nabble.com.