Re: Blueprint bundle + plain Main class from the same project?
On Tue, Nov 29, 2011 at 8:12 AM, Guillaume Nodet gno...@gmail.com wrote: The cxf-example-osgi-blueprint only can be ran inside of OSGi container. You can not run it as a stand-alone Java process. [...] There's a way actually. You need to use PojoSR which is a small library to emulate an OSGi framework but without the classloading (only the registry really). I've been able to have it run Blueprint. Thanks for the pointer. Actually, I was more expecting a solution in terms of the build process, such as being able to build both a blueprint bundle and a stand-alone Java application from the same source tree. But I realize that this is tricky, since the dependencies are quite different in both cases, and also the actual camel context xml seems to be different, too, even if the actual route spec is the same... Instead, what is the recommended way for developing blueprint bundles? Do people usually run Karaf locally or Felix in the IDE? Alex
Writing to destination where priority is based on filename extension
Hi, I have the following route below which transfers pdf-files and txt-files from one directory to different directories at target system. I want to write the pdf-files to target system before txt-files. I tried to do this by using sortBy in property file. Like this: sftp.inbox=sftp://c...@xxx.xxx.xxx.xxx:22/files?password=secretsortBy=*.pdf;*.txt However, it seems that some of the pdf-files is written to target after the txt-file. Are there other configurations to use to achieve that txt-files will be written to target system after all pdf-files? I'm using Camel 2.8.2. route id=inComingInvoiceRoute routePolicyRef=incomingPolicy from uri={{sftp.inbox}} / choice when language language=simple${header.CamelFileNameOnly} regex '^.*pdf$'/language to uri={{file.imagedirectory}} / /when when language language=simple${header.CamelFileNameOnly} regex '^.*txt$'/language to uri={{file.outbox}} / /when otherwise to uri={{file.other}} / /otherwise /choice /route Thanks in advance for any hints. Best regards Lars Stuevold -- View this message in context: http://camel.465427.n5.nabble.com/Writing-to-destination-where-priority-is-based-on-filename-extension-tp5031542p5031542.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: IBM WAS - Aries 0.1 and Camel
I would be interested to know why you would want to replace Tuscany with Camel? /Björn On Mon, Nov 28, 2011 at 9:27 PM, mattmadhavan mattmadha...@yahoo.com wrote: Hi Claus, No we are using EBA - and using SCA(Tuscany) as an Asset. I would like to replace SCA with Camel. Any pointers regarding this will be greatly appreciated. Thanks Matt -- View this message in context: http://camel.465427.n5.nabble.com/IBM-WAS-Aries-0-1-and-Camel-tp5014977p5029982.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: distributed transaction using JMS and EJB partecipants
Il 28 novembre 2011 12:06, Ronzat Luca luca.ron...@eng.it ha scritto: Hi, I would like to implement a route for: 1) Consume JMS message from Sonic queue; 2) Call one or more EJB running on a remote JBoss AS; 3) send a reply to a different Sonic JMS queue; Can I use distributed transaction for this route? Can we deploy this route as a WAR/EAR into WebLogic AS? Yes you can deploy it in a WAR Thanks in advance. Luca Yes you can . please check to undestand how Camel works togetherwith Spring’s transaction support.Yes you can deploy it in a WAR Cheers --Filippo
Re: Programatically using Camel with different jms providers
Thank you for your answer. Only problem is that I need to programmatically define connection factories, host, port and other connection details. I cannot use Spring XML because I don't know these details in advance. I get the connection details from database and I need to assign these values at runtime. Thank you Best Regards Tuomas -- View this message in context: http://camel.465427.n5.nabble.com/Programatically-using-Camel-with-different-jms-providers-tp5029408p5031404.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem Configuring WSS4JInInterceptor Using a Blueprint.
Thanks everyone for your inputs. I have signed the SOAP request and now I can see the Security related information in the SOAP message, but still getting the same error. Thanks, Chaks. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-Configuring-WSS4JInInterceptor-Using-a-Blueprint-tp5028621p5031711.html Sent from the Camel - Users mailing list archive at Nabble.com.
call Oracle Package procedure
Hi All, I can use camel for message transfer in Oracle? Call stored procedure in, out parameters? example: RouteBuilder route = new RouteBuilder() { @Override public void configure() throws Exception { from(servlet:///MessageServlet) .setBody(constant({ CALL IBS.\Z$IMS_INTERFACE_WS\.TEST_STR(:P_STR_IN,:P_STR_OUT)})).to(jdbc:IBSO); } }; thanks p.s. I am sorry for my English, I use the translator -- View this message in context: http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-tp5032133p5032133.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Blueprint bundle + plain Main class from the same project?
I would either use integration tests based on pax-exam, or even easier, deploy your bundle (using osgi:install mvn:groupId/artifactId/version-SNAPSHOT) in a standalone karaf instance and use the dev:watch * command. Each time you rebuild your project using maven, the bundle in karaf will be automatically updated. On Tue, Nov 29, 2011 at 09:14, Alexander Krauss alexander.kra...@qaware.de wrote: On Tue, Nov 29, 2011 at 8:12 AM, Guillaume Nodet gno...@gmail.com wrote: The cxf-example-osgi-blueprint only can be ran inside of OSGi container. You can not run it as a stand-alone Java process. [...] There's a way actually. You need to use PojoSR which is a small library to emulate an OSGi framework but without the classloading (only the registry really). I've been able to have it run Blueprint. Thanks for the pointer. Actually, I was more expecting a solution in terms of the build process, such as being able to build both a blueprint bundle and a stand-alone Java application from the same source tree. But I realize that this is tricky, since the dependencies are quite different in both cases, and also the actual camel context xml seems to be different, too, even if the actual route spec is the same... Instead, what is the recommended way for developing blueprint bundles? Do people usually run Karaf locally or Felix in the IDE? Alex -- Guillaume Nodet Blog: http://gnodet.blogspot.com/ Open Source SOA http://fusesource.com
Re: Problem Configuring WSS4JInInterceptor Using a Blueprint.
Hi, Not sure what you mean by signed, as actually you needn't sign the soap request. Per your server side WSS4JInInterceptor, it expect an UsernameToken ws- security header, some thing like soap:Header wsse:Security xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd wsse:UsernameToken wsse:Usernamejoe/wsse:Username wsse:Password Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText password/wsse:Password /wsse:UsernameToken /wsse:Security /soap:Header Does your SOAP request already have this header? Could you post the SOAP request here? Freeman On 2011-11-29, at 下午5:26, Chaks wrote: Thanks everyone for your inputs. I have signed the SOAP request and now I can see the Security related information in the SOAP message, but still getting the same error. Thanks, Chaks. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-Configuring-WSS4JInInterceptor-Using-a-Blueprint-tp5028621p5031711.html Sent from the Camel - Users mailing list archive at Nabble.com. - Freeman Fang FuseSource Email:ff...@fusesource.com Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com
Routing standard notation
Is there any standard (graphical) notation that describes routes (including exceptions)? Something like BPMN for routing... Thanks
Re: Inconsistent results with File2 'readLock=changed'
Hi Yes it's most likely the fact the File API does not return a change in the file size, timestamp, which makes Camel think the file is done. You should use that readLockCheckInterval option. Or you can patch the Camel 2.5 code to have a higher wait time than 1 sec. Or implement a custom processStrategy (for example copy the code from the changed read lock) and use a higher check interval time. On Mon, Nov 28, 2011 at 9:34 PM, GSegel gsegel...@itsfac.com wrote: Using Camel 2.5 in JBoss 5.1. When dropping large files (over 200MB) into a directory I expected that the Exchange wouldn't kick off until the file had completed copying. More often than not, an Exchange is created before it finishes copying. We're using the 'readLock=changed' option btw. Is the reason that it's processing the file before it's done is that the file size doesn't change over a 1 second interval? This has to be the case but I just wanted to confirm. I might try upgrading to 2.6 or later to see if the 'readLockCheckInterval' option might resolve the inconsistencies. Thoughts? -- View this message in context: http://camel.465427.n5.nabble.com/Inconsistent-results-with-File2-readLock-changed-tp5030004p5030004.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.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: convertBodyTo(org.w3c.dom.Document.class) fails
On Mon, Nov 28, 2011 at 6:15 PM, Tristan23 tristanlst...@gmail.com wrote: Hi, I am using convertBodyTo() to convert an XML document to DOM. Basically it works. Unfortunately I get messages with a preceding declaration: ?xml version=1.0 encoding=UTF-8 standalone=yes? This causes the convertBodyTo(org.w3c.dom.Document.class) to fail. What to do? What version of Camel are you using? What error do you see? -- View this message in context: http://camel.465427.n5.nabble.com/convertBodyTo-org-w3c-dom-Document-class-fails-tp5029460p5029460.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.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Using headers and velocity
Make sure the xpath expression works. When using XPath on a XML that has namespaces, then you must declare the namespace in the XPath expression as well. That can be a bit tricky. See the Camel XPath page for an example. Also you can send the message to a log endpoint, and have ?showHeaders=true, to see all the headers. Then you would possible notice that the header is missing / or has null value. On Mon, Nov 28, 2011 at 10:51 PM, Castyn eric.ben...@gmail.com wrote: I am trying to get a piece of information that is obtained via a cxfEndpoint into a velocity template that will be sent on down the route to other endpoints. Thus far I am trying something very basic and seems like it should work, just storing the sessionId retrieved via xpath as a header and then referencing it in the velocity template. Here are the basic components currently: *Camel Route: (beginning is just a timer and request)* to uri=cxf:bean:salesforceLogin/ convertBodyTo type=org.w3c.dom.Document / setHeader headerName=sforceSessionId id=sforceSessionId xpath resultType=java.lang.String//sessionId/xpath /setHeader to uri=velocity://velocity/sforceLogout.vm / *Message from cxf:bean:salesforceLogin:* ?xml version=1.0 encoding=UTF-8 ? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns=urn:enterprise.soap.sforce.com xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body loginResponse result sessionId*ABCDE*/sessionId /result /loginResponse /soapenv:Body /soapenv:Envelope *Velocity Template:* soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:urn=urn:enterprise.soap.sforce.com soapenv:Header urn:SessionHeader urn:sessionId${headers.sforceSessionId}/urn:sessionId /urn:SessionHeader /soapenv:Header soapenv:Body urn:logout/ /soapenv:Body /soapenv:Envelope -- View this message in context: http://camel.465427.n5.nabble.com/Using-headers-and-velocity-tp5030214p5030214.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.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Writing to destination where priority is based on filename extension
Hi Ah you can use a custom comparator for the sort. See the _sorting using comparator_ section at http://camel.apache.org/file2 The sortBy=*.pdf;*.txt would not work as expected. We could possible enhance this, so Camel will fallback on using a regular expression on the file name, if you do not use any of the ${file} tokens. On Tue, Nov 29, 2011 at 9:24 AM, Lars lars.stuev...@ergogroup.no wrote: Hi, I have the following route below which transfers pdf-files and txt-files from one directory to different directories at target system. I want to write the pdf-files to target system before txt-files. I tried to do this by using sortBy in property file. Like this: sftp.inbox=sftp://c...@xxx.xxx.xxx.xxx:22/files?password=secretsortBy=*.pdf;*.txt However, it seems that some of the pdf-files is written to target after the txt-file. Are there other configurations to use to achieve that txt-files will be written to target system after all pdf-files? I'm using Camel 2.8.2. route id=inComingInvoiceRoute routePolicyRef=incomingPolicy from uri={{sftp.inbox}} / choice when language language=simple${header.CamelFileNameOnly} regex '^.*pdf$'/language to uri={{file.imagedirectory}} / /when when language language=simple${header.CamelFileNameOnly} regex '^.*txt$'/language to uri={{file.outbox}} / /when otherwise to uri={{file.other}} / /otherwise /choice /route Thanks in advance for any hints. Best regards Lars Stuevold -- View this message in context: http://camel.465427.n5.nabble.com/Writing-to-destination-where-priority-is-based-on-filename-extension-tp5031542p5031542.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.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Writing to destination where priority is based on filename extension
Hi There is also the resequencer EIP which can be used to re-order messages. There is a file name based example with the stream resequencer http://camel.apache.org/resequencer On Tue, Nov 29, 2011 at 4:36 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi Ah you can use a custom comparator for the sort. See the _sorting using comparator_ section at http://camel.apache.org/file2 The sortBy=*.pdf;*.txt would not work as expected. We could possible enhance this, so Camel will fallback on using a regular expression on the file name, if you do not use any of the ${file} tokens. On Tue, Nov 29, 2011 at 9:24 AM, Lars lars.stuev...@ergogroup.no wrote: Hi, I have the following route below which transfers pdf-files and txt-files from one directory to different directories at target system. I want to write the pdf-files to target system before txt-files. I tried to do this by using sortBy in property file. Like this: sftp.inbox=sftp://c...@xxx.xxx.xxx.xxx:22/files?password=secretsortBy=*.pdf;*.txt However, it seems that some of the pdf-files is written to target after the txt-file. Are there other configurations to use to achieve that txt-files will be written to target system after all pdf-files? I'm using Camel 2.8.2. route id=inComingInvoiceRoute routePolicyRef=incomingPolicy from uri={{sftp.inbox}} / choice when language language=simple${header.CamelFileNameOnly} regex '^.*pdf$'/language to uri={{file.imagedirectory}} / /when when language language=simple${header.CamelFileNameOnly} regex '^.*txt$'/language to uri={{file.outbox}} / /when otherwise to uri={{file.other}} / /otherwise /choice /route Thanks in advance for any hints. Best regards Lars Stuevold -- View this message in context: http://camel.465427.n5.nabble.com/Writing-to-destination-where-priority-is-based-on-filename-extension-tp5031542p5031542.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.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/ -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Programatically using Camel with different jms providers
Hi The JmsComponent has a JmsConfiguration, where you can configure it using getter/setters. Its in fact also what Spring XML in the end does, invokes those setters. On Tue, Nov 29, 2011 at 8:25 AM, tkatva tuomas.ka...@gmail.com wrote: Thank you for your answer. Only problem is that I need to programmatically define connection factories, host, port and other connection details. I cannot use Spring XML because I don't know these details in advance. I get the connection details from database and I need to assign these values at runtime. Thank you Best Regards Tuomas -- View this message in context: http://camel.465427.n5.nabble.com/Programatically-using-Camel-with-different-jms-providers-tp5029408p5031404.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.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Routing standard notation
The EIP book has the standard notation http://www.integrationpatterns.com/ On Tue, Nov 29, 2011 at 2:07 PM, Xenofon Papadopoulos xpa...@gmail.com wrote: Is there any standard (graphical) notation that describes routes (including exceptions)? Something like BPMN for routing... Thanks -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Using headers and velocity
I have checked the headers and it does seem that the xpath is not returning anything. Given that this is the Spring DSL, and the sessionID element would only fall under the standard namespace I am not sure how to actually declare it in the spring DSL properly. Can I use a mock namespace and append that to the front of the expression? Seems like saying //ns0:sessionID wouldn't work though even if I set the ns0 in the context to the base xmnls of the doc. Would a simple expression be easier to pull out this sessionID value? I tried that as well and am still not getting a value from it. -- View this message in context: http://camel.465427.n5.nabble.com/Using-headers-and-velocity-tp5030214p5032839.html Sent from the Camel - Users mailing list archive at Nabble.com.
JAX-RS based on XML message
I have something like this: from(jms:queue:products) .to(cxfrs://http://my-rs-service.com/restapi/product/1234;); So I read XML documents from a JMS queue, that have a product element. Based on the value of it I wanna call a JAX-RS WebService. How would I do this? - can I somehow use XPath and parse product out of my incoming XML? - how would I dynamically build my URL for the REST Service call? cheers, T. -- View this message in context: http://camel.465427.n5.nabble.com/JAX-RS-based-on-XML-message-tp5032860p5032860.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Using headers and velocity
Apparently what I said about using a mock namespace does actually work, so I just set a xmlnx:s to the standard namespace in the xml message and then the xpath worked great. -- View this message in context: http://camel.465427.n5.nabble.com/Using-headers-and-velocity-tp5030214p5032900.html Sent from the Camel - Users mailing list archive at Nabble.com.
Passing SEDA instance to Bean
Hi All, I am looking to do the following. 1. pass a seda component from CamelContext to a plain java bean 2. The java bean would pass this Queue component to JNI component. Is there a way to do this. Thanks regards, Ebe -- View this message in context: http://camel.465427.n5.nabble.com/Passing-SEDA-instance-to-Bean-tp5032985p5032985.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem Configuring WSS4JInInterceptor Using a Blueprint.
Hello Freeman, Please find the SOAP request below, soapenv:Envelope xmlns:cxf=http://cxf.camel.demos.mycompany.com/; xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Headerwsse:Security xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;wsse:UsernameToken wsu:Id=UsernameToken-1 xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;wsse:Usernametestuser/wsse:Usernamewsse:Password Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText;testpass/wsse:Passwordwsse:Nonce EncodingType=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;J2zRkG+bR171T73UbNAsXg==/wsse:Noncewsu:Created2011-11-29T17:52:57.249Z/wsu:Created/wsse:UsernameToken/wsse:Security/soapenv:Header soapenv:Body cxf:greet nameChaks/name /cxf:greet /soapenv:Body /soapenv:Envelope Thanks, Chaks. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-Configuring-WSS4JInInterceptor-Using-a-Blueprint-tp5028621p5033153.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: call Oracle Package procedure
Hello Vadim! Unfortunately it's not possible at the moment, but we could support it. Du you consider to open a JIRA (new feature) for it at [1]? [1] https://issues.apache.org/jira/browse/CAMEL Best, Christian On Tue, Nov 29, 2011 at 1:09 PM, VadimSPB vadimbubli...@gmail.com wrote: Hi All, I can use camel for message transfer in Oracle? Call stored procedure in, out parameters? example: RouteBuilder route = new RouteBuilder() { @Override public void configure() throws Exception { from(servlet:///MessageServlet) .setBody(constant({ CALL IBS.\Z$IMS_INTERFACE_WS\.TEST_STR(:P_STR_IN,:P_STR_OUT)})).to(jdbc:IBSO); } }; thanks p.s. I am sorry for my English, I use the translator -- View this message in context: http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-tp5032133p5032133.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: convertBodyTo(org.w3c.dom.Document.class) fails
We have a few tests for this kind of transformation [1]. They also work with the 'standalone=yes' definition. As Claus wrote, to expect help you have to tell us: - Which version of Camel do you use? - What do you exactly mean with fail? - What is the payload type you want to convert from? [1] https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/jaxp/DomConverterTest.java Best, Christian On Mon, Nov 28, 2011 at 6:15 PM, Tristan23 tristanlst...@gmail.com wrote: Hi, I am using convertBodyTo() to convert an XML document to DOM. Basically it works. Unfortunately I get messages with a preceding declaration: ?xml version=1.0 encoding=UTF-8 standalone=yes? This causes the convertBodyTo(org.w3c.dom.Document.class) to fail. What to do? -- View this message in context: http://camel.465427.n5.nabble.com/convertBodyTo-org-w3c-dom-Document-class-fails-tp5029460p5029460.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: call Oracle Package procedure
I also appreciate if you open Jira for it as we need to have this feature . Thanks, Omar atia Sent via BlackBerry® from mtc touch -Original Message- From: Christian Müller christian.muel...@gmail.com Date: Tue, 29 Nov 2011 19:24:07 To: users@camel.apache.org Reply-To: users@camel.apache.org Subject: Re: call Oracle Package procedure Hello Vadim! Unfortunately it's not possible at the moment, but we could support it. Du you consider to open a JIRA (new feature) for it at [1]? [1] https://issues.apache.org/jira/browse/CAMEL Best, Christian On Tue, Nov 29, 2011 at 1:09 PM, VadimSPB vadimbubli...@gmail.com wrote: Hi All, I can use camel for message transfer in Oracle? Call stored procedure in, out parameters? example: RouteBuilder route = new RouteBuilder() { @Override public void configure() throws Exception { from(servlet:///MessageServlet) .setBody(constant({ CALL IBS.\Z$IMS_INTERFACE_WS\.TEST_STR(:P_STR_IN,:P_STR_OUT)})).to(jdbc:IBSO); } }; thanks p.s. I am sorry for my English, I use the translator -- View this message in context: http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-tp5032133p5032133.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Update camel route at runtime using config admin
Hi, Using the example mentioned in http://camel.apache.org/loading-routes-from-xml-files.html, i tried to load a route dynamically. Here's my xml file which holds the external routes that I intend to load dynamically. ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:osgi=http://camel.apache.org/schema/osgi; xmlns:beans=http://www.springframework.org/schema/beans; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://camel.apache.org/schema/osgi http://camel.apache.org/schema/osgi/camel-osgi.xsd http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd; routes xmlns=http://camel.apache.org/schema/spring; route id=bar from uri=direct:bar/ to uri=mock:bar/ /route /routes /beans But, im getting the following exception : org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionParser for element [routes] Help would be appreciated. Thank you! -- View this message in context: http://camel.465427.n5.nabble.com/Update-camel-route-at-runtime-using-config-admin-tp4965455p507.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Inconsistent results with File2 'readLock=changed'
I upgraded my dev box to version 2.8.3 so I could use the readLockCheckInterval option and set it to 3 seconds. The Exchange still fires off even though the file hasn't completely copied. Details: 1) My custom Idempotent Repository gets queried as soon as I initiate the file copy (OK) 2) 3 seconds later the incoming Exchange is logged and processes even though the 1GB file is not completely copied. In the Windows Explorer 'details' view, the file size shows 1GB even though only maybe 200MB have been transferred. It seems like for my case increasing the readLockCheckInterval doesn't help b/c Windows reports the final file size even though it hasn't finished copying. From searching (and from documentation in the Camel File component), it's a common problem but I've never run into it before. I'm going to look at the code from the current changed read lock as you suggested to see if I can figure something out for our scenario. We will have write permissions for the file so maybe I can determine file completion that way. I'll post back on the status. This issue appears when I'm copying between local directories and from a network drive btw. -- View this message in context: http://camel.465427.n5.nabble.com/Inconsistent-results-with-File2-readLock-changed-tp5030004p5033493.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel XSLT Component - Load XSLT from database
I'm new to camel so please go easy on me. First - I'm using *Camel-2.8.2*. For our application we would like to store our XSLT files in the database rather than in the file system. We have an endpoint artifact table that has an column called content which contains the XSLT. Based on the available XSLT loading options my thought was to use HTTP. http://camel.apache.org/xslt.html http://camel.apache.org/xslt.html To that end I created a very simple Java Servlet to load the endpoint artifact from the database and return the XSLT content as the response (with content type of text/xml). I believe this is working as I'm able to see the XSLT being returned (also viewable in the browser). The loader URL is something like: http://localhost:7001/gateway/serviceEndPointArtifactLoader?id=6name=TEST I then added the following to my route: to uri=xslt:http://localhost:7001/gateway/serviceEndPointArtifactLoader?id=6amp;name=TEST/ Trying to start this route yields an exception containing the following: Cannot be resolved to absolute file path because it does not reside in the file system: http://localhost:7001/gateway/serviceEndPointArtifactLoader; Questions: 1.) Syntactically does the to on my route look OK? 2.) If so, is what I'm trying to do supported by Camel? I debugged the XSLTComponent class a bit, and it doesn't really look like it, though I could have easily missed something. Thanks in advance to any that are able to provide help and guidance. JM -- View this message in context: http://camel.465427.n5.nabble.com/Camel-XSLT-Component-Load-XSLT-from-database-tp5033499p5033499.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Blueprint bundle + plain Main class from the same project?
I think the Camel example you want to look at is camel-example-cxf instead, it's much richer than the osgi examples in terms of functionality and has an osgi deployment option just as a minor optional addition. Glen On 11/28/2011 04:31 PM, Alexander Krauss wrote: Dear list, I am playing with the cxf/osgi/blueprint example at http://camel.apache.org/cxf-example-osgi-blueprint.html. While deployment into Karaf works really nicely, I am looking for a way to start the same routes when no Karaf is available, either via mvn camel:run or preferably directly from the IDE (here: IntelliJ IDEA 10.5). The idea is to be able to test changes quickly, without the extra deployment step. I tried adding a Main class, as in the cxf-proxy example, but got an error that did not really help me understand what's wrong (see below). I assume that there is something wrong with the project setup (unchanged from the example). Is there a project setup which can be used to create both OSGi blueprint bundles as well as run the routes stand-alone, without the OSGi container? Thanks in advance for any hints. Alex Exception in thread main org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 34 in XML document from class path resource [OSGI-INF/blueprint/camel-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelcxf:cxfEndpoint'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) 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.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) at org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:93) at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:185) at org.apache.camel.spring.Main.doStart(Main.java:139) at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67) at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54) at org.apache.camel.example.reportincident.Main.main(Main.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelcxf:cxfEndpoint'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417) at
Re: call Oracle Package procedure
I raised the JIRA: https://issues.apache.org/jira/browse/CAMEL-4725 Best, Christian On Tue, Nov 29, 2011 at 7:54 PM, Omar Atia omar.a...@its.ws wrote: I also appreciate if you open Jira for it as we need to have this feature . Thanks, Omar atia Sent via BlackBerry® from mtc touch -Original Message- From: Christian Müller christian.muel...@gmail.com Date: Tue, 29 Nov 2011 19:24:07 To: users@camel.apache.org Reply-To: users@camel.apache.org Subject: Re: call Oracle Package procedure Hello Vadim! Unfortunately it's not possible at the moment, but we could support it. Du you consider to open a JIRA (new feature) for it at [1]? [1] https://issues.apache.org/jira/browse/CAMEL Best, Christian On Tue, Nov 29, 2011 at 1:09 PM, VadimSPB vadimbubli...@gmail.com wrote: Hi All, I can use camel for message transfer in Oracle? Call stored procedure in, out parameters? example: RouteBuilder route = new RouteBuilder() { @Override public void configure() throws Exception { from(servlet:///MessageServlet) .setBody(constant({ CALL IBS.\Z$IMS_INTERFACE_WS\.TEST_STR(:P_STR_IN,:P_STR_OUT)})).to(jdbc:IBSO); } }; thanks p.s. I am sorry for my English, I use the translator -- View this message in context: http://camel.465427.n5.nabble.com/call-Oracle-Package-procedure-tp5032133p5032133.html Sent from the Camel - Users mailing list archive at Nabble.com.
Persistent Header
I have a route which hits an active MQ point external to my system and outside of my control. I've tried creating a header before the queue, and then capturing it afterwards but the queue I am hitting (actually another instance of Servicemix with activeMQ) does not persist it along with the message and eventually the response. Is there a way for me to persist a piece of data quickly and easily that I can set before the external queue component and then retrieve afterwards? Example of what I am doing: setHeader headerName=theCode constantABCDE/constant /setHeader inOut uri=activemqhcm:queue:JMS/EXT.ESB.REQ/ setBody simple${headers.theCode}/simple /setBody to uri=file:data?fileName=test.xml/ -- View this message in context: http://camel.465427.n5.nabble.com/Persistent-Header-tp5033912p5033912.html Sent from the Camel - Users mailing list archive at Nabble.com.
ehcache based IdempotentRepository
Would there be an interest for a Ehcache based MemoryIdempotentRepository ? I guess such an implementation should be implemented in camel-cache? -- David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
How to configure default endpoint
The ProducerTemplate (2.8.3) javadocs talk about methods that send to to the default endpoint... but how does one configure that that endpoint is? I see that DefaultProducerTemplate has methods like: public void setDefaultEndpointUri(String endpointUri) { public void setDefaultEndpoint(Endpoint defaultEndpoint) { But these are not on ProducerTemplate. CamelContext.createProducerTemplate() returns a ProducerTemplate, so to set the default you need to cast? Really? Is this an oversight or by design? --jason
2.9.0-RC1 missing published sources artifacts
Any reason why the 2.9.0-RC1 release didn't include source artifacts? http://search.maven.org/#artifactdetails%7Corg.apache.camel%7Ccamel-core%7C2.9.0-RC1%7Cbundle Javadoc and tests are attached... why not sources? This is making it harder than necessary to consume this pre-release for testing (for those who need access to the source for debugging). Maybe something to do with the packagingbundle... stuff? As I see sources for some other components, like: http://search.maven.org/#artifactdetails%7Corg.apache.camel%7Ccamel-core-xml%7C2.9.0-RC1%7Cjar --jason
Minor logging nit
I just noticed this... snip DefaultCamelContext - Apache Camel 2.8.3 (CamelContext:camel-1) is shutting down DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 300 seconds) DefaultShutdownStrategy - Route: route1 shutdown complete, was consuming from: Endpoint[direct://publish] DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds DefaultInflightRepository - Shutting down with no inflight exchanges. DefaultCamelContext - Uptime: 55.416 seconds DefaultCamelContext - Apache Camel 2.8.3 (CamelContext: camel-1) is shutdown in 0.003 seconds /snip Has to do with: Apache Camel 2.8.3 (CamelContext:camel-1) and: Apache Camel 2.8.3 (CamelContext: camel-1) There is a space after the : in the later, missing in the former. These should probably be consistent. --jason
Re: Update camel route at runtime using config admin
Hi, Seems you miss camelContext element outside the routers, something like camelContext routers .. Freeman On 2011-11-30, at 上午3:02, mayank27 wrote: Hi, Using the example mentioned in http://camel.apache.org/loading-routes-from-xml-files.html, i tried to load a route dynamically. Here's my xml file which holds the external routes that I intend to load dynamically. ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:osgi=http://camel.apache.org/schema/osgi; xmlns:beans=http://www.springframework.org/schema/beans; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://camel.apache.org/schema/osgi http://camel.apache.org/schema/osgi/camel-osgi.xsd http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd; routes xmlns=http://camel.apache.org/schema/spring; route id=bar from uri=direct:bar/ to uri=mock:bar/ /route /routes /beans But, im getting the following exception : org .springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionParser for element [routes] Help would be appreciated. Thank you! -- View this message in context: http://camel.465427.n5.nabble.com/Update-camel-route-at-runtime-using-config-admin-tp4965455p507.html Sent from the Camel - Users mailing list archive at Nabble.com. - Freeman Fang FuseSource Email:ff...@fusesource.com Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com
Re: Persistent Header
Hi, In this case I think you need store the date as properties for exchange but not the headers for the message. The exchange keep alive during whole InOut conversation. Freeman On 2011-11-30, at 上午6:25, Castyn wrote: I have a route which hits an active MQ point external to my system and outside of my control. I've tried creating a header before the queue, and then capturing it afterwards but the queue I am hitting (actually another instance of Servicemix with activeMQ) does not persist it along with the message and eventually the response. Is there a way for me to persist a piece of data quickly and easily that I can set before the external queue component and then retrieve afterwards? Example of what I am doing: setHeader headerName=theCode constantABCDE/constant /setHeader inOut uri=activemqhcm:queue:JMS/EXT.ESB.REQ/ setBody simple${headers.theCode}/simple /setBody to uri=file:data?fileName=test.xml/ -- View this message in context: http://camel.465427.n5.nabble.com/Persistent-Header-tp5033912p5033912.html Sent from the Camel - Users mailing list archive at Nabble.com. - Freeman Fang FuseSource Email:ff...@fusesource.com Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com
Re: 2.9.0-RC1 missing published sources artifacts
Hi, This is a known issue tracked by CAMEL-4611[1], and it already get fixed, should be ok with next release. [1]https://issues.apache.org/jira/browse/CAMEL-4611 Freeman On 2011-11-30, at 上午9:15, Jason Dillon wrote: Any reason why the 2.9.0-RC1 release didn't include source artifacts? http://search.maven.org/#artifactdetails%7Corg.apache.camel%7Ccamel-core%7C2.9.0-RC1%7Cbundle Javadoc and tests are attached... why not sources? This is making it harder than necessary to consume this pre-release for testing (for those who need access to the source for debugging). Maybe something to do with the packagingbundle... stuff? As I see sources for some other components, like: http://search.maven.org/#artifactdetails%7Corg.apache.camel%7Ccamel-core-xml%7C2.9.0-RC1%7Cjar --jason - Freeman Fang FuseSource Email:ff...@fusesource.com Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com
Re: Minor logging nit
Hi, Good catch, create CAMEL-4727[1] to make this improvement. [1]https://issues.apache.org/jira/browse/CAMEL-4727 Freeman On 2011-11-30, at 上午9:21, Jason Dillon wrote: I just noticed this... snip DefaultCamelContext - Apache Camel 2.8.3 (CamelContext:camel-1) is shutting down DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 300 seconds) DefaultShutdownStrategy - Route: route1 shutdown complete, was consuming from: Endpoint[direct://publish] DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds DefaultInflightRepository - Shutting down with no inflight exchanges. DefaultCamelContext - Uptime: 55.416 seconds DefaultCamelContext - Apache Camel 2.8.3 (CamelContext: camel-1) is shutdown in 0.003 seconds /snip Has to do with: Apache Camel 2.8.3 (CamelContext:camel-1) and: Apache Camel 2.8.3 (CamelContext: camel-1) There is a space after the : in the later, missing in the former. These should probably be consistent. --jason - Freeman Fang FuseSource Email:ff...@fusesource.com Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com
Re: How to configure default endpoint
Hi Jason, Good catch, I checked the code of ProducerTemplate, there is no method to set the DefaultEndpoint, I just created a JIRA[1]. Now you need to cast the ProducerTemplate to DefaultProducerTemplate for it. [1]https://issues.apache.org/jira/browse/CAMEL-4728l On Wed Nov 30 08:31:48 2011, Jason Dillon wrote: The ProducerTemplate (2.8.3) javadocs talk about methods that send to to the default endpoint... but how does one configure that that endpoint is? I see that DefaultProducerTemplate has methods like: public void setDefaultEndpointUri(String endpointUri) { public void setDefaultEndpoint(Endpoint defaultEndpoint) { But these are not on ProducerTemplate. CamelContext.createProducerTemplate() returns a ProducerTemplate, so to set the default you need to cast? Really? Is this an oversight or by design? --jason -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang
How to implement dynamic JmsConstants.JMS_DESTINATION_NAME w/Processor component?
I spent a few hours (I think again) trying to implement a dynamic destination based on IN message using a Processor only to find out that it didn't work as I expected. Quite possible because I don't understand the full contract for what a processor component needs to do. I did find that using a bean() component worked, but I'd really like to avoid any reflection overhead involved. I simply need to filter the messages passed to a route so I can select the correct destination. I figured a processor was the way to do this, but simply adding a processor and setting the IN.header didn't work, actually it messed up the in message that ended up at the jms component (had null body, no headers). Is the processor intended to set the out message, and that out message would then be used as the in message for the next step? I'm just looking for the most efficent way to implement Reuse endpoint and send to different destinations computed at runtime ( http://camel.apache.org/jms.html )... just a direct invocation that gets the Exchange (like a Processor does) w/o the bean introspection/invocation overhead. Can anyone advise on how to implement this? Thanks, --jason
Re: Update camel route at runtime using config admin
Hi freeman, thanks for responding. But the example link I posted did not have camelContext element outside the routes element. Also the example given in apache camel source code I downloaded from svn didn't have the camelContext element in barRoute.xml file Am I missing something? -- View this message in context: http://camel.465427.n5.nabble.com/Update-camel-route-at-runtime-using-config-admin-tp4965455p5034530.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Update camel route at runtime using config admin
Hi, If you run this example in OSGi container, package import missing could cause error like org .springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionParser for element [routes] You run this example in OSGi container, right? If so, what kind of OSGi container you're using? If it's Servicemix/ Karaf, ensure you already installed camel feature. Also check your example bundle, ensure it has Import-Package like org.apache.camel.builder org.apache.camel.model org.apache.camel.spring Freeman On 2011-11-30, at 下午12:39, mayank27 wrote: Hi freeman, thanks for responding. But the example link I posted did not have camelContext element outside the routes element. Also the example given in apache camel source code I downloaded from svn didn't have the camelContext element in barRoute.xml file Am I missing something? -- View this message in context: http://camel.465427.n5.nabble.com/Update-camel-route-at-runtime-using-config-admin-tp4965455p5034530.html Sent from the Camel - Users mailing list archive at Nabble.com. - Freeman Fang FuseSource Email:ff...@fusesource.com Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com
Re: Problem Configuring WSS4JInInterceptor Using a Blueprint.
Hello Freeman, That didn't make any difference, still I get the same exception with PasswordDigest as well. Please find the SOAP request message below, soapenv:Envelope xmlns:cxf=http://cxf.camel.demos.mycompany.com/; xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header wsse:Security xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd; wsse:UsernameToken wsu:Id=UsernameToken-1 xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd; wsse:Usernametestuser/wsse:Username wsse:Password Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest;WsieFP1Kj+qSKm6VyAhZeEPBJHU=/wsse:Password wsse:Nonce EncodingType=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary;UhaM20jCwsGyZNvkm6Nvyw==/wsse:Nonce wsu:Created2011-11-30T05:21:49.817Z/wsu:Created /wsse:UsernameToken /wsse:Security /soapenv:Header soapenv:Body cxf:greet nameChaks/name /cxf:greet /soapenv:Body /soapenv:Envelope Thanks, Chaks. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-Configuring-WSS4JInInterceptor-Using-a-Blueprint-tp5028621p5034577.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: ehcache based IdempotentRepository
If any I would say give hazelcast a try 2011/11/29 David Karlsen davidkarl...@gmail.com Would there be an interest for a Ehcache based MemoryIdempotentRepository ? I guess such an implementation should be implemented in camel-cache? -- David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
Re: How to implement dynamic JmsConstants.JMS_DESTINATION_NAME w/Processor component?
On Wed Nov 30 12:17:47 2011, Jason Dillon wrote: I spent a few hours (I think again) trying to implement a dynamic destination based on IN message using a Processor only to find out that it didn't work as I expected. Quite possible because I don't understand the full contract for what a processor component needs to do. I did find that using a bean() component worked, but I'd really like to avoid any reflection overhead involved. I simply need to filter the messages passed to a route so I can select the correct destination. I figured a processor was the way to do this, but simply adding a processor and setting the IN.header didn't work, actually it messed up the in message that ended up at the jms component (had null body, no headers). I need to have a look at your processor code :) Is the processor intended to set the out message, and that out message would then be used as the in message for the next step? Yes, camel pipeline process will copy the out message to next exchange in message if you set the out message body. I'm just looking for the most efficent way to implement Reuse endpoint and send to different destinations computed at runtime ( http://camel.apache.org/jms.html )... just a direct invocation that gets the Exchange (like a Processor does) w/o the bean introspection/invocation overhead. I think you can set the message header in the processor as the bean does. Can anyone advise on how to implement this? Thanks, --jason -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang