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

Add getContext() method to ProducerTemplate interface

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.10.2
    • 2.10.3, 2.11.0
    • camel-core
    • None
    • Moderate

    Description

      Relative to issue SMX4-1281 and CAMEL-5299, CamelContextAware interface doesn't work correctly on blueprint+servicemix and so could be helpful permit to retrieve CamelContext from ProducerTemplate, in this way through @EndpointInjection i can inject ProducerTemplate object and then on my method do something like this:
      CamelContext context = producer.getContext();

      Currently, a workaround is this:
      CamelContext context = ((DefaultProducerTemplate)producer).getContext();

      but a clean solution is best.

      On DefaultProducerTemplate is already available getContext so add getContext() on ProducerTemplate interface is easy (I don't know what are others classes that implements ProducerTemplate).

      I hope for this in camel-2.10.3 (and on smx-4.5.x)

      Thanks

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            geaaru Ge@@ru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment