You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Dixon Whitmire (Jira)" <ji...@apache.org> on 2020/06/13 02:37:00 UTC

[jira] [Updated] (CAMEL-15183) Exclude Abstract Classes From Package Scanning

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

Dixon Whitmire updated CAMEL-15183:
-----------------------------------
    Description: 
My team is developing a "stand-alone" Camel Main application which utilizes route builder discovery using the package scanning feature. The [current implementation|https://github.com/apache/camel/blob/master/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java#L409] instantiates any class within the package which extend RouteBuilder. If an abstract class which extends RouteBuilder is in the package, the Camel Context fails to load since the abstract class cannot be instantiated.

Our application currently utilizes an abstract class within a "scanned" package, so we wanted to see if the scanning algorithm could be updated to exclude abstract classes.

This PR u[pdates the package|https://github.com/apache/camel/pull/3911] scanning algorithm and the corresponding test case.

  was:
My team is developing a "stand-alone" Camel Main application which utilizes route builder discovery using the package scanning feature. The [current implementation|https://github.com/apache/camel/blob/master/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java#L409] instantiates any class within the package which extend RouteBuilder. If an abstract class which extends RouteBuilder is in the package, the Camel Context fails to load since the abstract class cannot be instantiated. 

Our application currently utilizes an abstract class within a "scanned" package, so we wanted to see if the scanning algorithm could be updated to exclude abstract classes.

This PR updates the package scanning algorithm and the corresponding test case.


> Exclude Abstract Classes From Package Scanning
> ----------------------------------------------
>
>                 Key: CAMEL-15183
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15183
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-main
>    Affects Versions: 3.3.0
>            Reporter: Dixon Whitmire
>            Priority: Major
>
> My team is developing a "stand-alone" Camel Main application which utilizes route builder discovery using the package scanning feature. The [current implementation|https://github.com/apache/camel/blob/master/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java#L409] instantiates any class within the package which extend RouteBuilder. If an abstract class which extends RouteBuilder is in the package, the Camel Context fails to load since the abstract class cannot be instantiated.
> Our application currently utilizes an abstract class within a "scanned" package, so we wanted to see if the scanning algorithm could be updated to exclude abstract classes.
> This PR u[pdates the package|https://github.com/apache/camel/pull/3911] scanning algorithm and the corresponding test case.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)