Load balancing in Camel

2009-03-02 Thread Nivetha Shri
Hi All I want to know how we can combine dynamic routing and load balancing. For dynamic routing am using @RecipientList annotation as follows public class RoutingComponent{ @RecipientList public String[] route(String Body) { String output = "activemq1:topic:topic.outbound"; return new

Re: content-enrich

2009-03-02 Thread Peter Maas
On Mar 3, 2009, at 8:10 , Claus Ibsen wrote: On Tue, Mar 3, 2009 at 7:56 AM, Peter Maas wrote: I think you've solved my problem. I was looking at the 'in' message of the resource exchange, whereas I should be looking at the 'out' message. And, btw, yes the CinemaQueryAssembler is thread-sa

Re: Classloading and OSGI

2009-03-02 Thread Claus Ibsen
On Tue, Mar 3, 2009 at 8:03 AM, atlep wrote: > > I am using camel in  a OSGI (Felix) environment, and I regularly bump into > classloading issues: > > THe most recentones are > The JSM Component cant find the QueueBrowserStrategy because it cannot see > the spring bundle that exports it, because i

Re: content-enrich

2009-03-02 Thread Claus Ibsen
On Tue, Mar 3, 2009 at 7:56 AM, Peter Maas wrote: > I think you've solved my problem. I was looking at the 'in' message of the > resource exchange, whereas I should be looking at the 'out' message. And, > btw, yes the CinemaQueryAssembler is thread-safe, I actually think all code > should be threa

Classloading and OSGI

2009-03-02 Thread atlep
I am using camel in a OSGI (Felix) environment, and I regularly bump into classloading issues: THe most recentones are The JSM Component cant find the QueueBrowserStrategy because it cannot see the spring bundle that exports it, because it is using a "wrong " classloader to try to load it (it us

Re: content-enrich

2009-03-02 Thread Peter Maas
I think you've solved my problem. I was looking at the 'in' message of the resource exchange, whereas I should be looking at the 'out' message. And, btw, yes the CinemaQueryAssembler is thread-safe, I actually think all code should be threadsafe ;) On Tue, Mar 3, 2009 at 7:02 AM, Martin Krasser wr

Re: Camel with my app

2009-03-02 Thread Claus Ibsen
Hi If you have the time then you can check out this lengthy tutorial that starts from 0 and over time shows how to do it smarter. http://camel.apache.org/tutorial-example-reportincident.html And this one for a webapp with axis camel and spring http://camel.apache.org/tutorial-axis-camel.html And

Re: Performance and MessageSupport.getBody (1.6.0)

2009-03-02 Thread Claus Ibsen
On Tue, Mar 3, 2009 at 1:17 AM, Willem Jiang wrote: > Hi, > > If you don't want the TypeConverter to get invovled , you could use > MessageSupport.getBody() directly. Yes I am wondering if he has a .convertBodyTo in the route, so we need to see this. Or some other endpoint/producer trying to get

Re: content-enrich

2009-03-02 Thread Martin Krasser
Hi Peter, the route looks good to me. * The in-messages of the original exchange and the resource exchange are always identical. The out-message of the resource exchange will contain the result from 'direct:enrichMovie'. * What message exchange pattern do you use when you test (print the cont

Re: Camel with my app

2009-03-02 Thread Hadrian Zbarcea
Hi Rodrigo, There is not magic (ok, maybe just a tiny bit). Try something like this: CamelContext camel = new DefaultCamelContext(); // lets add some routes container.addRoutes(new RouteBuilder() { public void configure() { from("direct:st

Camel with my app

2009-03-02 Thread Rodrigo Valerio
I try to integrate camel into my app, but without success. Using spring integration, if i run by Main class (like examples), all run`s ok. How i get a CamelContext or Template instance in my app class? I see al the documentation, but can`t solve this simple (i think) problem: How is the best

Re: Performance and MessageSupport.getBody (1.6.0)

2009-03-02 Thread Willem Jiang
Hi, If you don't want the TypeConverter to get invovled , you could use MessageSupport.getBody() directly. Willem On Tue, Mar 3, 2009 at 1:43 AM, paquettd wrote: > > I'm not sure if it makes a difference but I'm not using JMS anywhere. In > fact > in this test everything is using "direct". >

Re: Performance and MessageSupport.getBody (1.6.0)

2009-03-02 Thread Claus Ibsen
On Mon, Mar 2, 2009 at 6:43 PM, paquettd wrote: > > I'm not sure if it makes a difference but I'm not using JMS anywhere. In fact > in this test everything is using "direct". > > Is there something I can do in the Spring DSL to hint to Camel that there is > no conversion necessary? Can you show yo

content-enrich

2009-03-02 Thread Peter Maas
Hi list, I'm developing a proof-of-concept application using Camel 2.0. Everything seems to work just find... except for the content-enricher. Both the resource exchange passed to my AggregationStrategy look identical. Whilst if I print the contents of the resource route I the the correct

Re: Performance and MessageSupport.getBody (1.6.0)

2009-03-02 Thread paquettd
I'm not sure if it makes a difference but I'm not using JMS anywhere. In fact in this test everything is using "direct". Is there something I can do in the Spring DSL to hint to Camel that there is no conversion necessary? Claus Ibsen-2 wrote: > > On Mon, Mar 2, 2009 at 5:54 PM, paquettd wrot

Re: Performance and MessageSupport.getBody (1.6.0)

2009-03-02 Thread Claus Ibsen
On Mon, Mar 2, 2009 at 5:54 PM, paquettd wrote: > > I've been seeing some performance problems with Camel 1.6.0 (I have not tried > this with previous versions yet). > > My profiler is pointing the finger at MessageSupport.getBody, > TypeConverter.convertTo, and DefaultTypeConverter.findTypeConver

Performance and MessageSupport.getBody (1.6.0)

2009-03-02 Thread paquettd
I've been seeing some performance problems with Camel 1.6.0 (I have not tried this with previous versions yet). My profiler is pointing the finger at MessageSupport.getBody, TypeConverter.convertTo, and DefaultTypeConverter.findTypeConverter specifically findTypeConverter is always throwing a No

Re: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.GenericFileMessage to the required type - SMX4 !

2009-03-02 Thread Claus Ibsen
Hi Charles Can you try it outside OSGi, eg running from a unit test or something. Just to get the fact straight whether or not running in OSGi is a problem. On Mon, Mar 2, 2009 at 5:47 PM, Claus Ibsen wrote: > Hi > > The @FallbackConverter type converter should kick in, when you use > file based

Re: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.GenericFileMessage to the required type - SMX4 !

2009-03-02 Thread Claus Ibsen
Hi The @FallbackConverter type converter should kick in, when you use file based components Willem is there something there that needs to be done in camel-osgi for registering fallback converteres as well? On Mon, Mar 2, 2009 at 5:16 PM, cmoulliard wrote: > > Yes Willem, > > Here it is : > >

Re: Camel 2.0-snapshot deployed on SMKNL4 - There are 2 parameters that couldn't be set on the endpoint

2009-03-02 Thread Claus Ibsen
Hi The option for file have changed in camel 2.0. See: http://camel.apache.org/file2.html All the pre/postfix etc. is based on expressions now. So it should be something like this: moveExpression=../done/${file:name} preMoveExpression=inprogress/${file:name} On Mon, Mar 2, 2009 at 5:40 PM, cmo

Camel 2.0-snapshot deployed on SMKNL4 - There are 2 parameters that couldn't be set on the endpoint

2009-03-02 Thread cmoulliard
Hi, The following error is reported when I deploy a camel project on Service Mix Kernel 1.1.0 snashot where Camel-2.0 SNAPSHOT osgi bundle is deployed ? 17:36:17,640 | ERROR | xtenderThread-15 | OsgiBundleXmlApplicationContext | gatedExecutionApplicationContext 366 | Post refresh error org.apa

Re: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.GenericFileMessage to the required type - SMX4 !

2009-03-02 Thread cmoulliard
Yes Willem, Here it is : http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://camel.apa

Re: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.GenericFileMessage to the required type - SMX4 !

2009-03-02 Thread Willem Jiang
Hi Charles, What kind of camel context did you create? Can you show me the Spring configuration file or the DSL rule? Willem On Mon, Mar 2, 2009 at 11:01 PM, cmoulliard wrote: > > Hi, > > I have a small camel - bindy project running perfectly in Eclipse or when > launched using command came

org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.GenericFileMessage to the required type - SMX4 !

2009-03-02 Thread cmoulliard
Hi, I have a small camel - bindy project running perfectly in Eclipse or when launched using command camel:run but when I deploy it on Servicemix Kernel 4, I receive the following error : 15:48:05,936 | ERROR | ompon...@1cb1d37 | DeadLetterChannel| rg.apache.camel.processor.Logge

Re: configuring mail endpoint

2009-03-02 Thread Claus Ibsen
On Mon, Mar 2, 2009 at 2:40 PM, siva naresh wrote: > > Hi, > >     we are developing the application for generic endpoints.. and we do not > want to > to check the instance of the endpoint with the instance of MailEndpoint and > set the properties.. > > Is there a way to enter the property(mail.sm

Re: configuring mail endpoint

2009-03-02 Thread siva naresh
Hi, we are developing the application for generic endpoints.. and we do not want to to check the instance of the endpoint with the instance of MailEndpoint and set the properties.. Is there a way to enter the property(mail.smtp.starttls.enable=true) via the URI.. in Camel 1.5? or get the p

Re: configuring mail endpoint

2009-03-02 Thread Claus Ibsen
On Mon, Mar 2, 2009 at 1:30 PM, siva naresh wrote: > > Please see the following code snippet.. > > Endpoint smtpEndPoint = context >                                 > .getEndpoint("smtp://usern...@smtp.gmail.com:25?password=password"); > >    try { >              producer = smtpEndPoint .createPro

Re: configuring mail endpoint

2009-03-02 Thread siva naresh
Hi, Thanks for replying. I forgot to put producer.start() statement in the code. Even after doing so.. the same exception occurs.. Claus Ibsen-2 wrote: > > Hi > > You need to start the producer first, and stop it after use > > producer.start() > // use producer as much you like > pr

Re: configuring mail endpoint

2009-03-02 Thread Claus Ibsen
Hi You need to start the producer first, and stop it after use producer.start() // use producer as much you like producer.stop() eg when you app shutdown or you dont need the producer anymore You know this is low level coding? Camel has a higher level API For instance you can use a ProducerTempl

configuring mail endpoint

2009-03-02 Thread siva naresh
Please see the following code snippet.. Endpoint smtpEndPoint = context .getEndpoint("smtp://usern...@smtp.gmail.com:25?password=password"); try { producer = smtpEndPoint .createProducer(); Exchange ex = producer.createExchange();

Re: Camel Routing based on bean return object

2009-03-02 Thread ee7arh
Hi, Thanks for the reply. Can you pls check the syntax you wrote as it doesn't look like it's allowed to have a "method()" function within a "when()". I can only find a way to use it after a filter e.g. filter().method(MyClass.class, "methodCall") Regards Andrew Claus Ibsen-2 wrote: > > On Fr

Re: Camel Routing based on bean return object

2009-03-02 Thread Claus Ibsen
On Mon, Mar 2, 2009 at 9:47 AM, ee7arh wrote: > > Hi Markus, > > Thanks for advice. Yes that would work but as you pointed out it's not ideal > since it's then not possible to see where the message will end up just by > reading the Routing definition. I would like to make my RouteBuilder as > read

Re: Camel Routing based on bean return object

2009-03-02 Thread ee7arh
Hi Markus, Thanks for advice. Yes that would work but as you pointed out it's not ideal since it's then not possible to see where the message will end up just by reading the Routing definition. I would like to make my RouteBuilder as readable as possible. Does you know whether it's possible to c