You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/09/26 18:12:40 UTC
[jira] Commented: (CAMEL-3162) Simple language work not properly
together with Springs PropertyPlaceholderConfigurer
[ https://issues.apache.org/activemq/browse/CAMEL-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62125#action_62125 ]
Claus Ibsen commented on CAMEL-3162:
------------------------------------
Christian try with latest code from trunk and use $simple{ } in the .properties file
> Simple language work not properly together with Springs PropertyPlaceholderConfigurer
> -------------------------------------------------------------------------------------
>
> Key: CAMEL-3162
> URL: https://issues.apache.org/activemq/browse/CAMEL-3162
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.4.0
> Reporter: Christian Mueller
> Assignee: Claus Ibsen
> Fix For: 2.5.0
>
> Attachments: CAMEL-3162_unittest.patch
>
>
> I defined the to endpoint in my properties file as "file://target/outBox?fileName=test-${date:now:yyyyMMdd}.txt" and the written file has the name "test-now:yyyyMMdd.txt" instead of "test-20100926".
> See also [CAMEL-304|https://issues.apache.org/activemq/browse/CAMEL-304]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (CAMEL-3162) Simple language work not properly
together with Springs PropertyPlaceholderConfigurer
Posted by Claus Ibsen <cl...@gmail.com>.
On Sun, Sep 26, 2010 at 6:27 PM, Christian Müller
<ch...@gmail.com> wrote:
> It works if I use $simple{placeholder}.
>
> I opened this ticket because my attached unit test works with Camel 2.2.0
> (which use Spring 2.5.6 instead of 3.0.x). My understanding was that
> $simple{placeholder} is an alternative to ${placeholder} which also should
> work if I tell Springs PropertyPlaceholderConfigurer to ignore unresolvable
> placeholders...
No it may not work if you tell spring to ignore unresolvable
placeholder. You are 100% in the mercy of Spring when using their
placeholder feature.
And if Spring decide they want to remove the ${ } tokens and just
leave the pure text behind. Then Camel cannot detect the ${ } and act
according to it.
I would recommend to look if you can configure the spring property
placeholder to use other tokens than ${ }. I think it has such a
feature.
Later when you upgrade to Camel 2.5 or better, then you can use the
$simple{ } syntax and keep using the standard spring placeholder ${ }.
>
> Wondering why the file name is "test-now:yyyyMMdd.txt" and not
> "test-date:now:yyyyMMdd.txt" if Spring removes "${" and "}"...
>
> Christian
>
>
> On Sun, Sep 26, 2010 at 6:12 PM, Claus Ibsen (JIRA) <ji...@apache.org> wrote:
>
>>
>> [
>> https://issues.apache.org/activemq/browse/CAMEL-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62125#action_62125]
>>
>> Claus Ibsen commented on CAMEL-3162:
>> ------------------------------------
>>
>> Christian try with latest code from trunk and use $simple{ } in the
>> .properties file
>>
>> > Simple language work not properly together with Springs
>> PropertyPlaceholderConfigurer
>> >
>> -------------------------------------------------------------------------------------
>> >
>> > Key: CAMEL-3162
>> > URL:
>> https://issues.apache.org/activemq/browse/CAMEL-3162
>> > Project: Apache Camel
>> > Issue Type: Bug
>> > Components: camel-core
>> > Affects Versions: 2.4.0
>> > Reporter: Christian Mueller
>> > Assignee: Claus Ibsen
>> > Fix For: 2.5.0
>> >
>> > Attachments: CAMEL-3162_unittest.patch
>> >
>> >
>> > I defined the to endpoint in my properties file as
>> "file://target/outBox?fileName=test-${date:now:yyyyMMdd}.txt" and the
>> written file has the name "test-now:yyyyMMdd.txt" instead of
>> "test-20100926".
>> > See also [CAMEL-304|https://issues.apache.org/activemq/browse/CAMEL-304]
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: [jira] Commented: (CAMEL-3162) Simple language work not properly
together with Springs PropertyPlaceholderConfigurer
Posted by Christian Müller <ch...@gmail.com>.
It works if I use $simple{placeholder}.
I opened this ticket because my attached unit test works with Camel 2.2.0
(which use Spring 2.5.6 instead of 3.0.x). My understanding was that
$simple{placeholder} is an alternative to ${placeholder} which also should
work if I tell Springs PropertyPlaceholderConfigurer to ignore unresolvable
placeholders...
Wondering why the file name is "test-now:yyyyMMdd.txt" and not
"test-date:now:yyyyMMdd.txt" if Spring removes "${" and "}"...
Christian
On Sun, Sep 26, 2010 at 6:12 PM, Claus Ibsen (JIRA) <ji...@apache.org> wrote:
>
> [
> https://issues.apache.org/activemq/browse/CAMEL-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62125#action_62125]
>
> Claus Ibsen commented on CAMEL-3162:
> ------------------------------------
>
> Christian try with latest code from trunk and use $simple{ } in the
> .properties file
>
> > Simple language work not properly together with Springs
> PropertyPlaceholderConfigurer
> >
> -------------------------------------------------------------------------------------
> >
> > Key: CAMEL-3162
> > URL:
> https://issues.apache.org/activemq/browse/CAMEL-3162
> > Project: Apache Camel
> > Issue Type: Bug
> > Components: camel-core
> > Affects Versions: 2.4.0
> > Reporter: Christian Mueller
> > Assignee: Claus Ibsen
> > Fix For: 2.5.0
> >
> > Attachments: CAMEL-3162_unittest.patch
> >
> >
> > I defined the to endpoint in my properties file as
> "file://target/outBox?fileName=test-${date:now:yyyyMMdd}.txt" and the
> written file has the name "test-now:yyyyMMdd.txt" instead of
> "test-20100926".
> > See also [CAMEL-304|https://issues.apache.org/activemq/browse/CAMEL-304]
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>