Re: How to pass headers from Camel to JBI and back

2010-01-14 Thread Claus Ibsen
On Tue, Jan 12, 2010 at 10:38 PM, Sebastian Gomez wrote: > Hi everyone, > > I've upgraded from Camel 1.6 to 2.1 and I've run into the issue of losing > Camel headers when calling a JBI endpoint. I think the way to go is to > declare a FilterHeaderStrategy. I've seen some examples, but I don't know

Re: Tight Integration with CEP (Complex Event Processing)

2010-01-14 Thread Claus Ibsen
On Thu, Jan 14, 2010 at 6:50 PM, verlsnake wrote: > > Integration with CEP (Complex Event Processing) - relatively seamlessly, not > in an awkward afterthought manner - is more and more important in any > middleware stack ... > > So what can Camel do about this CEP integration for us ? > Have you

Re: Intercept a processor?

2010-01-14 Thread Johan Haleby
Thanks! It would be great to have some filtering functionality as well. I've added an example as a comment on the blog. Regards, /Johan Claus Ibsen-2 wrote: > > Hi > > I posted a blog entry about the new feature in 2.2 > http://davsclaus.blogspot.com/2010/01/apache-camel-22-improved-test-kit

Re: Intercept a processor?

2010-01-14 Thread Claus Ibsen
Hi I posted a blog entry about the new feature in 2.2 http://davsclaus.blogspot.com/2010/01/apache-camel-22-improved-test-kit.html On Wed, Jan 13, 2010 at 8:14 PM, Johan Haleby wrote: > > That looks really neat and would as far as I can see really help. It would be > simple for me to wrap this

Re: A bug of InOut pattern?

2010-01-14 Thread Willem Jiang
Hi, I think you processor should check the MEP for the exchange. As it broke the rule of MEP. Can you change the code like this, and run the test again? Class IncreaseProcessor{ void process(Exchange me) { Integer result= me.getIn().getBody() + 1;

Re:A bug of InOut pattern?

2010-01-14 Thread ext2
Yes you are right. But the real confusing thing is: the two routes I tested have same semantic means, but the result is different. While I am try to find which caused the difference, I checked the source code of camel, and find a lot of camel-processor obey the following rule( I thinks it's cam

Re: camel-cache: Using Objects for cache

2010-01-14 Thread tide08
Thanks Ashwin, EHCache has MBean which exposes all the statistics. I guess, for now I can just expose it myself to mbean server. Thanks for all the help :) Ashwin Karpe wrote: > > Hi, > > The other request regarding exposing cache statistics is a little more > involved. > > I have created a

Re: A bug of InOut pattern?

2010-01-14 Thread ext2
Yes you are right. But the real confusing thing is: the two routes I tested have same semantic means, but the result is different. While I am try to find which caused the difference, I checked the source code of camel, and find a lot of camel-processor obey the following rule( I thinks it's camel

Re: Request message accessibility/manipulation

2010-01-14 Thread Stephen Gargan
Hi, You can use Wiretaps and an aggregator to do what you're suggesting. At each step that you want an intermediate result to be available, wiretap it off to an aggregator and set the batch size of the aggregator accordingly. from("direct:consumerEndpoint").wireTap("direct:aggregator").to("direct

Re: Store data be used in other steps in an exchange

2010-01-14 Thread Johan Haleby
Hi, I used something similar as your example to solve it. Works great! Thanks! /Johan Ashwin Karpe wrote: > > Hi Johan, > > You can do this in the following way > > from("somewhere") > .process(new Processor() { > public void process(Exchange exchange) throws Exception { >

Re: Store data be used in other steps in an exchange

2010-01-14 Thread Ashwin Karpe
Hi Johan, You can do this in the following way from("somewhere") .process(new Processor() { public void process(Exchange exchange) throws Exception { String payload = exchange.getIn().getBody(String.class); // get URI from payload body and set it in header

Re: Tight Integration with CEP (Complex Event Processing)

2010-01-14 Thread Ashwin Karpe
Hi, Can you please provide further clarity on this subject. It is not entirely clear as to what you are looking for... Can you be more specific...? Thanks, Ashwin... verlsnake wrote: > > Integration with CEP (Complex Event Processing) - relatively seamlessly, > not in an awkward afterthoug

Re: camel-cache: Using Objects for cache

2010-01-14 Thread Ashwin Karpe
Hi, The other request regarding exposing cache statistics is a little more involved. I have created a Jira entry for it and will try and add this feature in due course. Cheers, Ashwin... tide08 wrote: > > Thanks Claus! ArtifactID says springsource is it some customized version > of ehCache

Re: camel-cache: Using Objects for cache

2010-01-14 Thread Ashwin Karpe
Hi Claus, I fixed the sample cache creation issue and have checked in a patch CAMEL-2363. Cheers, Ashwin... Claus Ibsen-2 wrote: > > On Wed, Jan 13, 2010 at 7:19 PM, tide08 wrote: >> >> Thanks Claus! ArtifactID says springsource is it some customized version >> of >> ehCache we are using?

Re: camel-cache: Using Objects for cache

2010-01-14 Thread Ashwin Karpe
Hi, No problem. I will clean out the other caches... I did not realize that these were not commented out :) Cheers, Ashwin tide08 wrote: > > Thanks Claus! ArtifactID says springsource is it some customized version > of ehCache we are using? Reason I am asking is that I have conflict with

Tight Integration with CEP (Complex Event Processing)

2010-01-14 Thread verlsnake
Integration with CEP (Complex Event Processing) - relatively seamlessly, not in an awkward afterthought manner - is more and more important in any middleware stack ... So what can Camel do about this CEP integration for us ? -- View this message in context: http://old.nabble.com/Tight-Integrat

Re: Camel 2.1.0 camel-example-spring-jms does not work

2010-01-14 Thread Attilio Donà
Thanks Willem, it works! Attilio willem.jiang wrote: > > Hi, > > I just checked the activemq-core.jar 's META-INF/spring.schema file, it > doesn't have an entry for > http\://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd > So you need the internet connection for running the test.

Re: camel-cache: Using Objects for cache

2010-01-14 Thread Ashwin Karpe
Hi, The version of ehCache used by camel-cache is 1.6.2. This can however be modified to an earlier or later version. Cheers, Ashwin... tide08 wrote: > > Looks like Ashwin got on to this before I could submit mine. > > BTW..what version of ehCache does it use? It is not very clear from pom

Re: camel-cache: Using Objects for cache

2010-01-14 Thread Ashwin Karpe
Hi, The version of ehCache used is 1.6.2. This is however modifiable to a later or earlier version. Cheers, Ashwin... tide08 wrote: > > Looks like Ashwin got on to this before I could submit mine. > > BTW..what version of ehCache does it use? It is not very clear from pom > (and osgi is ne

Re: Using the splitter based on POJO class type

2010-01-14 Thread Claus Ibsen
On Thu, Jan 14, 2010 at 5:42 PM, Drone42 wrote: > > Thanks for the very useful pointers. One questions; > > In the documentation of the splitter I only see how to build the route with > a customer splitter using the fluent builder. Can I also configure this > using spring XML, i.e. provide my spli

Re: Using the splitter based on POJO class type

2010-01-14 Thread Drone42
Thanks for the very useful pointers. One questions; In the documentation of the splitter I only see how to build the route with a customer splitter using the fluent builder. Can I also configure this using spring XML, i.e. provide my splitter bean in the XML configuration of the route? And is the

Re: Camel and JMS Client Ack Mode?

2010-01-14 Thread MikeBAH
Been playing around and did find that when using the jmsComponentClientAcknowledge method and the process method throws an Exception that the JMS Message is indeed left on the JMS Queue. In the case where jmsComponentAutoAcknowledge is used the JMS Message is removed from the JMS Queue even with

Re: Using the splitter based on POJO class type

2010-01-14 Thread Claus Ibsen
Hi On Thu, Jan 14, 2010 at 4:03 PM, Drone42 wrote: > > I would like a route where I receive a message (rawframe), process it and > split it into multiple new message (different types; Frame, Packet, > Parameter), and thereafter route these to different endpoints. > > Something like; > > >   >  

Re: Camel 2.1.0 camel-example-spring-jms does not work

2010-01-14 Thread Willem Jiang
Hi, I just checked the activemq-core.jar 's META-INF/spring.schema file, it doesn't have an entry for http\://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd So you need the internet connection for running the test. I will fix it on activemq tomorrow. I just did a quick fix for this i

Using the splitter based on POJO class type

2010-01-14 Thread Drone42
I would like a route where I receive a message (rawframe), process it and split it into multiple new message (different types; Frame, Packet, Parameter), and thereafter route these to different endpoints. Something like; $class.type = 'frame' $class.t

Re: Camel 2.1.0 camel-example-spring-jms does not work

2010-01-14 Thread Attilio Donà
I've found a partial solution: the java runtime didn't see the internet: I'm behind a proxy and my setup (env var http_proxy is not used by jvm), so: mvn exec:java -PCamelServer \ -Dhttp.proxyHost=127.0.0.1 \ -Dhttp.proxyPort=5865 solve the problem. (maybe the examples README cou

Re: Timer fails to resolve parameters

2010-01-14 Thread Claus Ibsen
On Thu, Jan 14, 2010 at 2:28 PM, pmmerritt wrote: > > Camel fails to load the timer component in the following route > >                 >                 >   > > Camel is configured as a war file which is being loaded into the JBoss > Application Server. > > The following error is thrown while

Timer fails to resolve parameters

2010-01-14 Thread pmmerritt
Camel fails to load the timer component in the following route Camel is configured as a war file which is being loaded into the JBoss Application Server. The following error is thrown while attempting to load the Camel Context 08:18:26,339 ERROR Exception

Re: A bug of InOut pattern?

2010-01-14 Thread Willem Jiang
Your processor should check the MEP, and don't set the out message if the Exchange's MEP is InOnly. If there is a out message, the pipeline will try to copy the out message to next processor exchange's in message, otherwise it will copy the in message to next processor exchange's in message.

A bug of InOut pattern?

2010-01-14 Thread ext2
Hi: The camel 2.1's pipeline patter's MEP is InOnly default. But the result of following route is different, if I using inOnly() processor in route vs using default; I tried it using a simple sample: send a message to a direct endpoint, which body is number=1, a route receive the message and incr

Re: Store data be used in other steps in an exchange

2010-01-14 Thread Johan Haleby
I found out by myself. I simply put the uri in a header and simply pass the header to the recipient list. Johan Haleby wrote: > > Hi, > > I have a use-case where I must extract a endpoint uri from an object, > marshal the object to an unknown format and then send the result to the > extracted

Re: FTP assume directory do not have dot

2010-01-14 Thread sjmcduf
http://issues.apache.org/activemq/browse/CAMEL-2362 Thank you again Simon Claus Ibsen-2 wrote: > > Yeah good call > > Do you mind creating a ticket in JIRA about this? > http://issues.apache.org/activemq/browse/CAMEL > > > On Thu, Jan 14, 2010 at 12:42 PM, sjmcduf wrote: >> >> >> >> >> C

Re: FTP assume directory do not have dot

2010-01-14 Thread Claus Ibsen
Yeah good call Do you mind creating a ticket in JIRA about this? http://issues.apache.org/activemq/browse/CAMEL On Thu, Jan 14, 2010 at 12:42 PM, sjmcduf wrote: > > > > > Claus Ibsen-2 wrote: >> >> On Thu, Jan 14, 2010 at 12:25 AM, sjmcduf wrote: >>> >>> I have the following error: >>> >>> Cau

Re: Keep the lastModified timestamp when writing a file.

2010-01-14 Thread sjmcduf
Here https://issues.apache.org/activemq/browse/CAMEL-2361 Thank you Simon Claus Ibsen-2 wrote: > > On Thu, Jan 14, 2010 at 12:46 AM, sjmcduf wrote: >> >> I do the following: >> >> >> "ftp://t...@ftp.ttessier.ca/ftp.input?&recursive=true&binary=true&consumer.delay=1000";) >>            .t

Re: FTP assume directory do not have dot

2010-01-14 Thread sjmcduf
Claus Ibsen-2 wrote: > > On Thu, Jan 14, 2010 at 12:25 AM, sjmcduf wrote: >> >> I have the following error: >> >> Caused by: java.lang.IllegalArgumentException: Only directory is >> supported. >> Endpoint must be configured with a valid directory: ftp.test >>        at >> org.apache.camel.com

Store data be used in other steps in an exchange

2010-01-14 Thread Johan Haleby
Hi, I have a use-case where I must extract a endpoint uri from an object, marshal the object to an unknown format and then send the result to the extracted uri. Is there a built-in way to do this or do I have to manually persist the extract endpoint and retrieve a dynamic router or something? Her

Re: Camel 2.1.0 camel-example-spring-jms does not work

2010-01-14 Thread Willem Jiang
Attilio Donà wrote: Claus, I've tried the 2.2-SNAPSHOT (svn co https://svn.apache.org/repos/asf/camel/trunk camel) and the problem persist: I've also problems with the mvn install (2 test fails) and finally also skipping the tests I got a lot of WARNING and an ERROR: [WARNING] Warning

Re: recipientList retryUntil not working?

2010-01-14 Thread mcrive
I've tried both things you suggested but it is still not working, the retry happens in default manner. I've opened a ticket in JIRA: https://issues.apache.org/activemq/browse/CAMEL-2360 Claus Ibsen-2 wrote: > > Hi > > Can you try moving the onException on up? > > And if still a problem then

Re: pojo example fails to build with ant

2010-01-14 Thread Willem Jiang
Done, http://svn.apache.org/viewvc?rev=899132&view=rev Willem Jiang wrote: Claus Ibsen wrote: On Wed, Jan 13, 2010 at 7:17 PM, NP-Hard wrote: Thanks for the response. That got me past the first issue and now I get: Cannot find class: org.apache.xalan.xsltc.trax.DOM2SAX I don't see an obvio

Re: pojo example fails to build with ant

2010-01-14 Thread Willem Jiang
Claus Ibsen wrote: On Wed, Jan 13, 2010 at 7:17 PM, NP-Hard wrote: Thanks for the response. That got me past the first issue and now I get: Cannot find class: org.apache.xalan.xsltc.trax.DOM2SAX I don't see an obvious jar that has xalan in the camel distribution; do I need to download it sep

Re: Disabling Tracer for a specific route

2010-01-14 Thread Claus Ibsen
On Thu, Jan 14, 2010 at 10:13 AM, wmoussel wrote: > > Hi, > > I'm trying to find a way to disable tracing for a specific route (i.e. not > for the whole context). > > For instance I have a file poller that fires every 2 seconds and I'd like > not to see the trace log. > > If there's no way I think

Re: Retrieving MailMessage bodies as DataHandler objects

2010-01-14 Thread huntc
Claus Ibsen-2 wrote: > > You can get access to the underlying javax.mail.Message... > Thanks Claus. I'm now trying out the following and just waiting for another message to come through: // See if our exchange body contains the calendar object. javax.mail.Message mailMessage = exchange.ge

Disabling Tracer for a specific route

2010-01-14 Thread wmoussel
Hi, I'm trying to find a way to disable tracing for a specific route (i.e. not for the whole context). For instance I have a file poller that fires every 2 seconds and I'd like not to see the trace log. If there's no way I think i'll file a Jira. I was thinking maybe something like: from("f

Re: Retrieving MailMessage bodies as DataHandler objects

2010-01-14 Thread huntc
willem.jiang wrote: > > Camel Message has getAttachements() method which can help you get the > DataHandlers. > Thanks Willem - I know about the attachments. My case is where I'm dealing with a single part message and its not text content i.e. its text/calendar. -- View this message in contex

Request message accessibility/manipulation

2010-01-14 Thread lekkie
Hi guys, Just a quick one. I have this scenario where I 'd like to manipulate a request and some reponse from an endpoint. The flow below describe what I am trying to achieve: http://camel.apache.org/schema/spring"; trace="true"> I'd like the tran