Re: Proper way to initialize Transaction management for Camel in an Application Server

2013-09-20 Thread Claus Ibsen
Hi You can use SimpleCamelServletContextListener which then does not use the JndiRegistry but the simple instead, which should be able to do the lookups. See the docs at http://camel.apache.org/servletlistener-component.html On Thu, Sep 19, 2013 at 4:50 PM, kraythe wrote: > So am I to understan

tokenize + group + aggregator strategy?

2013-09-20 Thread Tom Ellis
Hi Is it possible to do something like this: int myGroupSize = 100; .split(body().tokenize("\n", myGroupSize), new myAggStrategy()) ? The above doesn't work because the tokenize methods on the ValueBuilder don't take groups. The following compiles but is it the best way/can someone see if it obv

Re: tokenize + group + aggregator strategy?

2013-09-20 Thread Aida
Could you put an example of what have you tested? and which is the next step inside and after the splitter -- View this message in context: http://camel.465427.n5.nabble.com/tokenize-group-aggregator-strategy-tp5739864p5739869.html Sent from the Camel - Users mailing list archive at Nabble.com.

[ConsumerTemplate] CamelLocks deleted before file is completely processed

2013-09-20 Thread Aida
Hi, I'm using the consumer template for reading files, and I'm experiencing something that makes me think that I'm not using it correctly. What happens to me is: 1. I have a dir with multiple files 2. The consumer template reads one of those files, creating a camelLock file for the file that is g

Re: OGNL property syntax in documentation does not work

2013-09-20 Thread Dale King
The last 2 rows of the variables table shows ways that are supposed to get properties by name, but I tried to use it and it throws an exception. The RootObject passed to OGNL has getProperty methods, but OGNL will not match up property(...) to getProperty() method. OGNL 4 can match property[name] t

Creating a Camel Project with customized POM

2013-09-20 Thread madusanka
Hi all, I created a camel project with "camel-archetype-spring" archetype to deploy in ServiceMix 4.4.2. But the versions of all the dependencies in POM are above that of ServiceMix. Example - ServiceMix camel-core version is 2.8.5 whereas the camel-core version in POM is 2.12.0. So I want to

Re: Using HTTP and HTTPS proxies with Camel HTTP Component

2013-09-20 Thread Alex Anderson
On 15 September 2013 05:36, Christian Posta wrote: > Alex, > > As Christian M. points out, use the camel config on the endpoint, not the > way you're doing in your OP. > > Cheers > > > On Wed, Sep 11, 2013 at 6:03 AM, Alex Anderson wrote: > >> On 10 September 2013 22:49, Christian Müller >> wrote

Re: cast of property value for blueprint osgi implementation

2013-09-20 Thread cbuxbaum
Hi Claus, Yes, sorry, I ommitted that my message. I have this: and /etc/com.tradestonesoftware.aiextractor.cfg However, even without that in place, I would have thought that the type of the variable would have been converted to a boolean, and would have come in as false since the Strin

Re: OGNL property syntax in documentation does not work

2013-09-20 Thread Dale King
To be a little more concrete, according to the documentation you linked to, the following route should log "def" every second: from("timer:foo") .setProperty("foo").constant("abcdef") .setBody().ognl("property('foo').substring(3)") .log("${body}"); Inst

Re: OGNL property syntax in documentation does not work

2013-09-20 Thread Dale King
FYI, probably a better syntax to use for accessing properties that does work is properties.foo. Might want to put that in the documentation for OGNL. Similarly, request.headers.foo would work for request headers. On Fri, Sep 20, 2013 at 9:49 AM, Dale King wrote: > To be a little more concrete,

Bindy infinite loop

2013-09-20 Thread fclose
I have a route that looks like this if the route has to process a file that contains an empty line at the end (I suppose that if I have an empty line in the middle of the file, the problem will be the same) then the process res

Re: AW: How to set a header in custom DataFormat?

2013-09-20 Thread Chris
Jan, I really appreciate the help, unfortunately your test case does not even reproduce the issue I am having. I think I may not have been clear in my original message. The issue is in a custom DataFormat, if a set a *new* header, that header will be gone from the Exchange, for the rest of

Re: Is it possible to include XPath expression in simple expression?

2013-09-20 Thread bonnahu
Hi Christian, I think it would be useful if we have such "composite" expression. What do you think? -- View this message in context: http://camel.465427.n5.nabble.com/Is-it-possible-to-include-XPath-expression-in-simple-expression-tp5739830p5739882.html Sent from the Camel - Users mailing li

Re: AW: How to set a header in custom DataFormat?

2013-09-20 Thread Chris
Ok, I solved the issue. After reading the source code of org.apache.camel.processor.UnmarshalProcessor, I saw this little piece of code: } else if (result instanceof Message) { // the dataformat has probably set headers, attachments, etc. so let's use it as the out

Re: Is it possible to include XPath expression in simple expression?

2013-09-20 Thread Dale King
Perhaps adding language prefixes so that things like ${xpath:...} or ${ognl:...} and similar would work. On Fri, Sep 20, 2013 at 11:17 AM, bonnahu wrote: > Hi Christian, > I think it would be useful if we have such "composite" expression. What do > you think? > > > > -- > View this message in

Re: AW: How to set a header in custom DataFormat?

2013-09-20 Thread Chris
I spoke too soon... It works for unmarshalling, but not for marshalling - it's impossible to set new headers, attachments, etc. from a DataFormat's marshal method. On 9/20/2013 11:57 AM, Chris wrote: Ok, I solved the issue. After reading the source code of org.apache.camel.processor.Unmarshal

Re: AW: How to set a header in custom DataFormat?

2013-09-20 Thread Dale King
On Fri, Sep 20, 2013 at 11:57 AM, Chris wrote: > I have to say, I never saw this documented anywhere nor any example in the > book. Of course I understand that there are a lot of higher priority items > to do, so I'm not complaining ;) > Well, it was in the code, isn't that documentation enough

Re: Creating a Camel Project with customized POM

2013-09-20 Thread Christian Müller
Please don't post the same question to multiple forums without to mention it. If you use camel-archetype-spring version 2.12.0, change all camel version numbers in the pom to 2.8.5. You could also use the camel-archetype-spring version 2.8.5 (if it's available) which does this by default ;-) Bes

Re: AW: How to set a header in custom DataFormat?

2013-09-20 Thread Chris
Ok, for *marshaling* the workaround is a bit different then *unmarshalling*. For *marshalling*, the solution is to set new headers (or attachments, etc.) on the "out" Message. That wasn't documented or in the code comments... but, again - not complaining, just glad I got it to work. On 9/20/

Re: AW: How to set a header in custom DataFormat?

2013-09-20 Thread Chris
Actually you can just set the new headers on the *out* message for *both* marshalling/unmarshalling. I.e. Regardless of what the code comment in UnmarshalingProcessor says, you don't need to create a new Message and wrap the result. On 9/20/2013 1:19 PM, Chris wrote: Ok, for *marshaling* the

Re: Simple way to do some elementary bean operations

2013-09-20 Thread Dale King
On Fri, Sep 20, 2013 at 1:54 AM, Claus Ibsen wrote: > Hi > > You can use the language component, and set transform=false > http://camel.apache.org/language > That seems to do the trick, but having to add ?transform=false is a pain. I personally would argue that the default for transform should h

Re: Creating a Camel Project with customized POM

2013-09-20 Thread madusanka
Thanks!!! I'm sorry about posting the same question in multiple forums. I did so since it involved Camel, ServiceMix and Maven. Yes it worked. I added the "-DarchetypeVersion=2.10.5" argument to the maven command and it worked -- View this message in context: http://camel.465427.n5.nabble.co

Possible Bug. Scala recipient list http turning %2B into plus

2013-09-20 Thread Joseph Featherston
Hi all, So I'm trying to hit solr through camel and in the url there needs to be some pluses. Specifically to specify time facet gap "/HOUR+1HOUR". From googling I haven't seen any talk of this problem yet. I've tried java.util.URLEncoder and Decoder in numerous places inside and outside of the

Re: Bindy infinite loop

2013-09-20 Thread Christian Posta
What version of camel does this affect? On Fri, Sep 20, 2013 at 7:16 AM, fclose wrote: > I have a route that looks like this > > > > > > > uri="bean:importLineHandler?method=handleImport"/> > > > > class="org.apache.camel.dataformat.bindy.csv

Re: Is it possible to include XPath expression in simple expression?

2013-09-20 Thread Christian Posta
yah i like that. can you open a jira? On Fri, Sep 20, 2013 at 9:36 AM, Dale King wrote: > Perhaps adding language prefixes so that things like ${xpath:...} or > ${ognl:...} and similar would work. > > > On Fri, Sep 20, 2013 at 11:17 AM, bonnahu wrote: > > > Hi Christian, > > I think it would b

Re: missing output on route definition

2013-09-20 Thread javamonkey79
I am using 2.11.0. I can try the newly released 2.12.0 if you think that would fix it. I removed the transacted statement and yes, the broker then showed up in the route definition. Maybe there is a bug in how routes with transacted are advised? -- View this message in context: http://camel.46

Re: AW: How to set a header in custom DataFormat?

2013-09-20 Thread Chris
On 9/20/2013 12:40 PM, Dale King wrote: On Fri, Sep 20, 2013 at 11:57 AM, Chris wrote: I have to say, I never saw this documented anywhere nor any example in the book. Of course I understand that there are a lot of higher priority items to do, so I'm not complaining ;) Well, it was in th

Re: Proper way to initialize Transaction management for Camel in an Application Server

2013-09-20 Thread Robert Simmons
The question would be what functionality do I loose in doing that? Will I have to set up components like ActiveMQ manually instead of just getting it out of jboss jndi? Sent from my iPad > On Sep 20, 2013, at 2:01 AM, Claus Ibsen wrote: > > Hi > > You can use SimpleCamelServletContextListene

Re: Is there a Method to Determine if Mock Endpoints are Real?

2013-09-20 Thread kraythe
Wouldn't it make sense to check that in the getMockEndpoint method and perhaps throw an assertion failure with a good message if the mock does exist? -- View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-Method-to-Determine-if-Mock-Endpoints-are-Real-tp5739601p5739920.ht