Re: Load Balancer EIP

2012-04-24 Thread Edwin
After looking at the StickyLoadBalancer, it seems that it creates a RoundRobinLoadBalancer under the hood. When all processors are in use, I was under the notion that the StickyLoadBalancer would select a processor based on a least recently used policy. -- View this message in context: http://

Re: using filter inside when?

2012-04-24 Thread Xuan Huang
Thanks very much Claus, adding endChoice() at the end of the filter works perfectly. On 20 Apr 2012, at 08:14, Claus Ibsen wrote: > Hi > > Have you seen this FAQ. > http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html > > Also if you put the predicate inside

Camel-Stream URI error

2012-04-24 Thread Gnanaguru S
Hi, I created a route using camel stream. It worked fine. When I added the option ' scanStream ' . I was caught up witht this error. [ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.9.2:run (default-cli) on project camel-ex ample-osgi: null: MojoExecutionException: Invocation

Camel Web Console and Websphere

2012-04-24 Thread AndyBell
Hi I'm using Camel 2.9.1 and have successfully deployed my application to WebSphere 7.0.0.11, where it works fine. However, when I try to run the in-built Camel Web Console, it causes an exception to be thrown. This is the stack trace: Error Page Exception SRVE0260E: The server cannot use the er

[SOLVED]Re: Camel-Stream URI error

2012-04-24 Thread Gnanaguru S
Hi, I replaced & with ?. Working between different dsl's of camel. Got into confusion. This is the modified working code. Regards Guru -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Stream-URI-error-tp5661443p5661468.html Sent from the Camel - Users mailing list ar

Re: Camel:Flatpack component

2012-04-24 Thread Gnanaguru S
Hi Charles, I was successful in using the stream component. I created a route like shown below. It works. I want to combine bindy component, Since now I am getting empty files on other endpoint. Please share your knowledge on this. I am using xml way of coding. How can I combine these two comp

Re: [SOLVED]Re: Camel-Stream URI error

2012-04-24 Thread Claus Ibsen
Hi In XML you cannot use & in the attributes, you must use an XML escaped value as & So it should be On Tue, Apr 24, 2012 at 11:36 AM, Gnanaguru S wrote: > > Hi, > > I replaced & with ?. Working between different dsl's of camel. Got into > confusion. > > This is the modified working code. >

Re: [SOLVED]Re: Camel-Stream URI error

2012-04-24 Thread Gnanaguru S
Thanks Claus, Its working perfect. Got your point. Regards Guru -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Stream-URI-error-tp5661443p5661591.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: [SOLVED]Re: Camel-Stream URI error

2012-04-24 Thread Gnanaguru S
Hi Claus, I am getting empty files when routing from stream endpoint. I want to read each new line and update to other file. My route: Please share your view. http://camel.apache.org/schema/spring";> Regards Guru -- View this message in context: http://camel.

Scheduled route execution with CronScheduledRoutePolicy don't work as expected

2012-04-24 Thread Borut Bolčina
Hello, while this: public void configure() { from("quartz://myTimer?trigger.repeatInterval=2000&trigger.repeatCount=-1") .to("http://my.company.com/test.txt";) .log("${body}"); } nicely prints out the content of the test.txt to the console every 2 seconds; [2012/04/24 14:35:12.884] INFO [r

After update from 2.5.0 -> 2.9.2 I got: org.xml.sax.SAXParseException: cos-all-limited.1.2

2012-04-24 Thread zzkozak
Hello, I updated the version of camel from 2.5.0 -> 2.9.2 and I get the following error, when I try to start the jetty container: My camel-config.xml is very simple and looks like: Does anyone know what the problem is? Thanks in advance, Marcin -- View this message in context: http://cam

Re: Scala DSL: splitting

2012-04-24 Thread rdifrango
I know this is an old thread, but I found some thing similiar and here is how I accomplished it. Basically, you have to provide a function that returns a split of the input. In my case, I wanted to split on newlines: split(_.getIn().getBody(classOf[String]).split("\n")) { loadbalance rou

Re: After update from 2.5.0 -> 2.9.2 I got: org.xml.sax.SAXParseException: cos-all-limited.1.2

2012-04-24 Thread Claus Ibsen
What JDK version are you using? On Tue, Apr 24, 2012 at 2:54 PM, zzkozak wrote: > Hello, > >  I updated the version of camel from 2.5.0 -> 2.9.2 and I get the following > error, when I try to start the jetty container: > > > > My camel-config.xml is very simple and looks like: > > > > Does anyon

Scala DSL for Aggregate

2012-04-24 Thread rdifrango
I'm using the Scala DSL and I'm attempting to split the input from a file, then aggregate it again once the processing is done. The route building I have is: val context = new DefaultCamelContext context.addRoutes(new RouteBuilder { "file:perf?noop=true" ==> { aggregate(split(_.getIn(

Re: After update from 2.5.0 -> 2.9.2 I got: org.xml.sax.SAXParseException: cos-all-limited.1.2

2012-04-24 Thread zzkozak
I'm using JDK 1.6.0_27 -- View this message in context: http://camel.465427.n5.nabble.com/After-update-from-2-5-0-2-9-2-I-got-org-xml-sax-SAXParseException-cos-all-limited-1-2-tp5661890p5661955.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: After update from 2.5.0 -> 2.9.2 I got: org.xml.sax.SAXParseException: cos-all-limited.1.2

2012-04-24 Thread Claus Ibsen
Well there is issues with JDK 1.7. But you run 1.6 so that should be fine. Have you checked the line that is being reported as error Line 2844 in XML document from class path resource [camel-config.xml] On Tue, Apr 24, 2012 at 3:10 PM, zzkozak wrote: > I'm using JDK 1.6.0_27 > > > -- > View t

JMX MeanProcessingRate

2012-04-24 Thread Narita Bagchi
We have migrated our application to use Camel 2.9.0 from Camel 1.6.4. We were using JMX- MeanProcessingRate, for display puropose along with other attributes. Is there a way I can get this value? Thanks. Narita ***The information transmitted is intended only fo

Re: Gracefull shutdown timeouts due to NotifyBuilder blocks on context

2012-04-24 Thread m . schmidt
Hi Claus, thanks for this super-fast response & fix! I'm providing a junit4 testcase ASAP. cheers, Matthias Matthias Schmidt | Senior Software Engineer | Development & Delivery InterComponentWare AG | Altrottstraße 31 | 69190 Walldorf (Baden) | Germany Tel.: +49 (0) 6227 385 333 81 | Fax: +4

Re: Load Balancer EIP

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 10:37 AM, Edwin wrote: > After looking at the StickyLoadBalancer, it seems that it creates a > RoundRobinLoadBalancer under the hood. > > When all processors are in use, I was under the notion that the > StickyLoadBalancer would select a processor based on a least recently

Deploying route to Karaf fails with "waiting for dependencies"

2012-04-24 Thread Borut Bolčina
Hello, Despite my best efforts I can not get my Camel route to run in Karaf. Log entry where route fails to start: 2012-04-24 15:51:43,721 | INFO | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 321 | 10 - org.apache.aries.blueprint - 0.3.1 | Bundle weat

Re: Deploying route to Karaf fails with "waiting for dependencies"

2012-04-24 Thread Jean-Baptiste Onofré
Hi Borut, I think that some Camel features are missing. Did you install camel-http feature ? karaf@root> features:install camel-http Regards JB On 04/24/2012 04:13 PM, Borut Bolčina wrote: Hello, Despite my best efforts I can not get my Camel route to run in Karaf. Log entry where route fa

Re: Deploying route to Karaf fails with "waiting for dependencies"

2012-04-24 Thread Claus Ibsen
OSGi waits for the http component. You need to use the camel-http feature, and not camel-http4. And/or fix the route to use http4 if thats the one you want. On Tue, Apr 24, 2012 at 4:13 PM, Borut Bolčina wrote: > Hello, > > Despite my best efforts I can not get my Camel route to run in Karaf. >

Re: JMX MeanProcessingRate

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 3:36 PM, Narita Bagchi wrote: > We have migrated our application to use Camel 2.9.0 from Camel 1.6.4. We were > using JMX- MeanProcessingRate, for display puropose along with other > attributes. Is there a way I can get this value? > See the JMX docs http://camel.apache.

Re: After update from 2.5.0 -> 2.9.2 I got: org.xml.sax.SAXParseException: cos-all-limited.1.2

2012-04-24 Thread zzkozak
After cleaning up my pom.xml, where I referenced our global parent pom, the server is starting without any problems. So it seems there is a conflict with other jars. Thank you Claus! -- View this message in context: http://camel.465427.n5.nabble.com/After-update-from-2-5-0-2-9-2-I-got-org-xml-sa

Re: xpath and namespaces

2012-04-24 Thread Claus Ibsen
Hi Thanks Just to be sure how do you refer to this external file? On Mon, Apr 23, 2012 at 6:54 PM, Bob Jolliffe wrote: > On 23 April 2012 17:29, Claus Ibsen wrote: >> Hi >> >> Do you declare the route in an external file, or how do you refer to >> the xml file with that route? >> Maybe you

Re: After update from 2.5.0 -> 2.9.2 I got: org.xml.sax.SAXParseException: cos-all-limited.1.2

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 4:21 PM, zzkozak wrote: > After cleaning up my pom.xml, where I referenced our global parent pom, the > server is starting without any problems. So it seems there is a conflict > with other jars. > Ah yeah when upgrading make sure you dont have different versions of Camel

Re: Re-initializing route builders at runtime under Spring?

2012-04-24 Thread Claus Ibsen
Hi Maybe this little cookbook can be of inspiration http://camel.apache.org/loading-routes-from-xml-files.html On Mon, Apr 23, 2012 at 7:49 PM, Injinius wrote: > All, > I have a Camel/Spring configuration. For example: > BEGIN_CODE_SNIPPET > > [SNIP] >         >                 >              

Re: Scheduled route execution with CronScheduledRoutePolicy don't work as expected

2012-04-24 Thread Claus Ibsen
Hi Its *not* the same. The 1st route is from quartz, which sends out a message every X period. You can configure that route to use cron as well. The 2nd route is from http, which mean you constantly poll a http endpoint by sending a http get, and routing the response, this will repeat itself as

Registering Components in OSGi Using Spring XML File...

2012-04-24 Thread James Carman
I am trying to set up a JMS component which connects to our WebSphere MQ server. I want to be able to use this component in other bundles. I assume I would need to get a ComponentResolver service set up. It looks like camel-core sets itself up to look for other bundles to start up and it automat

Re: Scheduled route execution with CronScheduledRoutePolicy don't work as expected

2012-04-24 Thread Borut Bolčina
Thanks for the clarification Claus! -borut Dne 24. april 2012 16:41 je Claus Ibsen napisal/-a: > Hi > > Its *not* the same. > > The 1st route is from quartz, which sends out a message every X period. > You can configure that route to use cron as well. > > The 2nd route is from http, which mean

Re: Deploying route to Karaf fails with "waiting for dependencies"

2012-04-24 Thread Borut Bolčina
Yes, that is it! Installing camel-http instead of camel-http4 solved this dependency issue. Thanks Claus, you saved my day. -borut Dne 24. april 2012 16:17 je Claus Ibsen napisal/-a: > OSGi waits for the http component. > > You need to use the camel-http feature, and not camel-http4. > And/or

Re: xpath and namespaces

2012-04-24 Thread Bob Jolliffe
On 24 April 2012 15:22, Claus Ibsen wrote: > Hi > > Thanks > > Just to be sure how do you refer to this external file? > I'm loading it with: FileInputStream is = new FileInputStream( file ); try { RoutesDefinition routes = camelContext.loadRoutesDefinition( is ); camelContext.addRout

Re: xpath and namespaces

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 5:11 PM, Bob Jolliffe wrote: > On 24 April 2012 15:22, Claus Ibsen wrote: >> Hi >> >> Thanks >> >> Just to be sure how do you refer to this external file? >> > > I'm loading it with: > > FileInputStream is = new FileInputStream( file ); > > try > { >     RoutesDefinition r

Transform and multiply

2012-04-24 Thread Hynek Cihlar
Hello all, what would be the best approach to solve the "transform and multiply" behavior? That is, a message retrieved from an endpoint is transformed, multiplied and sent down the route pipeline. The closest I was able to come up myself is the following route config. It probably also better exp

Re: Re-initializing route builders at runtime under Spring?

2012-04-24 Thread Injinius
Claus, Thanks for the quick reply. I too came across the link you provided during my previous searches. Unfortunately, I don't think that solution helps me out very much in my case. Presumably, to use the above solution, I'd have to dynamically update the xml file after receiving a "change" event

JMS route changes the JMSMessageID

2012-04-24 Thread Jason Queen
I have a camel route that moves a message from an ActiveMQ queue to a WebsphereMQ queue. In between the 2 endpoints I grab message and modify the body. I also grab the JMSMessageID and store it. After this I set the JMSMessageID to a different number and stick it on the Exchange. When the messag

Re: camel-test-spring

2012-04-24 Thread Christian Müller
At present, the dependency tree looks like below (which is wrong): [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ camel-test-spring --- [INFO] org.apache.camel:camel-test-spring:bundle:2.10-SNAPSHOT [INFO] +- org.apache.camel:camel-test:jar:2.10-SNAPSHOT:compile [INFO] | +- org.apach

Re: xpath and namespaces

2012-04-24 Thread Bob Jolliffe
On 24 April 2012 16:36, Claus Ibsen wrote: > On Tue, Apr 24, 2012 at 5:11 PM, Bob Jolliffe wrote: >> On 24 April 2012 15:22, Claus Ibsen wrote: >>> Hi >>> >>> Thanks >>> >>> Just to be sure how do you refer to this external file? >>> >> >> I'm loading it with: >> >> FileInputStream is = new File

Re: JMS route changes the JMSMessageID

2012-04-24 Thread Raul Kripalani
There is an option on the camel-jms endpoint called 'messageIdEnabled'. Have you tried setting it to false? See http://camel.apache.org/jms.html. HTH, Raul. On 24 Apr 2012, at 22:36, Jason Queen wrote: > I have a camel route that moves a message from an ActiveMQ queue to a > WebsphereMQ queue.

Re: camel-test-spring

2012-04-24 Thread Christian Müller
Sorry, forget my last comment... I think we should let it is as it is. I created a sample application which depends on camel-sql and camel-test-spring. The dependency tree looks like below (dependency to org.springframework:spring-test:3.1.1.RELEASE): [INFO] --- maven-dependency-plugin:2.1:tree (

Re: Jetty Component and headerBufferSize

2012-04-24 Thread pglebow
Jetty's configuration parameters seem to be controlled at the connector level; http://docs.codehaus.org/display/JETTY/Configuring+Connectors lists the properties that are available. I tried specifying the socketConnectorProperties map in the Spring DSL that defines the route; here is the relevant

Re: Registering Components in OSGi Using Spring XML File...

2012-04-24 Thread Willem Jiang
Hi, If you are using spring, you can export your wmq component as OSGi service, then import it as a normal bean in the other bundle. Camel will pick up the component for you automatically. On Tue Apr 24 22:48:40 2012, James Carman wrote: I am trying to set up a JMS component which connects t

Re: camel-test-spring

2012-04-24 Thread Willem Jiang
If the user doesn't use the CamelSpringUnit4ClassRunner from the camel-test-spring, he doesn't need the spring-test:3.1.x. But if he needs it, he should consider to update the spring dependency version. When we upgrade the spring version to 3.1.x, these issues will go away. On Wed Apr 25 06:42

Re: Registering Components in OSGi Using Spring XML File...

2012-04-24 Thread James Carman
I don't want to have to import it. I want to just use it throughout ServiceMix just like I do all other components. I solved it by borrowing some code from OsgiComponentResolver and tweaking it a bit to find components in the spring context. I exported that guy as an OSGi service of type Compone

Unit test, Mock, Spring context

2012-04-24 Thread javaxmlsoapdev
Hello, I have a simple custom router defined in Java DSL. @Component public class CustomRouter extends SpringRouteBuilder{ @Autowired private SourceQProcessor sourceQProcessor; public void configure() { from("activemq:queue:SourceQueue")

Re: Load Balancer EIP

2012-04-24 Thread Edwin
No I never read that in the Camel documentation. I incorrectly assumed that was the behaviour. -- View this message in context: http://camel.465427.n5.nabble.com/Load-Balancer-EIP-tp5656311p5662755.html Sent from the Camel - Users mailing list archive at Nabble.com.

Understanding Request-Reply EIP in Spring DSL

2012-04-24 Thread Eugeniu
Hi Here is the listing 7.6 from Camel in Action book: http://camel.apache.org/schema/spring";> OK Here the 'transform' construct changes the message body to string 'OK' and sends this back to the web service as reply. How in general do you send replies in such ca

Camel routes deployment in the Cloud

2012-04-24 Thread Eugeniu
Hello, Have you ever encountered situations where it would make sense for a route to be replicated in order to handle a temporarily increased load level? I mean it is the integrated applications which actually execute the application logic, routes handle routing logic which is lightweight and requ

Re: JMS route changes the JMSMessageID

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 10:36 PM, Jason Queen wrote: > I have a camel route that moves a message from an ActiveMQ queue to a > WebsphereMQ queue.  In between the 2 endpoints I grab message and modify the > body. I also grab the JMSMessageID and store it.  After this I set the > JMSMessageID to a d

Re: Understanding Request-Reply EIP in Spring DSL

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 7:49 PM, Eugeniu wrote: > Hi > > Here is the listing 7.6 from Camel in Action book: > > http://camel.apache.org/schema/spring";> >   >     >     >     >      OK >     >   > > > Here the 'transform' construct changes the message body to string 'OK' and > sends this back to

Re: [SOLVED]Re: Camel-Stream URI error

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 1:05 PM, Gnanaguru S wrote: > > Hi Claus, > > I am getting empty files when routing from stream endpoint. > What do you mean by empty files? Do you get an empty message? > I want to read each new line and update to other file. > > My route: > > Please share your view. >

Re: Transform and multiply

2012-04-24 Thread Hynek Cihlar
Maybe suspend the original exchange and send the transformed messages as new exchanges to the next processor in the channel? If so, how to get the channel or next processor? Hynek -- View this message in context: http://camel.465427.n5.nabble.com/Transform-and-multiply-tp5662517p5663962.html Sen

Re: Transform and multiply

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 6:03 PM, Hynek Cihlar wrote: > Hello all, > > what would be the best approach to solve the "transform and multiply" > behavior? That is, a message retrieved from an endpoint is transformed, > multiplied and sent down the route pipeline. > What do you mean by multiplied? Do

Re: custom component synchronous processing

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 2:43 AM, Jason Burkhardt wrote: > Hi Claus, > Thanks for pointing me in the proper direction. > In most cases I want the http server to remain multithreaded, but in this > specific case I really need the messages in order so out of your ideas I > figured the most appropriat

Re: xpath and namespaces

2012-04-24 Thread Claus Ibsen
On Tue, Apr 24, 2012 at 11:23 PM, Bob Jolliffe wrote: > On 24 April 2012 16:36, Claus Ibsen wrote: >> On Tue, Apr 24, 2012 at 5:11 PM, Bob Jolliffe wrote: >>> On 24 April 2012 15:22, Claus Ibsen wrote: Hi Thanks Just to be sure how do you refer to this external file? >>

Re: Jetty Component and headerBufferSize

2012-04-24 Thread Claus Ibsen
On Wed, Apr 25, 2012 at 1:30 AM, pglebow wrote: > Jetty's configuration parameters seem to be controlled at the connector > level; http://docs.codehaus.org/display/JETTY/Configuring+Connectors lists > the properties that are available. > > I tried specifying the socketConnectorProperties map in th