You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "slad (JIRA)" <ji...@apache.org> on 2009/07/23 23:48:34 UTC

[jira] Created: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Velocity Component: Ability to specify velcoity resource/template as message header
-----------------------------------------------------------------------------------

                 Key: CAMEL-1850
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-spring
            Reporter: slad


It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.


Something like -
	
from("direct:start")
.setHeader("velocityTemplate", "orderDisplay.vm"); 
.to("velocity:dummyTemplate.vm") 

Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53886#action_53886 ] 

Stan Lewis commented on CAMEL-1850:
-----------------------------------

yeah, can do...

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>            Assignee: Stan Lewis
>             Fix For: 2.1.0
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work stopped: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-1850 stopped by Stan Lewis.

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>            Assignee: Stan Lewis
>             Fix For: 2.1.0
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52938#action_52938 ] 

Claus Ibsen commented on CAMEL-1850:
------------------------------------

Should be coded in the camel-spring since its the base for the other template components such as freemarker and stringtemplate as well.

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>             Fix For: 2.1.0
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54270#action_54270 ] 

Stan Lewis commented on CAMEL-1850:
-----------------------------------

Updated the wiki BTW...

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>            Assignee: Stan Lewis
>             Fix For: 2.1.0
>
>         Attachments: patch.txt
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-1850:
----------------------------------

    Assignee: Stan Lewis

Stan you want to take a stab at this? It improves at least 3 components, all the template based :)

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>            Assignee: Stan Lewis
>             Fix For: 2.1.0
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54176#action_54176 ] 

Claus Ibsen commented on CAMEL-1850:
------------------------------------

Applied patch with thanks to Stan

trunk: 814110.

Stan do you mind updating the wiki documentation at:
http://camel.apache.org/velocity

To include some text about this new feature. And remember to state that it requires *Camel 2.1* in bold.


> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>            Assignee: Stan Lewis
>             Fix For: 2.1.0
>
>         Attachments: patch.txt
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1850.
--------------------------------

    Resolution: Fixed

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>            Assignee: Stan Lewis
>             Fix For: 2.1.0
>
>         Attachments: patch.txt
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Lewis updated CAMEL-1850:
------------------------------

    Attachment: patch.txt

I looked into implementing this in camel-spring's ResourceBasedEndpoint but it felt like the solution was starting to get really complicated as that endpoint is designed to only manage one resource.  This way is definitely a lot simpler and I think is a good approach to implementing this feature.

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>            Assignee: Stan Lewis
>             Fix For: 2.1.0
>
>         Attachments: patch.txt
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1850:
-------------------------------

    Fix Version/s: 2.1.0
       Issue Type: New Feature  (was: Improvement)

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>             Fix For: 2.1.0
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (CAMEL-1850) Velocity Component: Ability to specify velcoity resource/template as message header

Posted by "Stan Lewis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-1850 started by Stan Lewis.

> Velocity Component: Ability to specify velcoity resource/template as message header
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1850
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1850
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-spring
>            Reporter: slad
>            Assignee: Stan Lewis
>             Fix For: 2.1.0
>
>
> It would be nice to have a message header that can be used to specify which velocity template to be used for the message. This allows to dynamically use different templates while still preserving velocity endpoint cache. In real life you will have more than 1 template and you use of template will change from message to message.
> Something like -
> 	
> from("direct:start")
> .setHeader("velocityTemplate", "orderDisplay.vm"); 
> .to("velocity:dummyTemplate.vm") 
> Currently to achieve this you have to define custom bean or some processor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.