git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Config parameters in splitter group attribute, was: Re: camel-atmosphere-websocket + TomEE


Thanks so much Zoran, 

I've been able to actually get this working using properties place holder.  I found Claus's answer to a similar question on net. Lots of digging but I finally found it. 
my quest for info and answers didn't go deep enough. I found this was already encounted and answered by Claus Ibsen. Please see if you run in to this need.

Validation error with integer property (camel)

http://camel.apache.org/using-propertyplaceholder.html

under section "Using Property Placeholders for Any Kind of Attribute in the XML DSL"

here is what I did following these instructions.

added property prefix namespace xmlns:prop="http://camel.apache.org/schema/placeholder";

then modified the tokenize attribute

<tokenize token="\n" prop:group="noOfLines" />
I'm using the property placeholder

<cm:property-placeholder persistent-id="com.digital.passthru.core" />

this works like a charm. thank you Claus and Zoran


Gary Lee Mills
GE Middleware Engineer
Work:  331-777-2318
Cell:     630-607-9639

-----Original Message-----
From: Zoran Regvart [mailto:zoran@xxxxxxxxxxx] 
Sent: Tuesday, May 22, 2018 4:38 AM
To: Mills, Gary (GE Digital) <gary.L.mills@xxxxxx>; users@xxxxxxxxxxxxxxxx
Subject: EXT: Config parameters in splitter group attribute, was: Re: camel-atmosphere-websocket + TomEE

Hi Gary,
I think you can use property placeholders for `group` in version 2.20 onwards. The support for that was added in CAMEL-11421[1].

zoran

[1] https://issues.apache.org/jira/browse/CAMEL-11421

On Fri, May 18, 2018 at 5:35 PM, Mills, Gary (GE Digital) <gary.L.mills@xxxxxx> wrote:
> can you inject a value from the config params file in to the splitter group attribute? if so, what is the proper way of doing it? thanks!
>
> Is this possible? What am I doing wrong? Thank you!
>
> <split streaming="true" >
> <tokenize token="\n" group="{{noOfLines}}" /> <log message="Split 
> Group Body: ${body}"/>
>     <to uri="bean:extractHeader" />
>     <to id="acceptedFileType" ref="pConsumer" /> </split>
>
> <split streaming="true" >
> <tokenize token="\n" group={{noOfLines}} /> <log message="Split Group 
> Body: ${body}"/>
>     <to uri="bean:extractHeader" />
>     <to id="acceptedFileType" ref="pConsumer" /> </split>
>
> Gary Lee Mills
> Work:  331-777-2318


--
Zoran Regvart


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03321.html on line 134
Call Stack
#TimeMemoryFunctionLocation
10.0008368728{main}( ).../msg03321.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03321.html on line 134
Call Stack
#TimeMemoryFunctionLocation
10.0008368728{main}( ).../msg03321.html:0