Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20080

Removal of getExtentions() is not mentioned in migration guide to Camel 4

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.0
    • 4.2.0
    • documentation
    • None
    • Unknown

    Description

      Based on this thread on the mailing list:

      https://lists.apache.org/thread/gkzpjsrdxwrc2jsh82vp92dzdlympjtf

      I create this issue to improve the migration guide from Camel 3.0 to 4.0

      In Camel 3 this code could be used:

      ManagedCamelContext managed = context.getExtension(ManagedCamelContext.class);

      The "getExtension()" method is however not part of the CamelContext class in Camel 4. This is not documented in the migration code to Camel4, as well as what alternative can be used.

      I think the following does the same (not sure):

      ManagedCamelContext managed = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);

      To be honest it would nice if the ManagedCamelContext could either be accessible directly from the CamelContext (similar to getCamelContextExtension) or the PluginHelper. Something like:

      context.getManagedCamelContext();
      

      or

      PluginHelper.getManagedCamelContext(); 

      Another note as mentioned on the mailing list. The API changes in the migration guide could be improved for removed/add/changed methods. It may be clearer to put them in a table, with one column (add / removed /changed), a column with old syntax and a column with the new syntax (if applicable).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              skin27 Raymond
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: