You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Babak Vahdat (JIRA)" <ji...@apache.org> on 2012/11/16 15:54:12 UTC
[jira] [Created] (CAMEL-5796) The combination of the transacted DSL
together with the or prohibits to resolve the
properties properly.
Babak Vahdat created CAMEL-5796:
-----------------------------------
Summary: The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
Key: CAMEL-5796
URL: https://issues.apache.org/jira/browse/CAMEL-5796
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.10.2
Reporter: Babak Vahdat
Given the property {{myKey}} defined as:
{code}
myKey=myValue
{code}
Then consider the following trivial route:
{code:xml}
<route>
<from uri="activemq:queue:okay" />
<transacted />
<setHeader headerName="myHeader">
<constant>{{myKey}}</constant>
</setHeader>
<to uri="mock:test" />
</route>
{code}
Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5796) The combination of the transacted
DSL together with the or prohibits to resolve the
properties properly.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499821#comment-13499821 ]
Claus Ibsen commented on CAMEL-5796:
------------------------------------
Babak, I suggest you mix our patches. So its the fix from my patch in the core, and then add your additional unit tests as well. Then we have the optional fix for this.
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
> Fix For: 2.9.5, 2.10.3, 2.11.0
>
> Attachments: CAMEL-5796-fix.patch, CAMEL-5796.patch
>
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-5796) The combination of the transacted DSL
together with the or prohibits to resolve the
properties properly.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-5796:
-------------------------------
Fix Version/s: 2.11.0
2.10.3
2.9.5
The workaround is to use <simple>${properties:myKey}</simple> instead.
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
> Fix For: 2.9.5, 2.10.3, 2.11.0
>
> Attachments: CAMEL-5796-fix.patch, CAMEL-5796.patch
>
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5796) The combination of the transacted
DSL together with the or prohibits to resolve the
properties properly.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499788#comment-13499788 ]
Claus Ibsen commented on CAMEL-5796:
------------------------------------
The patch is a good attempt in the correct file to fix this issue. Though as you have noticed it worked fine without the transacted policy.
The issue is that when you use transacted/policy, it wraps the outputs, and then its a bit different logic that creates the child processors, than if the transacted was not there. And that part of the code was missing logic that pre-prepares the definitions before the processors is created.
I am attaching a better patch with this fix.
Also we can have unit test in camel-core, as you can use policy instead of transacted. They are the same.
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
> Attachments: CAMEL-5796-fix.patch, CAMEL-5796.patch
>
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAMEL-5796) The combination of the transacted
DSL together with the or prohibits to resolve the
properties properly.
Posted by "Babak Vahdat (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Babak Vahdat reassigned CAMEL-5796:
-----------------------------------
Assignee: Babak Vahdat
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
> Assignee: Babak Vahdat
> Fix For: 2.9.5, 2.10.3, 2.11.0
>
> Attachments: CAMEL-5796-fix.patch, CAMEL-5796.patch
>
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-5796) The combination of the transacted DSL
together with the or prohibits to resolve the
properties properly.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-5796:
-------------------------------
Attachment: CAMEL-5796-fix.patch
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
> Attachments: CAMEL-5796-fix.patch, CAMEL-5796.patch
>
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5796) The combination of the transacted
DSL together with the or prohibits to resolve the
properties properly.
Posted by "Babak Vahdat (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498982#comment-13498982 ]
Babak Vahdat commented on CAMEL-5796:
-------------------------------------
Tried this through all the 2.10.x as well as the 2.9.x releases and it doesn't work. So concluding no regression being broken.
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-5796) The combination of the transacted DSL
together with the or prohibits to resolve the
properties properly.
Posted by "Babak Vahdat (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Babak Vahdat updated CAMEL-5796:
--------------------------------
Attachment: CAMEL-5796.patch
Attaching a potential patch which would resolve this (including unit-test).
Would appreciate any feedback the experienced riders would give about this.
Right now with this patch in place on my workspace I'm running a full build to verify no potential side-effect.
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
> Attachments: CAMEL-5796.patch
>
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5796) The combination of the transacted
DSL together with the or prohibits to resolve the
properties properly.
Posted by "Babak Vahdat (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499829#comment-13499829 ]
Babak Vahdat commented on CAMEL-5796:
-------------------------------------
O.K. thanks for your support. :-)
Just give me please a bit time then I'll commit the fix and close this ticket (hopefully tomorrow).
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
> Fix For: 2.9.5, 2.10.3, 2.11.0
>
> Attachments: CAMEL-5796-fix.patch, CAMEL-5796.patch
>
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CAMEL-5796) The combination of the transacted
DSL together with the or prohibits to resolve the
properties properly.
Posted by "Babak Vahdat (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Babak Vahdat resolved CAMEL-5796.
---------------------------------
Resolution: Fixed
Still added another test using the bridgePropertyPlaceholder Camel Bean to make sure this variant would work as well, but only applied on the trunk & the 2.10.x branch (available since 2.10.0). Thanks to Claus for providing a better patch.
> The combination of the transacted DSL together with the <setHeader> or <setBody> prohibits to resolve the properties properly.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5796
> URL: https://issues.apache.org/jira/browse/CAMEL-5796
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Babak Vahdat
> Assignee: Babak Vahdat
> Fix For: 2.9.5, 2.10.3, 2.11.0
>
> Attachments: CAMEL-5796-fix.patch, CAMEL-5796.patch
>
>
> Given the property {{myKey}} defined as:
> {code}
> myKey=myValue
> {code}
> Then consider the following trivial route:
> {code:xml}
> <route>
> <from uri="activemq:queue:okay" />
> <transacted />
> <setHeader headerName="myHeader">
> <constant>{{myKey}}</constant>
> </setHeader>
> <to uri="mock:test" />
> </route>
> {code}
> Because of the usage of the {{transacted}} DSL the property placeholder {{{{myKey}}}} will not be resolved to {{myValue}} properly. This behaviour would disappear if you would remove the {{transacted}} DSL. And I'm observing the same behaviour using the {{setBody}} DSL as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira