[jira] Created: (CAMEL-3254) Cannot set multiple route policies on a route in Spring

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-3254) Cannot set multiple route policies on a route in Spring

JIRA jira@apache.org
Cannot set multiple route policies on a route in Spring
-------------------------------------------------------

                 Key: CAMEL-3254
                 URL: https://issues.apache.org/activemq/browse/CAMEL-3254
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.4.0
            Reporter: Fintan Bolton


The Spring grammar does not seem to provide a way of specifying multiple policies. E.g.

<route routePolicyRef="myFirstPolicy">
   ...
</route>

There is nowhere to inject a second policy, because there is only one attribute provided.

While it is possible to set multiple unrelated policies (for e.g ScheduledRoutePolicy and say Shiro SecurityPolicy) which necessitate a different Spring XML fragment, it is not possible at the moment to set multiple policy sets in Spring against a route. It is possible to set up different start, stop, suspend & resume times in the same policy.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-3254) Cannot set multiple route policies on a route in Spring

JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-3254:
------------------------------------

The shiro is actually done on the route

{code}
<route>
   <poiicy ref="shiroStuff"/>
   ..
</route>
{code}

But nevertheless I guess you may want multiple route policies, to throttle and have a "sleep for the night" policy.
You may also have a "sorry this app is in maintenance mode" policy where you can control it some custom way.

So a good idea to support.

An idea could be to support having support for specifying multiple in XML separated using comma
{code:xml}
<route routePolicyRef="myFirstPolicy, mySecondPolicy, myThirdPolicy">
...
</route>
{code}


> Cannot set multiple route policies on a route in Spring
> -------------------------------------------------------
>
>                 Key: CAMEL-3254
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3254
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.4.0
>            Reporter: Fintan Bolton
>
> The Spring grammar does not seem to provide a way of specifying multiple policies. E.g.
> <route routePolicyRef="myFirstPolicy">
>    ...
> </route>
> There is nowhere to inject a second policy, because there is only one attribute provided.
> While it is possible to set multiple unrelated policies (for e.g ScheduledRoutePolicy and say Shiro SecurityPolicy) which necessitate a different Spring XML fragment, it is not possible at the moment to set multiple policy sets in Spring against a route. It is possible to set up different start, stop, suspend & resume times in the same policy.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-3254) Cannot set multiple route policies on a route in Spring

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-3254:
------------------------------------

And btw we should make sure you can specify multiple in Java DSL
You may do the same by using comma.

I think the current logic in the code is that there is only 1 policy supported currently.


> Cannot set multiple route policies on a route in Spring
> -------------------------------------------------------
>
>                 Key: CAMEL-3254
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3254
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.4.0
>            Reporter: Fintan Bolton
>
> The Spring grammar does not seem to provide a way of specifying multiple policies. E.g.
> <route routePolicyRef="myFirstPolicy">
>    ...
> </route>
> There is nowhere to inject a second policy, because there is only one attribute provided.
> While it is possible to set multiple unrelated policies (for e.g ScheduledRoutePolicy and say Shiro SecurityPolicy) which necessitate a different Spring XML fragment, it is not possible at the moment to set multiple policy sets in Spring against a route. It is possible to set up different start, stop, suspend & resume times in the same policy.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-3254) Cannot set multiple route policies on a route in Spring

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Ashwin Karpe reassigned CAMEL-3254:
-----------------------------------

    Assignee: Ashwin Karpe

> Cannot set multiple route policies on a route in Spring
> -------------------------------------------------------
>
>                 Key: CAMEL-3254
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3254
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.4.0
>            Reporter: Fintan Bolton
>            Assignee: Ashwin Karpe
>
> The Spring grammar does not seem to provide a way of specifying multiple policies. E.g.
> <route routePolicyRef="myFirstPolicy">
>    ...
> </route>
> There is nowhere to inject a second policy, because there is only one attribute provided.
> While it is possible to set multiple unrelated policies (for e.g ScheduledRoutePolicy and say Shiro SecurityPolicy) which necessitate a different Spring XML fragment, it is not possible at the moment to set multiple policy sets in Spring against a route. It is possible to set up different start, stop, suspend & resume times in the same policy.

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