Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread jimi.hullegard
Hi, Is it possible to define a simple expression in some global variable, without evaluating it? And then reference it, and evaluate it, later? I'm using Camel Spring XML. For example, something like this pseudo config: [...] ${testExpression} [...] Can this be

RE: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread jimi.hullegard
I can't get it to work. This is my config: [...] ref:testExpression [...] And this is the output: Test 1: ${file:name.noext}_${date:now:-MM-dd_HH.mm.ss} Test 2: ${file:name.noext}_${date:now:-MM-dd_HH.mm.ss} Bu

RE: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread jimi.hullegard
OK, thanks. Now the test with the header works. But I still can't get the "inline" expression to work, in the tag. How should I write there? I have tried: But this just prints: Test 2: ${file:name.noext}_${date:now:-MM-dd_HH.mm.ss} Test 3: $ref{testExpression} So, to summarize. I can

RE: Store un-evaluated simple expression, and evaluate on use?

2016-04-15 Thread jimi.hullegard
On Friday, April 15, 2016 1:36 PM, claus.ib...@gmail.com wrote: > > > > > > On Fri, Apr 15, 2016 at 1:29 PM, > > wrote: > > > > So, to summarize. I can get Camel to eval the Expression bean when using > > testExpression in a setHeader. But I can't get Camel to eval it > > as part of another

Trigger sanity check on startup, camel style?

2016-04-17 Thread jimi.hullegard
Hi, Is there a built in way in Camel to trigger some kind of sanity check on startup? For example, I would like to have Camel check that certain directories and configuration files exist on startup. So that, if they don't exist, Camel prints a user friendly error message and shuts down. So I

Re: Trigger sanity check on startup, camel style?

2016-04-17 Thread jimi.hullegard
Thanks Claus, However, I can't get it to work properly. The VetoCamelContextStartException I throw has rethrowException=false, since I don't want a stacktrace printed. But that seems to cause Camel to get stuck during "shutdown". It prints the message about the veto, but then nothing happens, a

Re: Trigger sanity check on startup, camel style?

2016-04-17 Thread jimi.hullegard
OK, I did just that. CAMEL-9872. :) /Jimi From: Claus Ibsen Sent: Sunday, April 17, 2016 9:01 PM To: users@camel.apache.org Subject: Re: Trigger sanity check on startup, camel style? Hi Yeah you hit minor corner case, because the main class do not detec

How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread jimi.hullegard
Hi, How can I log a Processor ERROR with stacktrace using DeadLetterChannel? Ie I have a route with a Processor that throws an Exception of some kind, and the route has a DeadLetterChannel configured, that sends the exchange to a "error" route. And I would like this Exception to be logged on

Re: How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread jimi.hullegard
Hi Minh, I'm sorry, but I don't really understand how I can achieve what I want with a redelivery policy. I mean, sure, I guess the logging would work as I want, but I still want to be able to handle the Exchange when the error happens. How can I do that if I can't define a route that the Excha

Re: How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-17 Thread jimi.hullegard
Yes, exactly. I want Camel to log the error, so that we can analyze the problem later (when looking at the log file), and at the same time handle the Exchange in our "error" route, which basically means cleaning up some temporary files, and moving some other files. So we don't "handle" the Excha

Re: How to log a Processor ERROR with stacktrace using DeadLetterChannel?

2016-04-18 Thread jimi.hullegard
ok, I got it working now. Thanks. What I did was simply adding an empty inside the tag. It is a bit counter intuitive though that this changes the behaivor, since all I do is add a redeliveryPolicy with no special configuration. Logically thinking, the result should be the same as the defaul

Only trigger route if condition is fulfilled?

2016-06-16 Thread jimi.hullegard
Hi, I would like an easy way to stop a route from processing any more messages, by defining some boolean condition so that the route should run only if the condition is true. The condition doesn't have to be connected in any way with the payload. Instead it could involve performing a http GET

RE: Only trigger route if condition is fulfilled?

2016-06-16 Thread jimi.hullegard
r set the exchange property exchange.setProperty(Exchange.ROUTE_STOP, Boolean.TRUE); Best Souciance On Thu, Jun 16, 2016 at 12:28 PM, jimi.hullegard [via Camel] < ml-node+s465427n5784112...@n5.nabble.com> wrote: > Hi, > > I would like an easy way to stop a route from processing

RE: Only trigger route if condition is fulfilled?

2016-06-16 Thread jimi.hullegard
hu, Jun 16, 2016 at 12:58 PM, jimi.hullegard [via Camel] < ml-node+s465427n5784115...@n5.nabble.com> wrote: > Hi Souciance, > > If I stop the route, how do I start it later? I want it to run again > later if the stop-file is removed. I might just want to stop it for a > fe

RE: Only trigger route if condition is fulfilled?

2016-06-16 Thread jimi.hullegard
as an exclusionFilter for that file but has delete enabled. On Thu, Jun 16, 2016 at 12:58 PM, jimi.hullegard [via Camel] < ml-node+s465427n5784115...@n5.nabble.com> wrote: > Hi Souciance, > > If I stop the route, how do I start it later? I want it to run again > later if the

Can't get scp to work

2016-06-20 Thread jimi.hullegard
Hi, I'm trying to setup a simple (in my eyes) file transfer between servers, and when configuring this I am trying to transfer files from my windows machine to a remote server. But I simply can't get it to work. The route looks like this:

RE: Can't get scp to work

2016-06-20 Thread jimi.hullegard
I just tried the same thing on a linux machine (redhat), and got exactly the same error. But then, when I tried privateKeyFile (not documented on the scp/Jsch camel page) instead of username/password, to make it use private key verification, then it just worked on the first attempt (private key

Possible to use nested properties with both spring and camel property placeholders?

2016-11-03 Thread jimi.hullegard
Hi, I have a Camel project that uses Spring XML, with various settings in a separate settings.properties file. And these settings are used both in plain Spring XML (like arguments to java beans) and in Camel specific configuration (like endpoint URI). Here is the part of my camel-context.xml t

Documentation on writing endpoints is lacking...

2015-12-06 Thread jimi.hullegard
I'm evaluating Camel for a coming project, and so far it looks pretty impressive. But I would like to try and write my own endpoint implementation, just to test it out, and the documentation on the website is a bit lacking, to say the least. At the minimum, one would think one could find a compl

RE: Documentation on writing endpoints is lacking...

2015-12-07 Thread jimi.hullegard
Hi Taariq, Thanks for the link to the page "Creating a new Camel Component". It should really be mentioned in the page "Writing Components", since it helped me a lot. I think it should also be mentioned in the user guide (I looked, but no link to http://camel.apache.org/creating-a-new-camel-com

Questions about attachments (not i emails)

2015-12-07 Thread jimi.hullegard
Hi again everyone :) One thing we would need to handle in our potential future Camel project is attachments, and I can't find much information about attachments in Camel except a little information about emails. And, in fact, I see some indication that attachments aren't actually supported by m