[jira] Created: (CAMEL-1392) groovy renderer

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 - 3 - 4 - 5 - 6 | Next >

[jira] Commented: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52868#action_52868 ]

Claus Ibsen commented on CAMEL-1392:
------------------------------------

Jonathan I assume you got it covered to get the patches into the codebase?

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch
>
>


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


[jira] Commented: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52878#action_52878 ]

Jonathan Anstey commented on CAMEL-1392:
----------------------------------------

Xueqiang,

I just committed your latest patch in rev 795901. Good work! Glad to see you are making progress supporting the various DSL methods. The hardcodings (like loadbalancer, byte[], etc..) still kinda worry me but are acceptable I guess since we have tests now that will let us know when things need to be updated.

Don't have any more comments at the moment. I suggest continuing with your work of supporting more of the DSL methods this week.

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch
>
>


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


[jira] Updated: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xueqiang Mi updated CAMEL-1392:
-------------------------------

    Attachment: camel-web-20090722.patch

Added:
1. javascript for avoiding to re-build a route without any changes;
2. encoder the endpoint URI (TODO task of [camel 1839|https://issues.apache.org/activemq/browse/CAMEL-1839])

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch, camel-web-20090722.patch
>
>


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


[jira] Commented: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52897#action_52897 ]

Jonathan Anstey commented on CAMEL-1392:
----------------------------------------

Looks great Xueqiang. Keep up the good work.

I've committed your patch here http://svn.apache.org/viewvc?rev=796685&view=rev

Cheers,
Jon

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch, camel-web-20090722.patch
>
>


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


Re: [jira] Created: (CAMEL-1392) groovy renderer

by xueqiang.mi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

1. When rendering a resequence DSL: from("direct:start").resequencer(body()).to("mock:result")"
   a getExpressionList method is required to obtain the expressions in ResequenceDefinition.
2. the AOPDefinition should provides some get methods for its beforeUri, afterUri and afterFinallyUri fields.

   I saw these fields have been annotated by using JAXB annotations. If these annotations can help to
get these fields, that's much better.

JIRA jira@apache.org wrote:
groovy renderer
---------------

                 Key: CAMEL-1392
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
             Project: Apache Camel
          Issue Type: Sub-task
            Reporter: James Strachan




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

Re: [jira] Created: (CAMEL-1392) groovy renderer

by willem.jiang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you don't want to hack the class with JAXB, you can add the get set
method on the Definition class yourself :)

Willem

xueqiang.mi wrote:

> 1. When rendering a resequence DSL:
> from("direct:start").resequencer(body()).to("mock:result")"
>    a getExpressionList method is required to obtain the expressions in
> ResequenceDefinition.
> 2. the AOPDefinition should provides some get methods for its beforeUri,
> afterUri and afterFinallyUri fields.
>
>    I saw these fields have been annotated by using JAXB annotations. If
> these annotations can help to
> get these fields, that's much better.
>
>
> JIRA jira@... wrote:
>> groovy renderer
>> ---------------
>>
>>                  Key: CAMEL-1392
>>                  URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>>              Project: Apache Camel
>>           Issue Type: Sub-task
>>             Reporter: James Strachan
>>
>>
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>>
>


Re: [jira] Created: (CAMEL-1392) groovy renderer

by xueqiang.mi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

all right, thanks.
I am gonna go on a vacation from Jul 23 to Aug 1. After it I will do that.

willem.jiang wrote:
If you don't want to hack the class with JAXB, you can add the get set
method on the Definition class yourself :)

Willem

xueqiang.mi wrote:
> 1. When rendering a resequence DSL:
> from("direct:start").resequencer(body()).to("mock:result")"
>    a getExpressionList method is required to obtain the expressions in
> ResequenceDefinition.
> 2. the AOPDefinition should provides some get methods for its beforeUri,
> afterUri and afterFinallyUri fields.
>
>    I saw these fields have been annotated by using JAXB annotations. If
> these annotations can help to
> get these fields, that's much better.
>
>
> JIRA jira@apache.org wrote:
>> groovy renderer
>> ---------------
>>
>>                  Key: CAMEL-1392
>>                  URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>>              Project: Apache Camel
>>           Issue Type: Sub-task
>>             Reporter: James Strachan
>>
>>
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>>
>

[jira] Updated: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xueqiang Mi updated CAMEL-1392:
-------------------------------

    Attachment: camel-20090806.patch

add OnException, OnCompletion, AOP and Resequence DSLs support

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-20090806.patch, camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch, camel-web-20090722.patch
>
>


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


[jira] Updated: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xueqiang Mi updated CAMEL-1392:
-------------------------------

    Attachment: camel-20090807.patch

Add split, interceptFrom, interceptSendToEndpoint dsl support
Improve loadBalancer, stream, streamCaching support

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-20090806.patch, camel-20090807.patch, camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch, camel-web-20090722.patch
>
>


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


[jira] Issue Comment Edited: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53528#action_53528 ]

Xueqiang Mi edited comment on CAMEL-1392 at 8/7/09 5:07 AM:
------------------------------------------------------------

add Split, InterceptFrom, InterceptSendToEndpoint DSL support
improve LoadBalancer, Stream, StreamCaching support

      was (Author: xueqiang.mi):
    Add split, interceptFrom, interceptSendToEndpoint dsl support
Improve loadBalancer, stream, streamCaching support
 

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-20090806.patch, camel-20090807.patch, camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch, camel-web-20090722.patch
>
>


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


[jira] Updated: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xueqiang Mi updated CAMEL-1392:
-------------------------------

    Attachment: camel-20090808.patch

add renderRoutes method for groovy renderer
improve InterceptFrom support

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-20090806.patch, camel-20090807.patch, camel-20090808.patch, camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch, camel-web-20090722.patch
>
>


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


[jira] Updated: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xueqiang Mi updated CAMEL-1392:
-------------------------------

    Attachment: camel-20090810.patch

add Rollback, Stop DSL support
improve predicateRenderer and add test cases for it.

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-20090806.patch, camel-20090807.patch, camel-20090808.patch, camel-20090810.patch, camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch, camel-web-20090722.patch
>
>


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


[jira] Commented: (CAMEL-1392) groovy renderer

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53585#action_53585 ]

Jonathan Anstey commented on CAMEL-1392:
----------------------------------------

Xueqiang,

I just committed your latest patch. Keep up the good work!

http://svn.apache.org/viewvc?rev=803128&view=rev

> groovy renderer
> ---------------
>
>                 Key: CAMEL-1392
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>             Project: Apache Camel
>          Issue Type: Sub-task
>            Reporter: James Strachan
>            Assignee: Xueqiang Mi
>         Attachments: camel-20090806.patch, camel-20090807.patch, camel-20090808.patch, camel-20090810.patch, camel-web-20090629.patch, camel-web-20090703.patch, camel-web-20090705.patch, camel-web-20090708.patch, camel-web-20090716.patch, camel-web-20090717.patch, camel-web-20090718.patch, camel-web-20090722.patch
>
>


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


Re: [jira] Created: (CAMEL-1392) groovy renderer

by xueqiang.mi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I want to understand how RouteContext or Registry register and then look up a new Processor object when  receive some DSL which contains new Processor object, like the following one:
{code}
MyValidator validator = new MyValidator();
from("direct:start")
                    .doTry()
                        .process(validator).to("mock:valid")
                    .doCatch(ValidationException.class)
                        .to("mock:invalid")
{code}
1. Does the route/processor definition maintain the processor name "validator" somewhere?
2. If the processor is registered, how can I get the object and translate it into a processor reference when rendering it. I want to render the above DSL into:
{code}
from("direct:start")
                    .doTry()
                        .processRef("someName or some registeredKey").to("mock:valid")
                    .doCatch(ValidationException.class)
                        .to("mock:invalid")
{code}

Thanks
JIRA jira@apache.org wrote:
groovy renderer
---------------

                 Key: CAMEL-1392
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
             Project: Apache Camel
          Issue Type: Sub-task
            Reporter: James Strachan




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

Re: [jira] Created: (CAMEL-1392) groovy renderer

by Claus Ibsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

This is not possible as a processor instance is inlined directly. It
is not registered anywhere.
Only processorRef uses a reference to a Processor in the registry.

Its only the Java DSL that has this feature (inlined/anonymous
processors ) as in Spring DSL you need to use a reference to a spring
bean.


On Wed, Aug 12, 2009 at 10:04 AM, xueqiang.mi<alloyer@...> wrote:

>
> Hi,
> I want to understand how RouteContext or Registry register and then look up
> a new Processor object when  receive some DSL which contains new Processor
> object, like the following one:
> {code}
> MyValidator validator = new MyValidator();
> from("direct:start")
>                    .doTry()
>                        .process(validator).to("mock:valid")
>                    .doCatch(ValidationException.class)
>                        .to("mock:invalid")
> {code}
> 1. Does the route/processor definition maintain the processor name
> "validator" somewhere?
> 2. If the processor is registered, how can I get the object and translate it
> into a processor reference when rendering it. I want to render the above DSL
> into:
> {code}
> from("direct:start")
>                    .doTry()
>                        .processRef("someName or some
> registeredKey").to("mock:valid")
>                    .doCatch(ValidationException.class)
>                        .to("mock:invalid")
> {code}
>
> Thanks
>
> JIRA jira@... wrote:
>>
>> groovy renderer
>> ---------------
>>
>>                  Key: CAMEL-1392
>>                  URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>>              Project: Apache Camel
>>           Issue Type: Sub-task
>>             Reporter: James Strachan
>>
>>
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-jira--Created%3A-%28CAMEL-1392%29-groovy-renderer-tp22220288p24931669.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



--
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [jira] Created: (CAMEL-1392) groovy renderer

by xueqiang.mi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All right, it seems we have no way to support the "bean" and "process" DSL rendering now.

Claus Ibsen-2 wrote:
Hi

This is not possible as a processor instance is inlined directly. It
is not registered anywhere.
Only processorRef uses a reference to a Processor in the registry.

Its only the Java DSL that has this feature (inlined/anonymous
processors ) as in Spring DSL you need to use a reference to a spring
bean.


On Wed, Aug 12, 2009 at 10:04 AM, xueqiang.mi<alloyer@gmail.com> wrote:
>
> Hi,
> I want to understand how RouteContext or Registry register and then look up
> a new Processor object when  receive some DSL which contains new Processor
> object, like the following one:
> {code}
> MyValidator validator = new MyValidator();
> from("direct:start")
>                    .doTry()
>                        .process(validator).to("mock:valid")
>                    .doCatch(ValidationException.class)
>                        .to("mock:invalid")
> {code}
> 1. Does the route/processor definition maintain the processor name
> "validator" somewhere?
> 2. If the processor is registered, how can I get the object and translate it
> into a processor reference when rendering it. I want to render the above DSL
> into:
> {code}
> from("direct:start")
>                    .doTry()
>                        .processRef("someName or some
> registeredKey").to("mock:valid")
>                    .doCatch(ValidationException.class)
>                        .to("mock:invalid")
> {code}
>
> Thanks
>
> JIRA jira@apache.org wrote:
>>
>> groovy renderer
>> ---------------
>>
>>                  Key: CAMEL-1392
>>                  URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>>              Project: Apache Camel
>>           Issue Type: Sub-task
>>             Reporter: James Strachan
>>
>>
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-jira--Created%3A-%28CAMEL-1392%29-groovy-renderer-tp22220288p24931669.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



--
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [jira] Created: (CAMEL-1392) groovy renderer

by Claus Ibsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 12, 2009 at 10:35 AM, xueqiang.mi<alloyer@...> wrote:
>
> All right, it seems we have no way to support the "bean" and "process" DSL
> rendering now.
>

Yeah that is fine, we cant do 100%. And there are fine solutions for
people to use xxxRef instead.
Maybe in the future we can do some magic under the covers.


>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> This is not possible as a processor instance is inlined directly. It
>> is not registered anywhere.
>> Only processorRef uses a reference to a Processor in the registry.
>>
>> Its only the Java DSL that has this feature (inlined/anonymous
>> processors ) as in Spring DSL you need to use a reference to a spring
>> bean.
>>
>>
>> On Wed, Aug 12, 2009 at 10:04 AM, xueqiang.mi<alloyer@...> wrote:
>>>
>>> Hi,
>>> I want to understand how RouteContext or Registry register and then look
>>> up
>>> a new Processor object when  receive some DSL which contains new
>>> Processor
>>> object, like the following one:
>>> {code}
>>> MyValidator validator = new MyValidator();
>>> from("direct:start")
>>>                    .doTry()
>>>                        .process(validator).to("mock:valid")
>>>                    .doCatch(ValidationException.class)
>>>                        .to("mock:invalid")
>>> {code}
>>> 1. Does the route/processor definition maintain the processor name
>>> "validator" somewhere?
>>> 2. If the processor is registered, how can I get the object and translate
>>> it
>>> into a processor reference when rendering it. I want to render the above
>>> DSL
>>> into:
>>> {code}
>>> from("direct:start")
>>>                    .doTry()
>>>                        .processRef("someName or some
>>> registeredKey").to("mock:valid")
>>>                    .doCatch(ValidationException.class)
>>>                        .to("mock:invalid")
>>> {code}
>>>
>>> Thanks
>>>
>>> JIRA jira@... wrote:
>>>>
>>>> groovy renderer
>>>> ---------------
>>>>
>>>>                  Key: CAMEL-1392
>>>>                  URL:
>>>> https://issues.apache.org/activemq/browse/CAMEL-1392
>>>>              Project: Apache Camel
>>>>           Issue Type: Sub-task
>>>>             Reporter: James Strachan
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> This message is automatically generated by JIRA.
>>>> -
>>>> You can reply to this email to add a comment to the issue online.
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-jira--Created%3A-%28CAMEL-1392%29-groovy-renderer-tp22220288p24931669.html
>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-jira--Created%3A-%28CAMEL-1392%29-groovy-renderer-tp22220288p24931863.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



--
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [jira] Created: (CAMEL-1392) groovy renderer

by xueqiang.mi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
When I tested the intercept DSL, I encountered a problem.
I found sometimes the route maintains the intercept definition as a output processor in outputs list, but sometimes, it hold the intercept configuration in its interceptStrategies list. I don't what causes the difference and how to differentiate them.

JIRA jira@apache.org wrote:
groovy renderer
---------------

                 Key: CAMEL-1392
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
             Project: Apache Camel
          Issue Type: Sub-task
            Reporter: James Strachan




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

Re: [jira] Created: (CAMEL-1392) groovy renderer

by xueqiang.mi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I found that the addRouteDefinitions method of camel context caused this problem. It seems that this method transform the interceptDefinition into a interceptStrategy.
Before updating a route, I use a temporary camel context to generate the route definition from a route builder, so I can obtain the route definition and reserve its id. Code is as follows:
{code}
       // add the route builder into a temporary camel context
        CamelContext tempContext = new DefaultCamelContext();
        tempContext.addRoutes(builder);
        // get all the added routes and add them into current context
        List<RouteDefinition> routeDefinitions = tempContext.getRouteDefinitions();
        for (int i = 0; i < routeDefinitions.size(); i++) {
            RouteDefinition routeDefinition = routeDefinitions.get(i);
            // set id only for the first route
            if (i == 0)
                routeDefinition.setId(id);

            // add or update the route
            getCamelContext().addRouteDefinitions(Collections.singletonList(routeDefinition));
        }
{code}

Then the addRouteDefinitions method is used to add the route definition to current camel context and it causes that problem: transforming the interceptDefinition into a interceptStrategy. Through test, this operation has brought some other similar problems for other DSLs.

Are there any suggestions to solve it?

Hi,
When I tested the intercept DSL, I encountered a problem.
I found sometimes the route maintains the intercept definition as a output processor in outputs list, but sometimes, it hold the intercept configuration in its interceptStrategies list. I don't what causes the difference and how to differentiate them.

JIRA jira@apache.org wrote:
groovy renderer
---------------

                 Key: CAMEL-1392
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
             Project: Apache Camel
          Issue Type: Sub-task
            Reporter: James Strachan




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


Re: [jira] Created: (CAMEL-1392) groovy renderer

by janstey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't think you should be taking route definitions from one camel context
and loading them into another... I'm surprised this actually works! Also,
I'm not really following why you need a 2nd context to set the id... did you
try just using one?

On Thu, Aug 13, 2009 at 10:19 AM, xueqiang.mi <alloyer@...> wrote:

>
> I found that the addRouteDefinitions method of camel context caused this
> problem. It seems that this method transform the interceptDefinition into a
> interceptStrategy.
> Before updating a route, I use a temporary camel context to generate the
> route definition from a route builder, so I can obtain the route definition
> and reserve its id. Code is as follows:
> {code}
>       // add the route builder into a temporary camel context
>        CamelContext tempContext = new DefaultCamelContext();
>        tempContext.addRoutes(builder);
>        // get all the added routes and add them into current context
>        List<RouteDefinition> routeDefinitions =
> tempContext.getRouteDefinitions();
>        for (int i = 0; i < routeDefinitions.size(); i++) {
>            RouteDefinition routeDefinition = routeDefinitions.get(i);
>            // set id only for the first route
>            if (i == 0)
>                routeDefinition.setId(id);
>
>            // add or update the route
>
>
> getCamelContext().addRouteDefinitions(Collections.singletonList(routeDefinition));
>        }
> {code}
>
> Then the addRouteDefinitions method is used to add the route definition to
> current camel context and it causes that problem: transforming the
> interceptDefinition into a interceptStrategy. Through test, this operation
> has brought some other similar problems for other DSLs.
>
> Are there any suggestions to solve it?
>
> xueqiang.mi wrote:
> >
> > Hi,
> > When I tested the intercept DSL, I encountered a problem.
> > I found sometimes the route maintains the intercept definition as a
> output
> > processor in outputs list, but sometimes, it hold the intercept
> > configuration in its interceptStrategies list. I don't what causes the
> > difference and how to differentiate them.
> >
> >
> > JIRA jira@... wrote:
> >>
> >> groovy renderer
> >> ---------------
> >>
> >>                  Key: CAMEL-1392
> >>                  URL:
> >> https://issues.apache.org/activemq/browse/CAMEL-1392
> >>              Project: Apache Camel
> >>           Issue Type: Sub-task
> >>             Reporter: James Strachan
> >>
> >>
> >>
> >>
> >> --
> >> This message is automatically generated by JIRA.
> >> -
> >> You can reply to this email to add a comment to the issue online.
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-jira--Created%3A-%28CAMEL-1392%29-groovy-renderer-tp22220288p24954096.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>


--
Cheers,
Jon

http://janstey.blogspot.com/
< Prev | 1 - 2 - 3 - 4 - 5 - 6 | Next >