Connecting two routes using direct

2013-10-18 Thread bonnahu
Hi all, I have two routes here which are connected by using direct. Currently, when reading one file from file:src/test/resources/orders, it will go to processRoute. However, what I want to do is to read all the files in the file:src/test/resources/orders first, then go to the route processRoute. I

A question about Content Based Filter

2013-11-07 Thread bonnahu
Hi guys, Currently, I have an incoming message which is type of ClassA. The ClassA has two fields, one field is a byte array, which can be convert to a xml object. I need to do the filtering based on the the value of a tag in the xml. My original thought is to covert the byte array to Document, the

Re: A question about Content Based Filter

2013-11-07 Thread bonnahu
Hi Christian, Thanks for your response. I was planning to use xpath expression, but the body is not xml based content. How to do it? thanks! -- View this message in context: http://camel.465427.n5.nabble.com/A-question-about-Content-Based-Filter-tp5742789p5742799.html Sent from the Camel - User

Re: A question about Content Based Filter

2013-11-07 Thread bonnahu
Are u talking about creating an xpath object using XPathFactory? Will it be more efficient than DOM? -- View this message in context: http://camel.465427.n5.nabble.com/A-question-about-Content-Based-Filter-tp5742789p5742800.html Sent from the Camel - Users mailing list archive at Nabble.com.

Route with autoStartup="false" will start automatically when an exception happens on consumer side

2013-11-25 Thread bonnahu
Hi all, I have a route which has been set to autoStartup="false". It is working correctly as I expected. However, when there is an exception thrown on the consumer tibcoEMS side, the route would start automatically. Is there a way to prevent it? Here is the route definition: H

Load testing for Camel appliation

2014-01-20 Thread bonnahu
Hi all, currently I am working on a Camel application which has a event-driven consumer listening on a message channel. After message arrives, the processor will parse XML content to retrieve the properties we want. I want to do some load testing for the app, can someone give me some suggestion of

Does simple expression support operator precedence by using parenthesis or bracket?

2014-03-27 Thread bonnahu
hey guys, does anyone know if the simple expression support operator precedence by using parenthesis? Basically, I want to do something like this: (${in.headers.h_event} == 'A' and ${in.headers.h_state} == 'AA') or

Set concurrentConsumers of SEDA

2014-10-08 Thread bonnahu
Hi everyone, I have a question about the value of concurrentConsumers for SEDA. According to the document, if limitConcurrentConsumers is set to true, then the number of concurrentConsumers would be set the maximum of 500. My question is that is it always good to set the concurrentConsumers to a b

Re: Set concurrentConsumers of SEDA

2014-10-13 Thread bonnahu
Hi Willem, Do u know what is the best value for the concurrentConsumers? thanks Lei -- View this message in context: http://camel.465427.n5.nabble.com/Set-concurrentConsumers-of-SEDA-tp5757417p5757517.html Sent from the Camel - Users mailing list archive at Nabble.com.

How to use PropertyPlaceholderConfigurer to configure the autoStartup option

2013-07-13 Thread bonnahu
Hey guys, I am new to Camel. Currently, I want to use PropertyPlaceholderConfigurer to specify the autoStartup option in Camel route. Here is the PropertyPlaceholderConfigurer bean:

Re: How to use PropertyPlaceholderConfigurer to configure the autoStartup option

2013-07-16 Thread bonnahu
Hi Claus, It works for me! Thanks a lot! -- View this message in context: http://camel.465427.n5.nabble.com/How-to-use-PropertyPlaceholderConfigurer-to-configure-the-autoStartup-option-tp5735604p5735753.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to use PropertyPlaceholderConfigurer to configure the autoStartup option

2013-07-16 Thread bonnahu
Hi Willem, I am using 2.10.1. Thanks -- View this message in context: http://camel.465427.n5.nabble.com/How-to-use-PropertyPlaceholderConfigurer-to-configure-the-autoStartup-option-tp5735604p5735754.html Sent from the Camel - Users mailing list archive at Nabble.com.

Why cannot do a graceful shutdown?

2013-07-21 Thread bonnahu
Hey guys, I need to shutdown the camelcontext in a Processor. Here is what I am doing: http://camel.apache.org/schema/spring";> /order[@test] Here is the DownloadLogger Processor: public class DownloadLogger implements Processor {

Re: Why cannot do a graceful shutdown?

2013-07-21 Thread bonnahu
Hey Bilgin, Thanks for your reply. It works for me! -- View this message in context: http://camel.465427.n5.nabble.com/Why-cannot-do-a-graceful-shutdown-tp5735962p5735987.html Sent from the Camel - Users mailing list archive at Nabble.com.

After camelContext shutdown, is any way to exit the Java main() method?

2013-07-21 Thread bonnahu
Hi guys, I got another question here. I start my camelContext in the main(), then in the route, I stop the camelContext in a Processor. Now I can see the camelContext is shutdown gracefully. However, the Java application is still running. My question is that whether there is a way to exit the Java

Re: After camelContext shutdown, is any way to exit the Java main() method?

2013-07-22 Thread bonnahu
Hi Willem, After adding System.exit(1) after exchange.getContext().stop(); , it works for me. Thanks again! -- View this message in context: http://camel.465427.n5.nabble.com/After-camelContext-shutdown-is-any-way-to-exit-the-Java-main-method-tp5735993p5736042.html Sent from the Camel - Users m

Re: Camel Thread does not terminate

2013-07-22 Thread bonnahu
Maybe you can try by adding System.exit() after cc.stop(); -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Thread-does-not-terminate-tp5736045p5736051.html Sent from the Camel - Users mailing list archive at Nabble.com.

Is it possible to import Endpoints from a xml file like routeContextRef?

2013-07-22 Thread bonnahu
Hey guys, We can import routes from other XML files by using routeContextRef. Does anyone know whether we could do the same for EndPoints? thanks -- View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-to-import-Endpoints-from-a-xml-file-like-routeContextRef-tp57360

Re: Is it possible to import Endpoints from a xml file like routeContextRef?

2013-07-23 Thread bonnahu
Hey Claus, Thanks for your response again. Yeah, that's I am looking for, since I have a bunch of , which will be included in several projects. I am thinking to do it in this way, 1. Put the id and uri of endpoint in a properties file 2. In a init route, read the properties file then dynamically

Question about ZooKeeper APIs

2013-08-07 Thread bonnahu
Hi all, I can see ZooKeeper APIs are available in Camel. Is there any good examples for the ZooKeeper APIs? thanks Lei -- View this message in context: http://camel.465427.n5.nabble.com/Question-about-ZooKeeper-APIs-tp5736960.html Sent from the Camel - Users mailing list archive at Nabble.com

Re: Question about ZooKeeper APIs

2013-08-14 Thread bonnahu
Thank you. -- View this message in context: http://camel.465427.n5.nabble.com/Question-about-ZooKeeper-APIs-tp5736960p5737287.html Sent from the Camel - Users mailing list archive at Nabble.com.

How to programatically add a route to ClassPathXmlApplicationContext?

2013-08-14 Thread bonnahu
Hi everyone, I want to add a new route to an ClassPathXmlApplicationContext programatically. Like the code below, after the springContext is created, can we add a new route to the springContext? Is there a solution? String filename = "META-INF/spring/camel-context.xml"; AbstractXmlApplicationC

Re: AW: How to programatically add a route to ClassPathXmlApplicationContext?

2013-08-19 Thread bonnahu
thanks! -- View this message in context: http://camel.465427.n5.nabble.com/How-to-programatically-add-a-route-to-ClassPathXmlApplicationContext-tp5737288p5737539.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: AW: How to programatically add a route to ClassPathXmlApplicationContext?

2013-08-19 Thread bonnahu
thank you -- View this message in context: http://camel.465427.n5.nabble.com/How-to-programatically-add-a-route-to-ClassPathXmlApplicationContext-tp5737288p5737540.html Sent from the Camel - Users mailing list archive at Nabble.com.

Apply change to a route after loading camelcontext xml using GenericApplicationContext

2013-08-19 Thread bonnahu
Hi guys, I have a piece of code below. What I want to do is to load a camelcontext from a xml file by using GenericApplicationContext and XmlBeanDefinitionReader. Then I want to make some change on one route, for example, setting the autoStartup property to false. At last, start camelcontext using

Re: Apply change to a route after loading camelcontext xml using GenericApplicationContext

2013-08-19 Thread bonnahu
Hi Christian, Thanks for your response. However, I don't understand that why I need to stop the route first, since I haven't started the route yet until main.run(); Please explain it a little bit more. thanks -- View this message in context: http://camel.465427.n5.nabble.com/Apply-change-to

Re: Apply change to a route after loading camelcontext xml using GenericApplicationContext

2013-08-20 Thread bonnahu
Hi Claus, thanks for your reply! So do think whether there is way to set the autoStartup property to a route before the spring code starts the Camel, if I don't want to change the existing camelcontext.xml. Thanks again! -- View this message in context: http://camel.465427.n5.nabble.com/Appl

Re: Apply change to a route after loading camelcontext xml using GenericApplicationContext

2013-08-20 Thread bonnahu
Hi Claus, If I understand correctly, you are saying adding a property placeholders for the auto startup option, http://camel.apache.org/schema/spring"/> In autostartup.properties, define autostartupOption = true/false Then in the route, add the autoStartup property like followings? -

Re: Apply change to a route after loading camelcontext xml using GenericApplicationContext

2013-08-20 Thread bonnahu
thanks -- View this message in context: http://camel.465427.n5.nabble.com/Apply-change-to-a-route-after-loading-camelcontext-xml-using-GenericApplicationContext-tp5737541p5737628.html Sent from the Camel - Users mailing list archive at Nabble.com.

QuickFIX/J in Camel - After receiving a 35=R message, the message does not go to a Processor (SendProcessor.java)

2013-08-26 Thread bonnahu
Hi all, I am using QuickFIX/J in Camel. The current issue I am having now is that after receiving a 35=R message, the message does not go to a Processor (SendProcessor.java), so the 35=R message could not be processed. Does anyone know about the reason? thanks! -- View this message in context:

Sharing a queue between two camel context

2013-09-03 Thread bonnahu
Hey guys, I want to have a queue which is shared by two camel context. Should I use VM component? Is there any good sample code? thanks! -- View this message in context: http://camel.465427.n5.nabble.com/Sharing-a-queue-between-two-camel-context-tp5738613.html Sent from the Camel - Users mail

Re: Sharing a queue between two camel context

2013-09-03 Thread bonnahu
Hi Christian, Thanks for your response. I will take your advice to try a real queue. -- View this message in context: http://camel.465427.n5.nabble.com/Sharing-a-queue-between-two-camel-context-tp5738613p5738617.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Sharing a queue between two camel context

2013-09-04 Thread bonnahu
Hi Chris, I got another question here for you. I want to perform a deQueue operation, is it possible? thanks -- View this message in context: http://camel.465427.n5.nabble.com/Sharing-a-queue-between-two-camel-context-tp5738613p5738678.html Sent from the Camel - Users mailing list archive at

Got an error "PropertiesComponent with name properties must be defined in CamelContext to support property placeholders"

2013-09-09 Thread bonnahu
Running on Camel 2.11.1. I am trying to use a defined VM argument (e.g., -Dprop.env=DEV) in camel context. However, I got the error saying "PropertiesComponent with name properties must be defined in CamelContext to support property placeholders". So I need to add a propertyPlaceholder to make it

Re: Got an error "PropertiesComponent with name properties must be defined in CamelContext to support property placeholders"

2013-09-10 Thread bonnahu
Hi Christian, I didn't define the propertyPlaceholder component in any other place. I added the propertyPlaceholder just to avoid the error. If you want, I can send the project to you to take a look. -- View this message in context: http://camel.465427.n5.nabble.com/Got-an-error-PropertiesComp

Re: Got an error "PropertiesComponent with name properties must be defined in CamelContext to support property placeholders"

2013-09-10 Thread bonnahu
Hi Christian, I understand what you said "Camel's propertyPlaceholder must be available to use within the camel context." But here I was not planning to use a propertyPlaceholder, what I wanted to do is to use the defined VM argument ,prop.env in camel context, like following . So I don't think

Re: Got an error "PropertiesComponent with name properties must be defined in CamelContext to support property placeholders"

2013-09-10 Thread bonnahu
Thanks Claus. So you are saying is that I still need to create a fake properties file, even I don't use it. Do I understand it correctly? -- View this message in context: http://camel.465427.n5.nabble.com/Got-an-error-PropertiesComponent-with-name-properties-must-be-defined-in-CamelContext-to-s

Is it possible to include XPath expression in simple expression?

2013-09-19 Thread bonnahu
Hi guys, I am wondering whether there is a way to do something like below: ${date:now:MMdd-HHmm}-incomingOrder-${@XPath("/order/@customerId")}-.xml -- View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-to-include-XPath-expression-in-simple-expression-tp5739830.

Re: Is it possible to include XPath expression in simple expression?

2013-09-19 Thread bonnahu
yeah, that is what I am doing now. -- View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-to-include-XPath-expression-in-simple-expression-tp5739830p5739838.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is it possible to include XPath expression in simple expression?

2013-09-20 Thread bonnahu
Hi Christian, I think it would be useful if we have such "composite" expression. What do you think? -- View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-to-include-XPath-expression-in-simple-expression-tp5739830p5739882.html Sent from the Camel - Users mailing li