You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2011/09/05 15:48:14 UTC

[jira] [Created] (CAMEL-4417) Move base classes used by components from impl to support

Move base classes used by components from impl to support
---------------------------------------------------------

                 Key: CAMEL-4417
                 URL: https://issues.apache.org/jira/browse/CAMEL-4417
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.8.0
            Reporter: Christian Schneider
            Assignee: Christian Schneider
             Fix For: 2.9.0


Several classes in impl are used or extended by components. We should avoid this.

The base classes should be moved to support. Examples are DefaultComponent, DefaultEndpoint, DefaultProducer.

Another case is the AsyncProcessorTypeConverter. The typeconverter is well placed in impl but the class also has a public static convert method that is used from many components. So this functionality should be moved to processor so it is available to components.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

RE: [jira] [Updated] (CAMEL-4417) Move base classes used by components from impl to support

Posted by Mathieu Lalonde <mr...@live.ca>.
Christian, 


> I moved the following classes without compat stubs as they were not needed outside camel-core:
> DefaultPollingConsumerPollStrategy, DefaultRouteNode, DefaultScheduledPollConsumer, DefaultSubUnitOfWork, DefaultTracedRouteNodes,
> EventDrivenPollingConsumer, ExpressionAdapter,
> InterceptSendToEndpoint,
> MDCUnitOfWork,
> MessageSupport,
> ProcessorPollingConsumer,
> SimpleUuidGenerator
>

I think you should consider providing compatibility stubs for some of these as well as they are available to component writers.  For example, DefaultScheduledPollConsumer is handy for rolling out a ScheduledPollConsumer based on a PollingConsumer.

Thanks,
Mathieu

 		 	   		  

[jira] [Commented] (CAMEL-4417) Move base classes used by components from impl to support

Posted by "james strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097145#comment-13097145 ] 

james strachan commented on CAMEL-4417:
---------------------------------------

Since this code change will break pretty much any component developed outside of the current source tree this should only be considered for 3.x

> Move base classes used by components from impl to support
> ---------------------------------------------------------
>
>                 Key: CAMEL-4417
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4417
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 3.0.0
>
>
> Several classes in impl are used or extended by components. We should avoid this.
> The base classes should be moved to support. Examples are DefaultComponent, DefaultEndpoint, DefaultProducer.
> Another case is the AsyncProcessorTypeConverter. The typeconverter is well placed in impl but the class also has a public static convert method that is used from many components. So this functionality should be moved to processor so it is available to components.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4417) Move base classes used by components from impl to support

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

james strachan updated CAMEL-4417:
----------------------------------

    Fix Version/s:     (was: 2.9.0)
                   3.0.0

> Move base classes used by components from impl to support
> ---------------------------------------------------------
>
>                 Key: CAMEL-4417
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4417
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 3.0.0
>
>
> Several classes in impl are used or extended by components. We should avoid this.
> The base classes should be moved to support. Examples are DefaultComponent, DefaultEndpoint, DefaultProducer.
> Another case is the AsyncProcessorTypeConverter. The typeconverter is well placed in impl but the class also has a public static convert method that is used from many components. So this functionality should be moved to processor so it is available to components.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4417) Move base classes used by components from impl to support

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

Claus Ibsen updated CAMEL-4417:
-------------------------------

    Fix Version/s:     (was: 2.9.0)
                   3.0.0
                   2.10
    
> Move base classes used by components from impl to support
> ---------------------------------------------------------
>
>                 Key: CAMEL-4417
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4417
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.10, 3.0.0
>
>         Attachments: CAMEL-4417-1.patch
>
>
> Several classes in impl are used or extended by components. We should avoid this.
> The base classes should be moved to support. Examples are DefaultComponent, DefaultEndpoint, DefaultProducer.
> Another case is the AsyncProcessorTypeConverter. The typeconverter is well placed in impl but the class also has a public static convert method that is used from many components. So this functionality should be moved to processor so it is available to components.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4417) Move base classes used by components from impl to support

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

Christian Schneider updated CAMEL-4417:
---------------------------------------

    Fix Version/s:     (was: 3.0.0)
                   2.9.0

> Move base classes used by components from impl to support
> ---------------------------------------------------------
>
>                 Key: CAMEL-4417
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4417
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.9.0
>
>         Attachments: CAMEL-4417-1.patch
>
>
> Several classes in impl are used or extended by components. We should avoid this.
> The base classes should be moved to support. Examples are DefaultComponent, DefaultEndpoint, DefaultProducer.
> Another case is the AsyncProcessorTypeConverter. The typeconverter is well placed in impl but the class also has a public static convert method that is used from many components. So this functionality should be moved to processor so it is available to components.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4417) Move base classes used by components from impl to support

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097163#comment-13097163 ] 

Christian Schneider commented on CAMEL-4417:
--------------------------------------------

I intend to create a stub class that extends the moved class in the old location. So I think this should be compatible. I would like to have such changes in 2.9.x as people then will have some time to adapt and they can already see where we are moving to


> Move base classes used by components from impl to support
> ---------------------------------------------------------
>
>                 Key: CAMEL-4417
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4417
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 3.0.0
>
>
> Several classes in impl are used or extended by components. We should avoid this.
> The base classes should be moved to support. Examples are DefaultComponent, DefaultEndpoint, DefaultProducer.
> Another case is the AsyncProcessorTypeConverter. The typeconverter is well placed in impl but the class also has a public static convert method that is used from many components. So this functionality should be moved to processor so it is available to components.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4417) Move base classes used by components from impl to support

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13099033#comment-13099033 ] 

Hadrian Zbarcea commented on CAMEL-4417:
----------------------------------------

@Christian, all the changes you make in 2.9 should be backwards compatible. So if you make any changes, please make sure leave existing classes in place (even as extensions of refactored classes) and change as few tests as possible, ideally none. That ensures two things: one that we didn't break anything and existing code still works, second that users have a migration path that could take at any time. We can remove the old classes later in 3.0.

Changes that break backward compatibility I'd leave for later.

> Move base classes used by components from impl to support
> ---------------------------------------------------------
>
>                 Key: CAMEL-4417
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4417
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 3.0.0
>
>         Attachments: CAMEL-4417-1.patch
>
>
> Several classes in impl are used or extended by components. We should avoid this.
> The base classes should be moved to support. Examples are DefaultComponent, DefaultEndpoint, DefaultProducer.
> Another case is the AsyncProcessorTypeConverter. The typeconverter is well placed in impl but the class also has a public static convert method that is used from many components. So this functionality should be moved to processor so it is available to components.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4417) Move base classes used by components from impl to support

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

Christian Schneider updated CAMEL-4417:
---------------------------------------

    Attachment: CAMEL-4417-1.patch

Patch moving all support classes from impl to support.

I moved the following classes and placed compatibility classes in their impl location:
DefaultAsyncProducer,
DefaultComponent,
DefaultConsumer,
DefaultEndpoint,
DefaultExchange,
DefaultMessage,
DefaultPollingEndpoint,
DefaultProducer,
DefaultUnitOfWork, 
ExpressionSupport,
HeaderFilterStrategyComponent,
InterceptSendToMockEndpointStrategy,
LoggingExceptionHandler,
PollingConsumerSupport,
ProcessorEndpoint,
ProducerCache,
ScheduledPollConsumer,
ScheduledPollEndpoint,

I moved the following classes without compat stubs as they were not needed outside camel-core:
DefaultPollingConsumerPollStrategy, DefaultRouteNode, DefaultScheduledPollConsumer, DefaultSubUnitOfWork, DefaultTracedRouteNodes,
EventDrivenPollingConsumer, ExpressionAdapter,
InterceptSendToEndpoint,
MDCUnitOfWork,
MessageSupport,
ProcessorPollingConsumer,
SimpleUuidGenerator

I moved AsyncProcessorConverterHelper from processor to util as it is needed from support.

The only problematic class I moved was DefaultConsumer as it needed AsyncProcessorConverterHelper. So the above including the inner class ProcessorToAsyncProcessorBridge had to move to util. The problem here was that the Bridge had to extend DelegateProcessor which of course is in processor. As util should not depend on processor I had to introduce an interface DelegateProcessor in camel that could be used to abstract from ProcessorToAsyncProcessorBridge, DelegateProcessor and DelegateAsyncProcessor. This is a good thing anyway and I will open a jira to do this first.

I also had to move PipelineHelper and SimpleUuidGeneratopr to util as they were used from support classes.

This is a fairly large patch. So I am not sure if it is good for 2.9. On the other hand if we wait with this till 3.0 we are either really incompatible or we can not remove the deprecated classes







> Move base classes used by components from impl to support
> ---------------------------------------------------------
>
>                 Key: CAMEL-4417
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4417
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 3.0.0
>
>         Attachments: CAMEL-4417-1.patch
>
>
> Several classes in impl are used or extended by components. We should avoid this.
> The base classes should be moved to support. Examples are DefaultComponent, DefaultEndpoint, DefaultProducer.
> Another case is the AsyncProcessorTypeConverter. The typeconverter is well placed in impl but the class also has a public static convert method that is used from many components. So this functionality should be moved to processor so it is available to components.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira