You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/12/15 06:19:00 UTC

[jira] [Commented] (CAMEL-17337) FhirComponent regression between 2.2x and 3.x releases

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

Claus Ibsen commented on CAMEL-17337:
-------------------------------------

You are welcome to attempt to submit a PR to fix this

> FhirComponent regression between 2.2x and 3.x releases
> ------------------------------------------------------
>
>                 Key: CAMEL-17337
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17337
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-fhir
>    Affects Versions: 3.x
>            Reporter: Paul Coombes
>            Priority: Minor
>
> In the 3.x branches, the FhirComponent contains a FhirConfiguration property which results in the getClient method creating a new IGenericClient from the method supplied configuration due to the configuration property never being initialised.
> {code:java}
> @Component("fhir")
> public class FhirComponent extends AbstractApiComponent<FhirApiName, FhirConfiguration, FhirApiCollection> {
>     @Metadata(label = "advanced")
>     FhirConfiguration configuration;
> {code}
> This property appears to shadow a property of the same name on AbstractApiComponent
> {code:java}
> public abstract class AbstractApiComponent<E extends Enum<E> & ApiName, T, S extends ApiCollection<E, T>>
>         extends DefaultComponent {
>     @Metadata(label = "advanced", description = "Component configuration")
>     protected T configuration;
> {code}
> This is an issue for me as I am attempting to register a IClientInterceptor to help with a SMART on FHIR workflow, which no longer works as the configuration supplied during class construction is ignored and a IGenericClient is never persisted.
> To work around the issue in the interim, creating a component that extends FhirComponent, overriding the getClient method to utilise the configuration from AbstractApiComponent appears to resolve the issue.
> Assuming I'm not missing anything obvious regarding the purpose for the configuration property on the FhirComponent class, and if desired, am more than happy to submit a PR with a fix.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)