Re: dynamic filename endpoint

2012-06-26 Thread Claus Ibsen
Hi Are you using spring property placeholders by any chance? I wonder if it interfere. It has an option to ignore unknown properties. On Mon, Jun 25, 2012 at 8:14 PM, jtoepfer wrote: > I am using Apache Camel 2.7 with ActiveMQ 5.5.1. > > I am trying to setup an endpoint filename with dynamic da

Re: dynamic property keys

2012-06-26 Thread Claus Ibsen
On Mon, Jun 25, 2012 at 7:40 PM, paramjyotsingh wrote: > Hey Clause, > > I looked at the documentation it says that nested expressions are not > supported in 2.8.X and older. Can you please suggest any work around for > this scenario. > You can use a java bean / processor, and then there is any A

Re: Threads EIP hangs Unit Tests (JUnit4)

2012-06-26 Thread Willem Jiang
Hi Can you try to run the test on the trunk code? If the error is still there, you can log a JIRA and submit your test case with it. On Mon Jun 25 22:22:34 2012, E.Gherardini wrote: I've also tried removing the "threads()" using the weaveByType, but I get an "unsupported operation exception"

HDFS example in distributed mode

2012-06-26 Thread Naresh
I am trying to get HDFS example to work on my local machine. I have hadoop installed and when I use the HDFS API I can transfer files back and forth so I know hadoop is set up. I tried to use the HDFS unit tests as example but only one actually is using HDFS in distributed mode while most of the

Re: HDFS example in distributed mode

2012-06-26 Thread Naresh
One more thing: That example is basically the unit test called HdfsProducerConsumerIntegrationTest.java http://svn.apache.org/repos/asf/camel/branches/camel-2.8.x/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/integration/HdfsProducerConsumerIntegrationTest.java - Naresh

Re: Test Case - Quartz to a Custom bean

2012-06-26 Thread dgallagher
Thanks Claus i used the AdbiceWith and it has satisfied my requirements Thanks Damien -- View this message in context: http://camel.465427.n5.nabble.com/Test-Case-Quartz-to-a-Custom-bean-tp5715085p5715105.html Sent from the Camel - Users mailing list archive at Nabble.com.

Error Running JUnit Test

2012-06-26 Thread dgallagher
Hi I ran into an issue while running my junit tests, the error I get is as follows org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2844 in XML document from class path resource [config/domesticCamel-context.xml] is invalid; nested exception is org.xml.sax.SAXParseExcept

Re: Error Running JUnit Test

2012-06-26 Thread Claus Ibsen
Hi Are you using Java 7? If so then you will have to wait for Camel 2.10 to support that out of the box. Older Camel releases requires Java 6. On Tue, Jun 26, 2012 at 1:17 PM, dgallagher wrote: > Hi > > I ran into an issue while running my junit tests, the error I get is as > follows > org.spri

Re: Error Running JUnit Test

2012-06-26 Thread dgallagher
Hi Claus I am using Java 6, i just checked my classpath to make sure and it's Java 6 Thanks Damien -- View this message in context: http://camel.465427.n5.nabble.com/Error-Running-JUnit-Test-tp5715106p5715108.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: dynamic filename endpoint

2012-06-26 Thread jtoepfer
Claus, I was actually looking at the http://camel.apache.org/file2.html File2 reference of creating a filename. I thought I should be able to do the same with FTP, is that not correct? This was the File Language example given: mydata-${date:now:MMdd}.txt Thanks again for your help.

Re: activiti and camel

2012-06-26 Thread Claus Ibsen
Hi Kai Wahner did a presentation recently at CamelOne where he covered Camel and Activiti. The video is here http://fusesource.com/apache-camel-conference-2012/camelone_speakers_2012/#kwahner On Tue, Jun 26, 2012 at 2:01 PM, chris snow wrote: > Hi Forum, > > My Company is trying to push Activ

Re: dynamic filename endpoint

2012-06-26 Thread Claus Ibsen
On Tue, Jun 26, 2012 at 2:11 PM, jtoepfer wrote: > Claus, > >   I was actually looking at the  http://camel.apache.org/file2.html File2 > reference of creating a filename.  I thought I should be able to do the same > with FTP, is that not correct? > > This was the File Language example given:  myd

Re: dynamic filename endpoint

2012-06-26 Thread jtoepfer
Claus, No not using spring property placeholders. I'll try using the and see how it goes. Thanks for your help. - Josh -- View this message in context: http://camel.465427.n5.nabble.com/dynamic-filename-endpoint-tp5715076p5715113.html Sent from the Camel - Users mailing list archive at Na

spring xpath message router

2012-06-26 Thread john race
Camel spring routing: I'm trying to route a message depending on the content of an element. e.g. for elements "_test1"/"_test2"/"_test"/"_test" I want to say - if the first 4 characters are "" route to queue 1, "" route to queue 2, etc. I know I can do a direct comparison

Re: dynamic filename endpoint

2012-06-26 Thread jtoepfer
Claus, I just performed the test of using the uri of the and *it work*. So to clarify what I was doing and what does work. So instead of using: ftp://a...@ftp.sample.com/OUT/Test?fileName=file-${date:now:MMdd}.xml"; /> I changed it per your suggestion and it works. ftp://a...@ftp.sa

Re: Error Running JUnit Test

2012-06-26 Thread dgallagher
Hi I think I have found the issue. I narrowed down the dependencies in the new maven module that I imported and found the offending dependencies in that module. It turns out the version of xerces that was being loaded by some of the dependencies was causing the problem. By exluding those xerces de

RE: camel xslt 2.0 support

2012-06-26 Thread weather99
I included the xslt file as a resource in my jar and did what you suggested. I got the same result: Only the prolog showed up in the converted message. Thanks for the idea, though. From: Henrique Viecili [via Camel] [mailto:ml-node+s465427n5715048...@n5.nabble.com] Sent: Monday, June 25, 2012 9:

RE: camel xslt 2.0 support

2012-06-26 Thread weather99
Thanks Claus. I get the same problem in either Servicemix 4.4.1 or 4.4.2. Remember that I can also get the same problem in standalone Camel, so you might want to take a look at how it loads these classes. I can have everything working fine in standalone Camel, running against the saxon9he.jar. A

Re: spring xpath message router

2012-06-26 Thread Claus Ibsen
Hi You can use the recipient list EIP, and from a java bean you can combine this with @RecipientList http://camel.apache.org/recipientlist-annotation.html XPath is a complex language, and figuring out how to do like can take time. But I think it has a sub string function etc. If you wanna go dow

Camel Jetty Endpoint query

2012-06-26 Thread Navengit
I have a Java Struts 1.1 based application which has a JSP which is sending an HTTP request to Jetty endpoint in my Camel application. I have an object set in request.setAttribute. How to get this object in my camel processor? I am able to get the request parameters but not request attributes.

Re: Camel Jetty Endpoint query

2012-06-26 Thread Claus Ibsen
I dont think attributes on request object is part of what is sent over HTTP. I would assume its a local object. If you want to send that object to Camel it has to be either part of HTTP HEADER HTTP BODY And since its a object you may want to send it as serialized content as bytes. On Tue, Jun 26

Re: spring xpath message router

2012-06-26 Thread john race
Thanks Claus I use java bean configuration for other parts of my routing - but for this one I want to keep it all in the spring configuration if possible. btw, the extract I posted was an extract from my Camel route context (ie configured using spring). -- View this message in context: http:/

Re: Camel Jetty Endpoint query

2012-06-26 Thread Navengit
Thanks a lot for the reply there. Can you please elaborate as to how to make an object part of HTTP body. eg: how to do it in a JSP? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Jetty-Endpoint-query-tp5715119p5715123.html Sent from the Camel - Users mailing list arch

Changing from file-consumer to ftp-consumer

2012-06-26 Thread stefzar
Hello Camel Users, I have a Camel route consisting of a Polling Consumer and a Custom Processor. The Polling Consumer is configured by a "file:" URI. The Custom Processor recieves all polled messages and its logic relies on the "sendEmptyMessageWhenIdle" parameter configured in the file URI. Now

Re: Changing from file-consumer to ftp-consumer

2012-06-26 Thread Claus Ibsen
On Tue, Jun 26, 2012 at 5:01 PM, stefzar wrote: > Hello Camel Users, > > I have a Camel route consisting of a Polling Consumer and a Custom > Processor. The Polling Consumer is configured by a "file:" URI. The Custom > Processor recieves all polled messages and its logic relies on the > "sendEmpty

Re: Changing from file-consumer to ftp-consumer

2012-06-26 Thread stefzar
Thank you for your answer so far but it is a bit more difficult. In our program it may happen that we are polling on folders which do not exist. With the file Component it sends an emptyMessage if the folder should not exist, but with the FTP Component we get an Exception instead which tells us th

Re: Changing from file-consumer to ftp-consumer

2012-06-26 Thread Donald Whytock
On Tue, Jun 26, 2012 at 11:34 AM, stefzar wrote: > Thank you for your answer so far but it is a bit more difficult. > > In our program it may happen that we are polling on folders which do not > exist. With the file Component it sends an emptyMessage if the folder should > not exist, but with the

Footprint of SEDA queues

2012-06-26 Thread Edwin
Hi Folks, I have a route which takes larges volumes of messages from an endpoint(custom), splits the message in to subsets of messages via the load balancer EIP and places on 5 different SEDA queues. I have 200 of these routes: from("custom:endpoint?param1=session1").loadBalance()to("seda:ses

RE: camel xslt 2.0 support

2012-06-26 Thread weather99
O.K. I created an OSGI bundle which wrapped Saxon’s TransformerFactoryImpl class. In the OSGI implementation, I included the class files expanded from the saxhon9he jar. I got the same result. I was not able to set Camel’s transformerFactory or transformerFactoryClass to my implementation an

Camel - error handling

2012-06-26 Thread dgallagher
Hi from reading through camel, there seems like many ways to perform different operations. I have a specific question around error handling and what the general consensus >From what I can see, there is the dead letter channel, try, catch, finally, global exceptions etc >From an application standp

Re: Camel - error handling

2012-06-26 Thread Ashwin Karpe
Hi, The exception handlers are meant to be used the same way as if you were writing code. It is not possible to offer explicit best practices since every use case is different. You would need to be explicit about your routes or use case along with what you are trying to get accomplished. In gener

Re: Camel Jetty Endpoint query

2012-06-26 Thread Willem Jiang
Hi, You can access the request object by looking up the message header with the name Exchange.HTTP_SERVLET_REQUEST like this in your processor Message in = exchange.getIn(); Request request = (Request)in.getHeader(Exchange.HTTP_SERVLET_REQUEST); On 6/26/12 10:08 PM, Navengit wrote: I have a

Re: Camel Jetty Endpoint query

2012-06-26 Thread Navengit
Hi Willem, Thanks for the reply there. I have tried this way as well but the attributes which I am setting in my HttpRequest object is getting stripped off. How can I set an object from a JSP in HTTP body so that I can get the same from my Camel exchange message using exchange.getIn().getBody;

Re: XPath Filter not working

2012-06-26 Thread paramjyotsingh
Hi Claus, I read this article from you, http://www.davsclaus.com/2011/11/splitting-big-xml-files-with-apache.html about splitting big XML into small pieces. I am trying to do same thing in camel 2.8.1 but does not work the same way it works in 2.9.2 In 2.8.1 i am using following mechanism to sp

Re: Camel Jetty Endpoint query

2012-06-26 Thread Claus Ibsen
On Wed, Jun 27, 2012 at 5:21 AM, Navengit wrote: > Hi Willem, >  Thanks for the reply there. > I have tried this way as well but the attributes which I am setting in my > HttpRequest object is getting stripped off. > How can I set an object from a JSP in HTTP body so that I can get the same > from

Re: Footprint of SEDA queues

2012-06-26 Thread Claus Ibsen
On Tue, Jun 26, 2012 at 7:09 PM, Edwin wrote: > Hi Folks, > > I have a route which takes larges volumes of messages from an > endpoint(custom), splits the message in to subsets of messages via the load > balancer EIP and places on 5 different SEDA queues. > > I have 200 of these routes: > from("cu

Re: Camel - error handling

2012-06-26 Thread Claus Ibsen
Hi Besides the docs at Apache there is a few blog posts, such as http://www.consulting-notes.com/2010/08/camel-exception-handling-overview.html And if you have a copy of the Camel in Action book, then the entire chapter 5 is devoted to error handling. On Tue, Jun 26, 2012 at 11:18 PM, dgallaghe

Re: Throttling RoutePolicy based on JMS queue size

2012-06-26 Thread Claus Ibsen
Hi Yeah that sounds like a good idea, instead of the logic from in flight exchanges, you can implement logic that checks the queue size, and then throttle based on that. You can grab the queue size using JMX for example. On Wed, Jun 27, 2012 at 3:31 AM, mattg wrote: > We have a Camel applicatio