You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raymond (Jira)" <ji...@apache.org> on 2022/09/30 11:03:00 UTC

[jira] [Commented] (CAMEL-14824) Extend Camel Context functionnalities through the Extension mechanism

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

Raymond commented on CAMEL-14824:
---------------------------------

In addition to extending the "Extension mechanism", it would be nice if this could be documented as well. What is it? Why do we need it? And how to use it?

I am for example wondering how dynamic the extension mechanism is, for example can extensions be added on startup/during runtime?

> Extend Camel Context functionnalities through the Extension mechanism 
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-14824
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14824
>             Project: Camel
>          Issue Type: New Feature
>          Components: came-core
>            Reporter: Luca Burgazzoli
>            Priority: Major
>             Fix For: 4.0
>
>
> [This commit |https://github.com/apache/camel/commit/0f8ad1a3a42f1f50e863a8b2ff092cd6df3df43b] introduces some new API to the ExtendedCamelContext which is fine but in order to reduce the APIs we could evaluate to extend the functionalities of the context  through the extension mechanism, i.e. the same functionality of the commit could be implemented as:
> {code:java}
>     context.getExtension(RestBindingJaxbDataFormatFactory.class)
>         ifPresent(extensions -> extension.setupJaxb(...))
> {code}
> Extension can then be discovered through:
> # internal-cache
> # registry
> # factory finder (file)
> We can use a class name convention for the factory file:
> {code}
>      META-INF/services/org/apache/camel/services/RestBindingJaxbDataFormatFactory
> {code}
> or
> {code}  
>     META-INF/services/org/apache/camel/services/rest-binding-jaxb-dataormat-factory
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)