camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-1708) Allow for the selection of Routes during package scan using Ant like Path matching
Date Tue, 16 Jun 2009 05:48:35 GMT

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

Claus Ibsen commented on CAMEL-1708:
------------------------------------

Hi

Could you split the patch into 2 files: 1 files for came-core and another for camel-spring?
I hate applying big patch to SVN its painful when it gets messy (looking forward to git)

And please also undo all the code formatting you have done in files that hasn't anything to
do with this new feature.

For instance you should not change the existing code layout such as:
{code}
-        // do special preparation for some concepts such as interceptors and policies
-        // this is needed as JAXB does not build excaclty the same model definition as Spring
DSL would do
-        // using route builders. So we have here a little custom code to fix the JAXB gaps
+        // do special preparation for some concepts such as interceptors and
+        // policies
+        // this is needed as JAXB does not build excaclty the same model
+        // definition as Spring DSL would do
+        // using route builders. So we have here a little custom code to fix the
+        // JAXB gaps
{code}

If not then I need to go over and do that manually. We want to keep the existing format and
only
apply patches that fixes the issue its subject to.


And btw PackageScanDefinition should be added to {{jaxb.index}} file. Something that is very
often forgotten.

> Allow for the selection of Routes during package scan using Ant like Path matching
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1708
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1708
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-spring
>    Affects Versions: 2.0-M1
>            Reporter: Stephen Gargan
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: patch.txt, patch.txt
>
>
> Attached is a patch to allow for Routes to be included and excluded using ant like path
patterns. Packages to be scanned are supplied as ususal, but whether the Route classes discovered
in these packages are included is now also controlled by sets of include and exclude filters.

> This mechanism is defined as a subelement of the CamelContext definition in Spring context
as follows. 
> <camelContext xmlns="http://camel.apache.org/schema/spring">
>     <packageScan>
>       <packages>org.apache.camel.spring.config.scan</packages>
>       <exclude>**/*Excluded*</exclude>
>       <include>**/*Included*</include>
>     </packageScan>
>     ....
> </camelContext>
> It leverages Spring's AntPathMatcher to match fully qualified class names against the
supplied patterns. The existing <package></package> definition has been deprecated
and will emit a log message suggesting the new mechanism.
> This patch also includes code to allow Routes to be selectively excluded via class matching
at test time. i.e.
> public class RouteExcludingSpringTest extends SpringTestSupport {
>     @Override
>     protected AbstractXmlApplicationContext createApplicationContext() {
>         return new ClassPathXmlApplicationContext(new String[] {"routes-context.xml"},
getRouteExcludingApplicationContext());
>     }
>     ....
>     @Override
>     protected Class excludeRoute() {
>         return MyExcludedRouteBuilder.class;
>     }
> }  
> I hope you can find this usefull. I'll be happy to make any changes you might suggest.
> rgds,
> Stephen

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


Mime
View raw message