Re: Camel BINDY FIXED - Short Record handling features
Hi I am not sure. There has been some issues with Bindy over the years as people use it for many different wats than it initially supported. Though in recent time Rich Newcomb and others have contributed to camel-bindy to make it better. Though as usually its often easier to provide a small unit test that demonstrates the problem. Then raise that as a issue in the JIRA tracker. Then we can use that test to help fix / improve the problem. And for CSV / flat files there are alternatives as listed here http://camel.apache.org/data-format.html For example beanio is a pretty cool project that is active maintained. Some of the others are not and has not been maintained for years. Though they do the work as well.. On Tue, Mar 12, 2013 at 9:47 PM, ganeshkumar.kanaga...@barclays.com wrote: Claus, I see your comment about improving the BINDY Fixed Length http://camel.465427.n5.nabble.com/Bindy-and-FixedLength-td5118749.html Is the below issue will get addressed as part of the fix? If the data is short record, then the padding is not happening to make it to match with the Model Length. Thanks Ganesh -Original Message- From: Kanagavel, Ganesh Kumar: CRES (NYK) Sent: Tuesday, March 12, 2013 11:34 AM To: users@camel.apache.org Subject: Camel BINDY FIXED - Short Record handling features Hi, Please advise if there is a feature available in Camel BINDY FIXED Format to handle the short record exceptions. i.e) the file is Fixed Format of 80 Bytes, but it may also contain less than 80 on some records. When I defined the Model Class with 80 Bytes, the processor is failing on those records where the record length is less than 80. Currently I am making use of the following in the Model Class. @FixedLengthRecord(length=80 ,paddingChar=' ',hasHeader=true, hasFooter=true) Thanks Ganesh ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official confirmation of any transaction. Any opinions presented are solely those of the author and do not necessarily represent those of Barclays. This message is subject to terms available at: www.barclays.com/emaildisclaimer and, if received from Barclays' Sales or Trading desk, the terms available at: www.barclays.com/salesandtradingdisclaimer/. By messaging with Barclays you consent to the foregoing. Barclays Bank PLC is a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays group. ___ ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official confirmation of any transaction. Any opinions presented are solely those of the author and do not necessarily represent those of Barclays. This message is subject to terms available at: www.barclays.com/emaildisclaimer and, if received from Barclays' Sales or Trading desk, the terms available at: www.barclays.com/salesandtradingdisclaimer/. By messaging with Barclays you consent to the foregoing. Barclays Bank PLC is a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays group. ___ -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Files cannot be moved on FTP
Hi Robin, sorry for delay, i read your response only now. I try to figure out the problem ASAP Regards --Filippo 2013/3/12 Lutter, Robin robin.lut...@t-systems.com Hi Claus, i think the error is in method FileUtil.isWindows() because it determines the separator char for client os and not for server os. The given setting for separator is ignored at this place. I would suggest to change FtpOperations line 656 to path = FileUtil.compactPath(path, endpoint.getConfiguration().getSeparator()); Should I fill an jira ticket for 2.11? Regards Robin I think there is an similar thread from xuloo 'camel-ftp 2.10.4 fails to connect on windows' -Ursprüngliche Nachricht- Von: Lutter, Robin Gesendet: Montag, 11. März 2013 15:57 An: users@camel.apache.org Betreff: AW: Files cannot be moved on FTP Hi Claus, We are already using stepwise=false. This is the ftp-uri I have in my testcase: from(ftp://; + getFTPServerAddress() + /test?password=secret + ftpClient.dataTimeout=3stepwise=false + passiveMode=truebinary=true + move=successseparator=UNIX + antInclude=FILE.TXT) .log(${body}); Tracing file.remote turns out, that FileUtil normalizePath is using File.separator from local system and not the separator setting TRACE org.apache.camel.component.file.remote.FtpOperations - changeCurrentDirectory(/) TRACE org.apache.camel.component.file.remote.FtpOperations - Changing directory: \\ With stepwise=true the extra escaped backslash is away: TRACE org.apache.camel.component.file.remote.FtpOperations - changeCurrentDirectory(/) TRACE org.apache.camel.component.file.remote.FtpOperations - Changing directory: \ Regards Robin On Thu, Mar 7, 2013 at 12:04 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Mar 6, 2013 at 12:05 PM, Lutter, Robin robin.lut...@t-systems.com wrote: Hi Claus, we use ftp. Setting separator to UNIX doesn't help. Contrary the error occurs earlier in process: WARN org.apache.camel.component.file.GenericFileOnCompletion - Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - File operation failed: 550 Failed to change directory. Cannot change directory to: \\. Code: 550] org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: 550 Failed to change directory. Strange: server log can still contains CWD \\ Can you try with stepwise=false You can read more about this option at: http://camel.apache.org/ftp2 And yeah looks like we should fix that double slash bug. It ought to be a single slash. If you get this error all the time. Then feel free to enable TRACE logging on org.apache.camel.component.file.remote Then we can possible use that to bettet understand what goes wrong. Regards Robin On Wed, Mar 6, 2013 at 11:23 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Mar 6, 2013 at 10:31 AM, Lutter, Robin robin.lut...@t-systems.com wrote: Hi Filippo Balicchia, i can confirm, that move works with camel-ftp 2.10.4 and apache ftpserver project on windows maschine with JDK 1.6.0_33. While running with ftp server under RHEL 6 move failed with errorcode 550. Rename works with commandline. Logs from ftpserver: CWD 2012120100.OML 550 Failed to change directory. CWD \ 550 Failed to change directory. CWD \\ 550 Failed to change directory. CWD 550 Failed to change directory. Differences in log between 2.10.2 and 2.10.4 2.10.2: 2.10.4 CWD test/success CWD test/success PWD PWD CWD /CWD \\ Regards Robin Are you using the ftp or sftp. Just to be sure which one is being used. Also you can try setting separator=Unix to tell Camel to use / for path separators. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Files cannot be moved on FTP
On Tue, Mar 12, 2013 at 8:36 PM, Lutter, Robin robin.lut...@t-systems.com wrote: Hi Claus, i think the error is in method FileUtil.isWindows() because it determines the separator char for client os and not for server os. The given setting for separator is ignored at this place. I would suggest to change FtpOperations line 656 to path = FileUtil.compactPath(path, endpoint.getConfiguration().getSeparator()); Should I fill an jira ticket for 2.11? Yeah this sounds right, that if you have configured an separator as wither unix or windows then we should use that from the configuration. If its AUTO we should not use any separator but leave the path slashes as is. Fell free to log a JIRA and attach a proposed patch. Regards Robin I think there is an similar thread from xuloo 'camel-ftp 2.10.4 fails to connect on windows' -Ursprüngliche Nachricht- Von: Lutter, Robin Gesendet: Montag, 11. März 2013 15:57 An: users@camel.apache.org Betreff: AW: Files cannot be moved on FTP Hi Claus, We are already using stepwise=false. This is the ftp-uri I have in my testcase: from(ftp://; + getFTPServerAddress() + /test?password=secret + ftpClient.dataTimeout=3stepwise=false + passiveMode=truebinary=true + move=successseparator=UNIX + antInclude=FILE.TXT) .log(${body}); Tracing file.remote turns out, that FileUtil normalizePath is using File.separator from local system and not the separator setting TRACE org.apache.camel.component.file.remote.FtpOperations - changeCurrentDirectory(/) TRACE org.apache.camel.component.file.remote.FtpOperations - Changing directory: \\ With stepwise=true the extra escaped backslash is away: TRACE org.apache.camel.component.file.remote.FtpOperations - changeCurrentDirectory(/) TRACE org.apache.camel.component.file.remote.FtpOperations - Changing directory: \ Regards Robin On Thu, Mar 7, 2013 at 12:04 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Mar 6, 2013 at 12:05 PM, Lutter, Robin robin.lut...@t-systems.com wrote: Hi Claus, we use ftp. Setting separator to UNIX doesn't help. Contrary the error occurs earlier in process: WARN org.apache.camel.component.file.GenericFileOnCompletion - Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - File operation failed: 550 Failed to change directory. Cannot change directory to: \\. Code: 550] org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: 550 Failed to change directory. Strange: server log can still contains CWD \\ Can you try with stepwise=false You can read more about this option at: http://camel.apache.org/ftp2 And yeah looks like we should fix that double slash bug. It ought to be a single slash. If you get this error all the time. Then feel free to enable TRACE logging on org.apache.camel.component.file.remote Then we can possible use that to bettet understand what goes wrong. Regards Robin On Wed, Mar 6, 2013 at 11:23 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Mar 6, 2013 at 10:31 AM, Lutter, Robin robin.lut...@t-systems.com wrote: Hi Filippo Balicchia, i can confirm, that move works with camel-ftp 2.10.4 and apache ftpserver project on windows maschine with JDK 1.6.0_33. While running with ftp server under RHEL 6 move failed with errorcode 550. Rename works with commandline. Logs from ftpserver: CWD 2012120100.OML 550 Failed to change directory. CWD \ 550 Failed to change directory. CWD \\ 550 Failed to change directory. CWD 550 Failed to change directory. Differences in log between 2.10.2 and 2.10.4 2.10.2: 2.10.4 CWD test/success CWD test/success PWD PWD CWD /CWD \\ Regards Robin Are you using the ftp or sftp. Just to be sure which one is being used. Also you can try setting separator=Unix to tell Camel to use / for path separators. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Intermittent test failures
Thanks Claus, that was it! Since the project uses camel-blueprint and camel-blueprint-test, I made the following exclusion and the problem went away: dependency groupIdorg.apache.camel/groupId artifactIdcamel-blueprint/artifactId /dependency dependency groupIdorg.apache.camel/groupId artifactIdcamel-test-blueprint/artifactId scopetest/scope exclusions exclusion artifactIdorg.apache.aries.blueprint/artifactId groupIdorg.apache.aries.blueprint/groupId /exclusion /exclusions /dependency -- View this message in context: http://camel.465427.n5.nabble.com/Intermittent-test-failures-tp5728946p5729079.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: base class for context component?
Ok now you lost me completely. I do not understand what you want to tell me. Or did you just explain the source code in http://camel.apache.org/context.html ? I already understood the code snippets in this explanation. But what is missing for me, is how I can put it in a running context. Is there a small example that I could investigate to understand how it works? Thanks, Sven On 03/11/13 14:45, Taariq Levack wrote: Hi Sven Perhaps you've misunderstood the following... Defining the context component In this context(excuse me), what's meant is a bean definition. You should just use the DefaultCamelContext to define your own context, with it's own name as this one is blackbox, and it's own routes. Taariq On Mon, Mar 11, 2013 at 11:21 AM, Sven Bauhan s...@ast.dfs.de wrote: On 03/09/13 20:40, Henryk Konsek wrote: Hi Sven, I'm trying to build my own context component as described in http://camel.apache.org/**context.htmlhttp://camel.apache.org/context.html . Actually Context Component is ready to use out of the box. You don't need to create your own. Or if you have to, please share with us the reasoning behind this need. Best regards. No, you misunderstood me. I do not want to replace the Context Component in Camel, but I need a class to define it. In the example the listing shows just the definition of the route without class or method. My questions concers the place for the definition of DefaultCamelContext. Is there an interface definition for a class containing a context component? Thanks, Sven
Re: Can't read properties from Processor
On Wed, Mar 13, 2013 at 12:07 AM, sonusgr mveligra...@gmail.com wrote: any ideas? If you use any of the Spring annotation stuff, eg @Value Then you must let Spring handle the lifecycle / IoC / of this class / processor. So you cannot do new MyXXXProcessor in the code. But have to refer to a spring bean id instead. For example using the camel bean component. Then Camel will lookup the bean in Spring, and Spring will does its IoC stuff et all. -- View this message in context: http://camel.465427.n5.nabble.com/Can-t-read-properties-from-Processor-tp5728996p5729051.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: zip file best practices
On Wed, Mar 13, 2013 at 3:32 AM, Willem.Jiang willem.ji...@gmail.com wrote: I just have a chance to check the code, it is not a new component. I think we can treat it as an expression, which can help the splitter to build a Iterator from the uncompressed stream. And it is mainly used with split DSL. Willem I suggest to add a nice example in the unit test and use SNIPPET tags to have this being used as an example we can show in the Camel docs, such as on the Splitter EIP page. Otherwise its hard for our end users to know such functionality exists. -- View this message in context: http://camel.465427.n5.nabble.com/zip-file-best-practices-tp5713437p5729057.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: base class for context component?
I got the idea that you really want to define an instance of the DefaultCamelContext, and not the new class/implementation that you are asking about. And the docs you referred to discuss this, and it's the example for how to do so. You can copy that sample and redefine it like this for example... DefaultCamelContext fooBlackBox = new DefaultCamelContext(registry); fooBlackBox.setName(fooBlackBox); fooBlackBox.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { // receive foo and forward to barfrom(direct:foo). to(direct:bar); } }); fooBlackBox.start(); registry.bind(someKey, fooBlackBox); I hope I understood you, else lets try again starting with what you want to accomplish. Taariq On Wed, Mar 13, 2013 at 12:35 PM, Sven Bauhan s...@ast.dfs.de wrote: Ok now you lost me completely. I do not understand what you want to tell me. Or did you just explain the source code in http://camel.apache.org/** context.html http://camel.apache.org/context.html ? I already understood the code snippets in this explanation. But what is missing for me, is how I can put it in a running context. Is there a small example that I could investigate to understand how it works? Thanks, Sven On 03/11/13 14:45, Taariq Levack wrote: Hi Sven Perhaps you've misunderstood the following... Defining the context component In this context(excuse me), what's meant is a bean definition. You should just use the DefaultCamelContext to define your own context, with it's own name as this one is blackbox, and it's own routes. Taariq On Mon, Mar 11, 2013 at 11:21 AM, Sven Bauhan s...@ast.dfs.de wrote: On 03/09/13 20:40, Henryk Konsek wrote: Hi Sven, I'm trying to build my own context component as described in http://camel.apache.org/context.htmlhttp://camel.apache.org/**context.html http://camel.**apache.org/context.htmlhttp://camel.apache.org/context.html . Actually Context Component is ready to use out of the box. You don't need to create your own. Or if you have to, please share with us the reasoning behind this need. Best regards. No, you misunderstood me. I do not want to replace the Context Component in Camel, but I need a class to define it. In the example the listing shows just the definition of the route without class or method. My questions concers the place for the definition of DefaultCamelContext. Is there an interface definition for a class containing a context component? Thanks, Sven
Re: Camel quartz component query
I expect that if you configured quartz to use a clustered jobstore, and connected to the same database with another quartz instance you could add more triggers, but I don't think the Quartz Component was really designed to work this way. Note that its not recommended to insert triggers directly into the database, you should use the Quartz API. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-quartz-component-query-tp5728942p5729086.html Sent from the Camel - Users mailing list archive at Nabble.com.
Regarding From and To in routing
Hello , I want to send my own messages to the Consumer(to( )) without the use of producer(i.e From( )). I want to send my own message through the Camel without the help of From( ). Please give some suggestions. Thank you all. -- View this message in context: http://camel.465427.n5.nabble.com/Regarding-From-and-To-in-routing-tp5729088.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Dinamyc SQL with arguments
@Chris Odom: Thanks for the suggestion, I did in this way. But I think it is a better option support dinamyc sql query out of box in camel. Yeah, you can do almost anything with custom Bean Component, but we still should provide common and useful options in the components. -- Henryk Konsek http://henryk-konsek.blogspot.com
Re: ClassNotFoundException: org.apache.xalan.xsltc.trax.DOM2SAX
java.lang.ClassNotFoundException: org.apache.xalan.xsltc.trax.DOM2SAX at java.net.URLClassLoader$1.run(URLClassLoader.java:202) ~[na:1.6.0_34] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_34] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) ~[na:1.6.0_34] at java.lang.ClassLoader.loadClass(ClassLoader.java:306) ~[na:1.6.0_34] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) ~[na:1.6.0_34] at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ~[na:1.6.0_34] at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:131) ~[na:na] at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ~[na:1.6.0_34] at org.apache.camel.util.ObjectHelper.doLoadClass(ObjectHelper.java:816) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:733) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.converter.jaxp.XmlConverter.clinit(XmlConverter.java:95) [camel-core-2.10.3.jar:2.10.3] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.6.0_34] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [na:1.6.0_34] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [na:1.6.0_34] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [na:1.6.0_34] at java.lang.Class.newInstance0(Class.java:355) [na:1.6.0_34] at java.lang.Class.newInstance(Class.java:308) [na:1.6.0_34] at org.apache.camel.util.ObjectHelper.newInstance(ObjectHelper.java:1166) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.util.ReflectionInjector.newInstance(ReflectionInjector.java:32) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.DefaultInjector.newInstance(DefaultInjector.java:45) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.converter.CachingInjector.createInstance(CachingInjector.java:44) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.converter.CachingInjector.newInstance(CachingInjector.java:38) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:55) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.support.TypeConverterSupport.convertTo(TypeConverterSupport.java:34) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.component.cxf.converter.CxfPayloadConverter.convertTo(CxfPayloadConverter.java:184) [camel-cxf-2.10.3.jar:2.10.3] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_34] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_34] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_34] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_34] at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:923) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.converter.StaticMethodFallbackTypeConverter.convertTo(StaticMethodFallbackTypeConverter.java:50) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:289) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:111) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:98) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.core.osgi.OsgiTypeConverter.convertTo(OsgiTypeConverter.java:98) [camel-core-osgi-2.10.3.jar:2.10.3] at org.apache.camel.util.MessageHelper.extractBodyForLogging(MessageHelper.java:233) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.util.MessageHelper.extractBodyForLogging(MessageHelper.java:176) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.util.MessageHelper.extractBodyForLogging(MessageHelper.java:143) [camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.DefaultMessage.toString(DefaultMessage.java:46) [camel-core-2.10.3.jar:2.10.3] at java.lang.String.valueOf(String.java:2826) [na:1.6.0_34] at java.lang.StringBuilder.append(StringBuilder.java:115) [na:1.6.0_34] at org.apache.camel.impl.DefaultExchange.toString(DefaultExchange.java:80) [camel-core-2.10.3.jar:2.10.3] at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:304) [slf4j-api-1.6.4.jar:1.6.4] at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:276) [slf4j-api-1.6.4.jar:1.6.4] at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:230)
Re: Publish/Subscribe with Camel
On Wed, Mar 13, 2013 at 11:36 AM, Bilgin Ibryam bibr...@gmail.com wrote: I am thinking to write a small article about different ways to do pub/sub with Camel. For the moment I can think of the following components that can do that: seda vm jms/activemq redis sns/sqs Are there any other I am missing? Maybe some of these also: guava eventbus hazelcast sjms mqtt amqp websocket (maybe ??) And not sure about the osgi event admin is for end user pub/sub scenarios, though I guess there is possible something in OSGi land. And I guess javaspace is kinda dead? Thanks Bilgin -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Regarding From and To in routing
On Wed, Mar 13, 2013 at 1:21 PM, Krishna.aradhya krishna.arad...@cognizant.com wrote: Hello , I want to send my own messages to the Consumer(to( )) without the use of producer(i.e From( )). I want to send my own message through the Camel without the help of From( ). Please give some suggestions. Thank you all. See about producer template http://camel.apache.org/producertemplate.html Which allows you to send a message to any Camel endpoint. -- View this message in context: http://camel.465427.n5.nabble.com/Regarding-From-and-To-in-routing-tp5729088.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Premature servlet response
Hi, I removed the on completion as suggested but the problem persists. Maybe a similar problem related to the aggregate and their completionHandlers? regards Christian Von: Willem jiang willem.ji...@gmail.com An: users@camel.apache.org; Christian Schäfer syrious3...@yahoo.de Gesendet: 3:27 Dienstag, 12.März 2013 Betreff: Re: Premature servlet response Hi, Have you went through the onCompletion[1] page? If you want to processor2 take effect, you need to remove the onCompletion from your route. [1]http://camel.apache.org/oncompletion.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 Monday, March 11, 2013 at 9:44 PM, Christian Schäfer wrote: Hello, currently I have the problem of not beeing able to set servlet response which was generated by the last processor of my route: servlet-consumer - processor1 - onCompletion - aggregate - processor2 (response builder) When I fire my test to the deployed servlet endpoint (camel 2.10.4 @ JBoss 7.1) it behaves in the order that: 1. body of processor1 is returned as http response 2. after that, processor2 starts which is too late as the response is still sent. How to force the route to send the response only when processor2 is done? regards Christian
Re: Camel multiple (nested) routes in one context
Hi, We're a couple of days away from going into production so we're not going to change the camel version. But I will upgrade to the latest version of Camel and re-test it soon For the moment we just moved the onExeption component outside of the flow. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-multiple-nested-routes-in-one-context-tp5728576p5729096.html Sent from the Camel - Users mailing list archive at Nabble.com.
Spel expressions don't compile as says in the documentation - Is it a bug?
Hi, I'm using camel 2.10.4 and spring 3.2.1.RELEASE versions. If I add this two expressions to my route: DOESN'T COMPILE: from(direct:example).setBody(spel(Hello #{request.body}! What a beautiful #{request.headers['dayOrNight']})).to(mock:result); COMPILE: from(direct:foo).filter().spel(#{request.headers['foo'] == 'bar'}).to(direct:bar); I have camel-spring in my classpath. The expression that doesn't compile is in the documentation (http://camel.apache.org/spel.html) section Samples - Expression templating. Why it doesn't compile? Is it a bug? Thanks, Juan -- View this message in context: http://camel.465427.n5.nabble.com/Spel-expressions-don-t-compile-as-says-in-the-documentation-Is-it-a-bug-tp5729097.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Issue in a camel route
Hi In your xml file you have cxf namespace and whatnot. You should remove that. Or install camel-cxf to have CXF deployed in Karaf. On Wed, Mar 13, 2013 at 2:17 PM, Sushmita chandra flightsoffantasy...@gmail.com wrote: In my processor class i am trying to create a jms connection ApplicationContext context = new ClassPathXmlApplicationContext(classpath:META-INF/spring/context.xml); CamelContext testContext = (CamelContext)context.getBean(camelContext); ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(vm://localhost?broker.persistent=false); testContext.addComponent(test-jms, JmsComponent.jmsComponentAutoAcknowledge(connectionFactory)); where my context file contains:- ?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:camel=http://camel.apache.org/schema/spring; xmlns:cxf=http://camel.apache.org/schema/cxf; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd; camel:camelContext id=camelContext camel:routeBuilder ref=routeBuilder/ /camel:camelContext I am trying to deploy it in Karaf and getting below mentioned exception * Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://camel.apache.org/schema/cxf] Offending resource: class path resource [META-INF/spring/context.xml]* Please let me know what is wrong here. -- View this message in context: http://camel.465427.n5.nabble.com/Issue-in-a-camel-route-tp5729099.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Camel - Commons Configuration
Our application has a configuration repository based on Apache Commons Configuration. We're using commons configuration because we like the configuration file reloading strategies and the ability to combine several configuration files (to solve the issue of dealing with environment specific properties) into one. I would like to use configuration values from that commons configuration inside my Camel flow, so as per the documentation in http://camel.apache.org/using-propertyplaceholder.html , I created the following beans : bean id=configuration class=belfius.gegc.flow.one.camel.spring.factory.CommonsConfigurationFactoryBean property name=globalConfig value=./base/globalConfig.xml/ /bean bean class=org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer property name=properties ref=configuration/ /bean The first bean simply loads up the commons config file repository and converts them into properties. I'm now able to retrieve configuration properties inside my flow using the standard camel property syntax: camel:log message=== Value = {{some/value/from/commons/config}} = loggingLevel=DEBUG/ This works fine, except offcourse for when the configuration changes. As the PropertyPlaceholder is constructed once at startup, it loads up the commons configuration files and converts them into properties, but we lose the ability to change the config files on a running system and have them picked up by Camel. Any idea on how something like this could be implemented using Camel / Spring ? Is there something available out of the box or would this be custom development ? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Commons-Configuration-tp5729102.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Send file via POST request
Hi guys, I am back with the solution. I finally managed how to do that! First thing was to find out that consumer sends all data in headers and you can't access the exchange's body. I managed to get data from headers and pass them into Camel's properties which could be then globally passed wherever I need to. REST part @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Path(/upload) @Produces(MediaType.APPLICATION_JSON) public Response uploadFile(MultipartBody multipartBody){ return null; } JAVA part /* * Method for parsing CamelHttpQuery * The URL query looks like a=1b=2 */ public static MapString, String getQueryMap(String query) { String[] params = query.split(); MapString, String map = new HashMapString, String(); for (String param : params) { String name = param.split(=)[0]; String value = param.split(=)[1]; map.put(name, value); } return map; } /* * Setting Camel's properties for @POST Consumer * * MessageContentList can't be used, because @POST consumer sends all data in headers. * Therefore there is different way how to get data for properties. */ public void setupPostProperties(Exchange exchange) throws IOException { String query = exchange.getIn().getHeader(CamelHttpQuery).toString(); MapString, String map = getQueryMap(query); String Host = map.get(Host); String Port = map.get(Port); String User = map.get(username); String Password = map.get(password); String Filename = map.get(pathToFile); String FolderId = map.get(folderId); exchange.setProperty(HOST, Host); exchange.setProperty(PORT, Port); exchange.setProperty(USERNAME, User); exchange.setProperty(PASSWORD, Password); exchange.setProperty(PATH_TO_FILE, Filename); exchange.setProperty(FOLDER_ID, FolderId); exchange.setProperty(UPLOAD_API, /webservice/upload.php); logger.debug(String.format( setupBasicProperties Host=%s, Port=%s, User=%s, + Password=%s, Filename=%s, FolderId=%s, Host, Port, User, Password, Filename, FolderId)); } /* * Sending @POST HTTP request * * Here we need org.apache.http.client.HttpClient library installed in Karaf. * It will not work with org.apache.commons.httpclient.HttpClient * You must install org.apache.httpcomponents to Karaf. * I am not sure which solution works, but one does :-) * * osgi:install -s wrap:mvn:org.apache.httpcomponents/httpmime/4.2.3 * osgi:install -s wrap:mvn:org.apache.httpcomponents/httpclient/4.2.3 * osgi:install -s wrap:mvn:org.apache.httpcomponents/httpcore/4.2.3 * * install mvn:org.apache.httpcomponents/httpmime/4.2.3 * install mvn:org.apache.httpcomponents/httpclient/4.2.3 * install mvn:org.apache.httpcomponents/httpcore-osgi/4.2.3 * * This method just sets variables which will be sent via @POST request * Using MultipartEntity I can send variables in different format(binary file and string in this case). * If there is a need to add more parameters, just add one more entity.addPart() */ public void sendPostRequest(Exchange exchange) throws IOException { String pathToUploader = https://; + exchange.getProperty(HOST).toString() + : + exchange.getProperty(PORT).toString() + exchange.getProperty(UPLOAD_API).toString(); String filename = exchange.getProperty(PATH_TO_FILE).toString(); String session_id = exchange.getProperty(SESSION_ID).toString(); String action = A; String output = json; File myfile = new File(filename); if(myfile.exists()){ HttpClient client = new DefaultHttpClient(); client.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1); HttpPost post = new HttpPost(pathToUploader); MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); //
Re: Spel expressions don't compile as says in the documentation - Is it a bug?
Hi I assume you get some compilation error message from SpEL that gives you clue what the problem is. On Wed, Mar 13, 2013 at 2:04 PM, Gardella juan gardellajuanpa...@gmail.com wrote: Hi, I'm using camel 2.10.4 and spring 3.2.1.RELEASE versions. If I add this two expressions to my route: DOESN'T COMPILE: from(direct:example).setBody(spel(Hello #{request.body}! What a beautiful #{request.headers['dayOrNight']})).to(mock:result); COMPILE: from(direct:foo).filter().spel(#{request.headers['foo'] == 'bar'}).to(direct:bar); I have camel-spring in my classpath. The expression that doesn't compile is in the documentation (http://camel.apache.org/spel.html) section Samples - Expression templating. Why it doesn't compile? Is it a bug? Thanks, Juan -- View this message in context: http://camel.465427.n5.nabble.com/Spel-expressions-don-t-compile-as-says-in-the-documentation-Is-it-a-bug-tp5729097.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Send file via POST request
This solution works ok with one little glitch. When I was working on my local environment then there was no problem, but when I deployed it to my server I noticed on little thing. The file I am uploading, has to be located on your server, but you want to upload it from your(client's) drive. So you must have two uploading parts. One which will move your file to your Karaf's server, and the other one is that Camel will move it from its server to wherever you want to upload the file. It goes this way: Your local drive e.g. /home/janulrom/Documents/test.txt - Server where you run Karaf e.g. /var/tmp/test.txt - Server where you want to upload the file it bugs me a lot, because I don't now how to pass file to route for example as byte[] or so. The worst part is that you must have two upload parts which can reduce memory when there is many requests. If someone has a hint how to do that, it will be much appreciated. -Br, Roman -- View this message in context: http://camel.465427.n5.nabble.com/Send-file-via-POST-request-tp5728674p5729111.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Publish/Subscribe with Camel
Thanks Claus. I wasn't aware of pub/sub capabilities of these components. Bilgin On 13 March 2013 12:36, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Mar 13, 2013 at 11:36 AM, Bilgin Ibryam bibr...@gmail.com wrote: I am thinking to write a small article about different ways to do pub/sub with Camel. For the moment I can think of the following components that can do that: seda vm jms/activemq redis sns/sqs Are there any other I am missing? Maybe some of these also: guava eventbus hazelcast sjms mqtt amqp websocket (maybe ??) And not sure about the osgi event admin is for end user pub/sub scenarios, though I guess there is possible something in OSGi land. And I guess javaspace is kinda dead? Thanks Bilgin -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Spel expressions don't compile as says in the documentation - Is it a bug?
On Wed, Mar 13, 2013 at 3:13 PM, Gardella juan gardellajuanpa...@gmail.com wrote: The compiler says The method spel(String) is undefined for the type MyRouteRouteBuilder where it extends org.apache.camel.builder.RouteBuilder. Ah you need to do a static import of the spel method from a class in camel-spring. -- View this message in context: http://camel.465427.n5.nabble.com/Spel-expressions-don-t-compile-as-says-in-the-documentation-Is-it-a-bug-tp5729097p5729114.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Consume the same file
Hi, I have to consume with the FTP component always the same file but only when its size changes. I read this in the documentation: Camel 2.11: To use a custom idempotent key. By default the absolute path of the file is used. You can use the File Language, for example to use the file name and file size, you can do: idempotentKey=${file:name}-${file:size} Does it mean that I have to wait camel 2.11 to solve my problem? Regards Alberto
Re: base class for context component?
On 03/13/13 12:50, Taariq Levack wrote: I got the idea that you really want to define an instance of the DefaultCamelContext, and not the new class/implementation that you are asking about. I did not mean to create a new implementation of DefaultCamelContext. I want to create a class for a context component. And the docs you referred to discuss this, and it's the example for how to do so. You can copy that sample and redefine it like this for example... DefaultCamelContext fooBlackBox = new DefaultCamelContext(registry); fooBlackBox.setName(fooBlackBox); fooBlackBox.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { // receive foo and forward to barfrom(direct:foo). to(direct:bar); } }); fooBlackBox.start(); registry.bind(someKey, fooBlackBox); This is the code snippet I was talking about. For me it is not an example cause I cannot copy it in a .java file and compile it. There is no class or method definition. I hope I understood you, else lets try again starting with what you want to accomplish. Ok, I try to explain what I mean. First I defined my context component route: package de.dfs.com.atsm; import org.apache.camel.ExchangePattern; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.model.dataformat.JaxbDataFormat; public class ContextRouteBuilder extends RouteBuilder { public void configure() { JaxbDataFormat jaxb = new JaxbDataFormat(); jaxb.setContextPath(de.dfs.com.atsm); BeanToMSG atsm_process = new BeanToMSG(); Aggregation aggregation = new Aggregation(); from(direct:segment-in) .unmarshal(jaxb) .process(atsm_process) .aggregate(header(ATSM-MID), aggregation).completionPredicate(aggregation) .to(direct:message-out); } } With this I try to make a context component like in the code snippet above: package de.dfs.com.atsm; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.impl.JndiRegistry; public class ContextComponent { private JndiRegistry m_registry; private DefaultCamelContext atsm_context; public ContextComponent( JndiRegistry registry ) throws Exception { this.m_registry = registry; this.atsm_context = new DefaultCamelContext(this.m_registry); this.atsm_context.setName(ATSM); this.atsm_context.addRoutes(new ContextRouteBuilder()); this.atsm_context.start(); this.m_registry.bind(atsm, this.atsm_context); } } With this context component in the library I want to create an application: package de.dfs.atciss; import org.apache.camel.CamelContext; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.impl.JndiRegistry; import org.apache.camel.main.Main; import org.apache.camel.util.jndi.JndiContext; import de.dfs.com.atsm.ContextComponent; import de.dfs.com.atsm.ContextRouteBuilder; public class MainApp { public static void main(String... args) throws Exception { //Main main = new Main(); //main.enableHangupSupport(); //DefaultCamelContext atsm_context = new DefaultCamelContext(); //atsm_context.setName(ATSM); //atsm_context.addRoutes(new ContextRouteBuilder()); //atsm_context.start(); //main.bind(atsm, atsm_context); //main.addRouteBuilder(new ContextRouteBuilder()); //main.run(args); JndiContext context = new JndiContext(); JndiRegistry registry = new JndiRegistry(context); @SuppressWarnings(unused) ContextComponent atsm_component = new ContextComponent(registry); } } Here I fail, cause I don't know how to integrate my context component into an application. Can you explain, what to do? Thanks, Sven
Re: Performance problem uploading to remote FTP using Stream
Hi Not sure if setting a sentBufferSize on the client helps? ftpClient.sentBufferSize=8192 Its -1 by default. Check the API of Commons Net FTP to see if it has any impact. org.apache.commons.net.ftp.FTPClient And maybe there is other options you can set on the ftpClient to speedup upload. Also you can enable TRACE logging on the org.apache.camel.component.file.remote name to ensure that the file is using a stream to upload it. On Wed, Mar 13, 2013 at 4:49 PM, GarethHughes gareth.hug...@hp.com wrote: Can anyone point me in the right direction to solve this performance problem. We need to move large files around our system and ultimately upload them to a remote FTP server. I am using the Claim Check EIP to move the files around the system so immediately prior to performing the FTP upload to the remote server I extract the file from an Oracle database to the local file system using the largeFileService bean as shown below: So as you can see I pass a stream to the next stage of processing which is to upload to the remote FTP server thus I also have streamCache enabled on my Camel context. Problem is, the FTP transfer takes an inordinately long time. A manual transfer of the same 33Mb file to the same FTP server takes 2.88 seconds. Whereas the Camel route(s) above managed to transfer just 4Mb in 15 minutes before I kill it off. Am I missing something blindingly obvious here? It feels like a buffering issue. Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Performance-problem-uploading-to-remote-FTP-using-Stream-tp5729125.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Premature servlet response
On Wed, Mar 13, 2013 at 1:42 PM, Christian Schäfer syrious3...@yahoo.de wrote: Hi, I removed the on completion as suggested but the problem persists. Maybe a similar problem related to the aggregate and their completionHandlers? If you use the aggregate eip then thats a stateful pattern, that when it sends out an aggregated exchange, then that happens independently from the caller threads. So you cannot send back a message to a caller. If you want to aggregate or something and send back a response to caller. Then consider using content enricher eip. Or use a java bean or whatever to do your own aggregation. regards Christian Von: Willem jiang willem.ji...@gmail.com An: users@camel.apache.org; Christian Schäfer syrious3...@yahoo.de Gesendet: 3:27 Dienstag, 12.März 2013 Betreff: Re: Premature servlet response Hi, Have you went through the onCompletion[1] page? If you want to processor2 take effect, you need to remove the onCompletion from your route. [1]http://camel.apache.org/oncompletion.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 Monday, March 11, 2013 at 9:44 PM, Christian Schäfer wrote: Hello, currently I have the problem of not beeing able to set servlet response which was generated by the last processor of my route: servlet-consumer - processor1 - onCompletion - aggregate - processor2 (response builder) When I fire my test to the deployed servlet endpoint (camel 2.10.4 @ JBoss 7.1) it behaves in the order that: 1. body of processor1 is returned as http response 2. after that, processor2 starts which is too late as the response is still sent. How to force the route to send the response only when processor2 is done? regards Christian -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Consume the same file
On Wed, Mar 13, 2013 at 3:54 PM, Alberto Brosich abros...@ogs.trieste.it wrote: Hi, I have to consume with the FTP component always the same file but only when its size changes. I read this in the documentation: Camel 2.11: To use a custom idempotent key. By default the absolute path of the file is used. You can use the File Language, for example to use the file name and file size, you can do: idempotentKey=${file:name}-${file:size} Does it mean that I have to wait camel 2.11 to solve my problem? No, you can implement your own idempotent repository where you can do your own logic for determining if a message is a duplicate or not. But yeah this is much easier out of the box in Camel 2.11 with that new idempotentKey option. Regards Alberto -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Premature servlet response
Thanks Claus for the suggestions. Fortunately, in my use case (dynamic route building) it was possible to remove the aggegration step for the case of reponse generation Thus, it works now as expected. Von: Claus Ibsen claus.ib...@gmail.com An: users@camel.apache.org Gesendet: 17:30 Mittwoch, 13.März 2013 Betreff: Re: Premature servlet response On Wed, Mar 13, 2013 at 1:42 PM, Christian Schäfer syrious3...@yahoo.de wrote: Hi, I removed the on completion as suggested but the problem persists. Maybe a similar problem related to the aggregate and their completionHandlers? If you use the aggregate eip then thats a stateful pattern, that when it sends out an aggregated exchange, then that happens independently from the caller threads. So you cannot send back a message to a caller. If you want to aggregate or something and send back a response to caller. Then consider using content enricher eip. Or use a java bean or whatever to do your own aggregation. regards Christian Von: Willem jiang willem.ji...@gmail.com An: users@camel.apache.org; Christian Schäfer syrious3...@yahoo.de Gesendet: 3:27 Dienstag, 12.März 2013 Betreff: Re: Premature servlet response Hi, Have you went through the onCompletion[1] page? If you want to processor2 take effect, you need to remove the onCompletion from your route. [1]http://camel.apache.org/oncompletion.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 Monday, March 11, 2013 at 9:44 PM, Christian Schäfer wrote: Hello, currently I have the problem of not beeing able to set servlet response which was generated by the last processor of my route: servlet-consumer - processor1 - onCompletion - aggregate - processor2 (response builder) When I fire my test to the deployed servlet endpoint (camel 2.10.4 @ JBoss 7.1) it behaves in the order that: 1. body of processor1 is returned as http response 2. after that, processor2 starts which is too late as the response is still sent. How to force the route to send the response only when processor2 is done? regards Christian -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Database Cache in Camel
Hi, Can someone advise what the recommended way of maintaining the database Cache in Camel ? We would like to access cache bean from a bean rather that writing any query. Can someone shed some insights? Thanks Ganesh ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official confirmation of any transaction. Any opinions presented are solely those of the author and do not necessarily represent those of Barclays. This message is subject to terms available at: www.barclays.com/emaildisclaimer and, if received from Barclays' Sales or Trading desk, the terms available at: www.barclays.com/salesandtradingdisclaimer/. By messaging with Barclays you consent to the foregoing. Barclays Bank PLC is a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays group. ___
Using camel:routeContextRef under camel:camelContext
All, In my current application I use Spring appContext which has a camel:camelContext. Under it I have defined a camel:routeContextRef (which corresponds to the routeContext in my routes.xml) As per How do I import routes from other XML files in http://camel.apache.org/configuring-camel.html I am able to add multiple routes.xml with unique routeContextRef IDs. What I noticed is that routeContextRef has to be unique for each (new) routes.xml, otherwise the bean defenitions are Overriding/replaced (so I have to make routeContextRef unique for each routes.xml) However in my architecture - I am providing the messageBus as a service to my clients, i.e. appContext is fixed. Clients can load multiple routes.xml into my messageBus. So what I am looking for is a generic/global camel:routeContextRef which clients can use as routeContext in their routes.xml i.e. I dont want my beans to be overridden. How can i achive this in Camel? regards, D -- View this message in context: http://camel.465427.n5.nabble.com/Using-camel-routeContextRef-under-camel-camelContext-tp5729133.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Publish/Subscribe with Camel
Guys, when I see the discussion about pub/sub and Camel… I'm going to write a simple chat, it's more like shoutbox, I need several instances of such communication channel and also it needs to be possible easily create new channels. Primary client will be a webpage (html5), but there is high possibility that there will be more clients - for example Android application - so, I want to utilize REST interface in Camel, as we have also other services integrated through REST. As a storage, I guess Redis is my weapon of choice currently. I missed a train a little bit in this area - I mean, pub/sub, html5, all these fancy JS things (CoffeeScript, NodeJS, AngularJS), interactive communication... Do you have any suggestions or hints that you would not mind to share with me? Or maybe what tools you would use for such feature request? Just a quick hint is good enough for me :) On Wed, Mar 13, 2013 at 3:12 PM, Bilgin Ibryam bibr...@gmail.com wrote: Thanks Claus. I wasn't aware of pub/sub capabilities of these components. Bilgin On 13 March 2013 12:36, Claus Ibsen claus.ib...@gmail.com wrote: On Wed, Mar 13, 2013 at 11:36 AM, Bilgin Ibryam bibr...@gmail.com wrote: I am thinking to write a small article about different ways to do pub/sub with Camel. For the moment I can think of the following components that can do that: seda vm jms/activemq redis sns/sqs Are there any other I am missing? Maybe some of these also: guava eventbus hazelcast sjms mqtt amqp websocket (maybe ??) And not sure about the osgi event admin is for end user pub/sub scenarios, though I guess there is possible something in OSGi land. And I guess javaspace is kinda dead? Thanks Bilgin -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen -- S pozdravem / Best regards Martin Stiborský Jabber: st...@njs.netlab.cz Twitter: http://www.twitter.com/stibi
Re: Performance problem uploading to remote FTP using Stream
The only options that I could see on the ftpClient http://commons.apache.org/proper/commons-net//apidocs/org/apache/commons/net/ftp/FTPClient.html http://commons.apache.org/proper/commons-net//apidocs/org/apache/commons/net/ftp/FTPClient.html to adjust the buffer size are 'setBufferSize' and 'setSendDataSocketBufferSize'. I tried various combinations/values but nothing had any noticeable impact. I Assume I am setting these appropriately in the URI?: .to(ftp:+host.getUsername()+@+host.getAddress()+/camel_hosts/+host.getDirectory()+/+host.getHostName()+/in + ?password= + host.getPassword() + tempFileName=../temp/${file:onlyname} + binary=true + ftpClient.dataTimeout=3000 + ftpClient.bufferSize=8192 + ftpClient.sendDataSocketBufferSize=8192 + stepwise=false) TRACE level logging was inconclusive (as least from my layman's point of view): 13/Mar/2013 17:31:47,795 [onsumer[outbound_files_DEVH11]] RemoteFileProducer TRACE Writing using tempNameFile: camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr 13/Mar/2013 17:31:47,795 [onsumer[outbound_files_DEVH11]] FtpOperations TRACE existsFile(camel_hosts/.//DEVH11/in/D0265_001_POC2_B_POC2_B_OPER_L.usr) 13/Mar/2013 17:31:47,983 [onsumer[outbound_files_DEVH11]] FtpOperations TRACE existsFile(camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr) 13/Mar/2013 17:31:48,201 [onsumer[outbound_files_DEVH11]] FtpOperations TRACE buildDirectory(camel_hosts\.\DEVH11\in\..\temp) 13/Mar/2013 17:31:48,201 [onsumer[outbound_files_DEVH11]] FtpOperations TRACE changeCurrentDirectory(/devh11) 13/Mar/2013 17:31:48,201 [onsumer[outbound_files_DEVH11]] FtpOperations TRACE Changing directory: /devh11 13/Mar/2013 17:31:48,201 [onsumer[outbound_files_DEVH11]] RemoteFileProducer TRACE About to write [camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr] to [Endpoint[ftp://devh11@devgw02/camel_hosts/.//DEVH11/in?binary=trueftpClient.bufferSize=8192ftpClient.dataTimeout=3000ftpClient.sendDataSocketBufferSize=8192password=**stepwise=falsetempFileName=..%2Ftemp%2F%24%7Bfile%3Aonlyname%7D]] from exchange [Exchange[JmsMessage[JmsMessageID: ID:ukmdselk024-3936-1363195885202-1:2:1:2:1]]] 13/Mar/2013 17:31:48,217 [onsumer[outbound_files_DEVH11]] FtpOperations TRACE storeFile(camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr) 13/Mar/2013 17:31:48,217 [onsumer[outbound_files_DEVH11]] FtpOperations TRACE doStoreFile(camel_hosts/.//DEVH11/in/../temp/D0265_001_POC2_B_POC2_B_OPER_L.usr) -- View this message in context: http://camel.465427.n5.nabble.com/Performance-problem-uploading-to-remote-FTP-using-Stream-tp5729125p5729135.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Register beans
Ok, thanks for the clarifcation and the hint about the composite registry. Lars Skickat från min iPhone 12 mar 2013 kl. 13:12 skrev Claus Ibsen claus.ib...@gmail.com: On Tue, Mar 12, 2013 at 10:26 AM, helander leh...@gmail.com wrote: Fom Java code I would like to register beans in the context registry. I need to do this in code that will deployed in various containers (Spring, JEE web applications). Is there some method that works in all these environments (hiding from my code the current registry implementation) or do I have to explicitly test the registry class in order to invoke class specific registration methods ? Thanks Lars No as the actual registry can be anything, and some is read-only. So you would need to cater for that, and eg if its a spring registry (spring app context) then its read-only. But if you use Jndi registry, then you can often use the bind operation to add new beans to it etc. If you are allowed to do so (as it may be secured). Though if you need a local registry that only Camel needs to be able to use, you can wrap the current registry using the composite registry and add a simple registry as well. And then you can use the SimpleRegistry to add/remove your beans from your Java code. -- View this message in context: http://camel.465427.n5.nabble.com/Register-beans-tp5728978.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
CXF proxy route creates multiple (two) user-agent HTTP headers
A CXF-based proxy route creates multiple (two) user-agent HTTP headers, which causes error responses from the recipient server. In a proxy scenario, Camel is sending two user-agent HTTP headers from the outbound endpoint. The first is from the incoming client (SoapUI in this case). Interestingly enough, the in-bound endpoint has lower-cased the header name (HTTP header names are supposed to be case-insensitive; see RFC2616 section 4.2 Message Headers [1]). user-agent: Apache-HttpClient/4.1.1 (java 1.5) User-Agent: Apache CXF 2.6.3 In this (and most? all?) scenarios, Camel/CXF should preserve the original user-agent if it exists and not add a new one. I suspect the root cause may be the handling of HTTP headers in a case-sensitive manner. While multiple headers with the same name is allowed by RFC2616 4.2 [1] under _certain conditions_, many HTTP server implementations allow it for only certain headers, e.g., Set-Cookie. Otherwise, they return an error response. In this particular case, Microsoft-IIS/7.5 Microsoft-HTTPAPI/2.0 returns a 400 response code and includes the following text in the response: HTTP Error 400. The request has an invalid header name. A workaround is to remove incoming headers in the route by adding: removeHeader headerName=User-Agent / removeHeader headerName=user-agent / or removeHeaders pattern=CamelHttp* / Although this has the minor undesirable effect of losing the original user-agent information. [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 -- View this message in context: http://camel.465427.n5.nabble.com/CXF-proxy-route-creates-multiple-two-user-agent-HTTP-headers-tp5729137.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: example using HazelcastIdempotentRepository in Spring DSL
I have a few more questions regarding Hazelcast as an idempotent repository. FWIW, I haven't used Hazelcast before. I have a requirement to prevent duplicate messages from being published to a JMS endpoint. The messages are aggregated and a composite primary value is formed. The message volume is large: 10 - 100 million day. The primary value uses the current date as part of the value; therefore the idempotent repository only needs to contain a day's worth of primary values. Is it possible to configure the open source version of Hazelcast to spill values to disk after a pre-determined size or is this only available in the Enterprise edition? I have 4 gig allocated to my web container but it runs out of memory after 8 hours or so... -- View this message in context: http://camel.465427.n5.nabble.com/example-using-HazelcastIdempotentRepository-in-Spring-DSL-tp5728318p5729138.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Routing REST request to external URI
Thanks for the feedback. I've run into another issue. I'm trying to route an incoming URI to a different URI but HttpProducer method appends the original URI to the new route in HttpProducer.createURL. The following is the use case: 1. Client requests http://server1:8080/public/users 2. Proxy receives and routes request to http://server2:8080/private/users My camel proxy produces the following in step 2: http://server2:8080/private/users/public/users My setup is as follows: 1. Setup Dynamic Router this.from(servlet:///?matchOnUriPrefix=true).dynamicRouter(method(CamelRoute.class, slip)); 2. Slip method return new http route with bridgeEndpoint=true. Is there anyway to prevent original path from being appended? Or maybe i'm missing a configuration. Thanks in advance. /Ramon -- View this message in context: http://camel.465427.n5.nabble.com/Routing-REST-request-to-external-URI-tp5728852p5729139.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel 2.10.2 timer component does not fire at startup
I am having indeed the same issue. How to make this fire as soon as the route starts and every 1800 seconds afterwards? From the documentation I was assuming this was the syntax to use: from uri=timer://scheduler?fixedRate=trueamp;period=1800samp;delay=0 / It does not work though -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-10-2-timer-component-does-not-fire-at-startup-tp5723232p5729141.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Routing REST request to external URI
Ok. Found my answer. Added removeHeader to route. this.from(servlet:///?matchOnUriPrefix=true).removeHeader(Exchange.HTTP_PATH).dynamicRouter(method(CamelRoute.class, slip)); -- View this message in context: http://camel.465427.n5.nabble.com/Routing-REST-request-to-external-URI-tp5728852p5729142.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Flatpack Unmarshall Spring DSL Example
Chris, Thanks for your inputs, It works now. I created a customised tpeconverter to convert the datasetlist to POJO model mapped to Hibernate. bean id=fdf class=org.apache.camel.component.flatpack.FlatpackDataFormat property name=definition value=name.pzmap.xml/ property name=fixed value=true/ property name=ignoreExtraColumns value=true/ property name=allowShortLines value=true/ /bean camel:unmarshal ref=fdf/ convertBodyTo type=com.barcap.iox.brokerfeed.model.Model/ -Original Message- From: Kanagavel, Ganesh Kumar: CRES (NYK) Sent: Tuesday, March 12, 2013 6:02 PM To: users@camel.apache.org Subject: RE: Flatpack Unmarshall Spring DSL Example Thanks, I will check that out. I have a Flat File which I want to create List of records out of it. I want to transform and pass to hibernate endpoint. I actually was using BINDY Fixed format, but that is giving problem when the records are short record. I am seeing some action to allow short records in Flatpack, so want to try it and see if it works. -Original Message- From: Chris Geer [mailto:ch...@cxtsoftware.com] Sent: Tuesday, March 12, 2013 5:58 PM To: users@camel.apache.org Subject: Re: Flatpack Unmarshall Spring DSL Example On Tue, Mar 12, 2013 at 1:45 PM, ganeshkumar.kanaga...@barclays.com wrote: Chris, Thanks, Flatpack config files are created. But I want to use the Spring DSL for Unmarshall the flatpack components. I am not able to create the beans correctly. Can you please share the link where I can check the examples? Here is a link directly to the source at GitHub for easy viewing [1]. In the data folder you will find the sample data files. In the resource folder you will find the spring files and flatpack config files. In the src folder you'll find the test classes. What are you trying to unmarshall into? Chris [1] https://github.com/apache/camel/tree/trunk/components/camel-flatpack/src/test Thanks Ganesh -Original Message- From: Chris Geer [mailto:ch...@cxtsoftware.com] Sent: Tuesday, March 12, 2013 4:26 PM To: users@camel.apache.org Subject: Re: Flatpack Unmarshall Spring DSL Example On Tue, Mar 12, 2013 at 12:31 PM, ganeshkumar.kanaga...@barclays.com wrote: Hi, Anyone has got examples for unmarshalling Flatpack structure in Spring DSL? I am not able to see anything in net. If you look at the camel tests there are lots of examples of using spring to define a route that uses Flatpack. The Flatpack component does require a separate config file for actually specifying the Flatpack config but the routes are all in spring. Were you looking for a way to put the Flatpack config in spring directly? Chris Thanks Ganesh ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official confirmation of any transaction. Any opinions presented are solely those of the author and do not necessarily represent those of Barclays. This message is subject to terms available at: www.barclays.com/emaildisclaimer and, if received from Barclays' Sales or Trading desk, the terms available at: www.barclays.com/salesandtradingdisclaimer/. By messaging with Barclays you consent to the foregoing. Barclays Bank PLC is a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays group. ___ ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official confirmation of any transaction. Any opinions presented are solely those of the author and do not necessarily represent those of Barclays. This message is subject to terms
Re: Flatpack Unmarshall Spring DSL Example
On Wed, Mar 13, 2013 at 1:59 PM, ganeshkumar.kanaga...@barclays.com wrote: Chris, Thanks for your inputs, It works now. Glad to hear it works! I created a customised tpeconverter to convert the datasetlist to POJO model mapped to Hibernate. bean id=fdf class=org.apache.camel.component.flatpack.FlatpackDataFormat property name=definition value=name.pzmap.xml/ property name=fixed value=true/ property name=ignoreExtraColumns value=true/ property name=allowShortLines value=true/ /bean camel:unmarshal ref=fdf/ convertBodyTo type=com.barcap.iox.brokerfeed.model.Model/ -Original Message- From: Kanagavel, Ganesh Kumar: CRES (NYK) Sent: Tuesday, March 12, 2013 6:02 PM To: users@camel.apache.org Subject: RE: Flatpack Unmarshall Spring DSL Example Thanks, I will check that out. I have a Flat File which I want to create List of records out of it. I want to transform and pass to hibernate endpoint. I actually was using BINDY Fixed format, but that is giving problem when the records are short record. I am seeing some action to allow short records in Flatpack, so want to try it and see if it works. -Original Message- From: Chris Geer [mailto:ch...@cxtsoftware.com] Sent: Tuesday, March 12, 2013 5:58 PM To: users@camel.apache.org Subject: Re: Flatpack Unmarshall Spring DSL Example On Tue, Mar 12, 2013 at 1:45 PM, ganeshkumar.kanaga...@barclays.com wrote: Chris, Thanks, Flatpack config files are created. But I want to use the Spring DSL for Unmarshall the flatpack components. I am not able to create the beans correctly. Can you please share the link where I can check the examples? Here is a link directly to the source at GitHub for easy viewing [1]. In the data folder you will find the sample data files. In the resource folder you will find the spring files and flatpack config files. In the src folder you'll find the test classes. What are you trying to unmarshall into? Chris [1] https://github.com/apache/camel/tree/trunk/components/camel-flatpack/src/test Thanks Ganesh -Original Message- From: Chris Geer [mailto:ch...@cxtsoftware.com] Sent: Tuesday, March 12, 2013 4:26 PM To: users@camel.apache.org Subject: Re: Flatpack Unmarshall Spring DSL Example On Tue, Mar 12, 2013 at 12:31 PM, ganeshkumar.kanaga...@barclays.com wrote: Hi, Anyone has got examples for unmarshalling Flatpack structure in Spring DSL? I am not able to see anything in net. If you look at the camel tests there are lots of examples of using spring to define a route that uses Flatpack. The Flatpack component does require a separate config file for actually specifying the Flatpack config but the routes are all in spring. Were you looking for a way to put the Flatpack config in spring directly? Chris Thanks Ganesh ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official confirmation of any transaction. Any opinions presented are solely those of the author and do not necessarily represent those of Barclays. This message is subject to terms available at: www.barclays.com/emaildisclaimer and, if received from Barclays' Sales or Trading desk, the terms available at: www.barclays.com/salesandtradingdisclaimer/. By messaging with Barclays you consent to the foregoing. Barclays Bank PLC is a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays group. ___ ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official
Post Request forwarded from Camel does not contain HTTP Body
Hi, I have the following. 1) Using Camel-Servlet with dynamic routing enabled as follows: this.from(servlet:///?matchOnUriPrefix=true) .removeHeader(Exchange.HTTP_PATH) .dynamicRouter(method(CamelRoute.class, slip)); 2) In My slip method i route the incoming REST request to an external server. Currently having issues as when my Camel proxy routes the REST request to the external server the body is not attached to the request (error occurs during deserialization as value is expected but nothing is available). If i have a POST request with empty body (no parameters) the request successfully executes. Am i missing a configuration? Do i need to manually set the body? /Ramon -- View this message in context: http://camel.465427.n5.nabble.com/Post-Request-forwarded-from-Camel-does-not-contain-HTTP-Body-tp5729145.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Database Cache in Camel
Anyone got ideas around setting up the Ehcache based on hibernate? -Original Message- From: Kanagavel, Ganesh Kumar: CRES (NYK) Sent: Wednesday, March 13, 2013 1:02 PM To: users@camel.apache.org Subject: Database Cache in Camel Hi, Can someone advise what the recommended way of maintaining the database Cache in Camel ? We would like to access cache bean from a bean rather that writing any query. Can someone shed some insights? Thanks Ganesh ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official confirmation of any transaction. Any opinions presented are solely those of the author and do not necessarily represent those of Barclays. This message is subject to terms available at: www.barclays.com/emaildisclaimer and, if received from Barclays' Sales or Trading desk, the terms available at: www.barclays.com/salesandtradingdisclaimer/. By messaging with Barclays you consent to the foregoing. Barclays Bank PLC is a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays group. ___ ___ This message may contain information that is confidential or privileged. If you are not an intended recipient of this message, please delete it and any attachments, and notify the sender that you have received it in error. Unless specifically stated in the message or otherwise indicated, you may not uplicate, redistribute or forward this message or any portion thereof, including any attachments, by any means to any other person, including any retail investor or customer. This message is not a recommendation, advice, offer or solicitation, to buy/sell any product or service, and is not an official confirmation of any transaction. Any opinions presented are solely those of the author and do not necessarily represent those of Barclays. This message is subject to terms available at: www.barclays.com/emaildisclaimer and, if received from Barclays' Sales or Trading desk, the terms available at: www.barclays.com/salesandtradingdisclaimer/. By messaging with Barclays you consent to the foregoing. Barclays Bank PLC is a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays group. ___
Spring Conext Initializer Property Source in OSGi
in the normal app-server case, I register a new PropertySource in the ConfigiurableWebApplicationContext using the following in the web.xml: Then, in my SpringContextInitializer I can register my PropertySource like this: This allows me to use properties within the Spring xml files like this: okay, so now the question: I'm converting some of the services and Spring routes over to OSGi. However, I can't find any reference on how to do something similar when running in the OSGi container. any help would be greatly appreciated! -- View this message in context: http://camel.465427.n5.nabble.com/Spring-Conext-Initializer-Property-Source-in-OSGi-tp5729147.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: doTry docatch slow down the execution
So you append each invalid record to a file (direct:AEDFormatException). For *each* rejected line, this process occurs: the FileInputStream is opened, positioned at the end, the line is written, the FileInputStream is closed. That could explain some of the slowness. Let's gather some performance stats for this endpoint. You have 2 options: - JMX = within the processors subtree you'll find a SendProcessor MBean associated with this file endpoint. Check its attributes. - Performance stats processors before and after the endpoint: 1) before: place a processor that saves System.currentTimeMillis() in an Exchange property, and 2) after: print to a log file the difference between now and the saved property. Please share your findings. Raúl Kripalani Apache Camel Committer | Enterprise Architect, Program Manager, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani | http://blog.raulkr.net | twitter: @raulvk
Re: Post Request forwarded from Camel does not contain HTTP Body
I tried forwarding to both http-component and jetty component. For both requests the body is empty (even with the following set in url ?bridgeEndpoint=truethrowExceptionOnFailure=falsedisableStreamCache=trueenableMultipartFilter=false). The error i get on my server side (Jersey) is the following: com.sun.jersey.api.container.MappableContainerException: java.io.EOFException: No content to map to Object due to end of input. /Ramon -- View this message in context: http://camel.465427.n5.nabble.com/Post-Request-forwarded-from-Camel-does-not-contain-HTTP-Body-tp5729145p5729149.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: from server to oracle
im new in apache camel , i read camel in action but i have yet many questions , i'm pressed because i have to achieve my project in which there are many routes and endpoints .i search for help , to receive messages from an external web service what endpoint should i use to connect it. -- View this message in context: http://camel.465427.n5.nabble.com/from-server-to-oracle-tp5729049p5729150.html Sent from the Camel - Users mailing list archive at Nabble.com.
AW: from server to oracle
Camel in Action chapter 7.4 gives an example with Apache CXF. from(cxf:bean:incomingOrders).to(seda:incomingOrders).transform(constant (OK)) (SpringDSL in the book ;) The book contains much more about setting up all things. Also the Loan Broker example from the EIP pattern book is implemented in Camel. And one version with WS. http://camel.apache.org/loan-broker-example.html Jan -Ursprüngliche Nachricht- Von: takidean [mailto:takide...@hotmail.fr] Gesendet: Donnerstag, 14. März 2013 01:48 An: users@camel.apache.org Betreff: Re: from server to oracle im new in apache camel , i read camel in action but i have yet many questions , i'm pressed because i have to achieve my project in which there are many routes and endpoints .i search for help , to receive messages from an external web service what endpoint should i use to connect it. -- View this message in context: http://camel.465427.n5.nabble.com/from- server-to-oracle-tp5729049p5729150.html Sent from the Camel - Users mailing list archive at Nabble.com.