[
https://issues.apache.org/jira/browse/CAMEL-24420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrea Cosentino updated CAMEL-24420:
-------------------------------------
Fix Version/s: (was: 4.14.10)
> camel-hazelcast: Apply the default JavaSerializationFilterConfig to
> Camel-built client configurations
> -----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24420
> URL: https://issues.apache.org/jira/browse/CAMEL-24420
> Project: Camel
> Issue Type: Task
> Components: camel-hazelcast
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.22.1, 4.23.0, 4.18.5
>
>
> CAMEL-23414 added {{HazelcastSerializationFilterHelper.applyDefault(Config)}}
> and applied it to the Hazelcast configurations that Camel builds itself, i.e.
> when the user supplies neither a {{Config}} nor a {{HazelcastInstance}}.
> CAMEL-24413 then covered
> {{ReplicatedHazelcastAggregationRepository#doStart()}}, which had been missed
> because it overrides {{doStart()}} without calling {{super.doStart()}}.
> One Camel-built configuration path is still not covered.
> h4. HazelcastDefaultComponent#getOrCreateHzClientInstance()
> With {{hazelcastMode=client}}, and when neither a referenced {{ClientConfig}}
> nor {{hazelcastConfigUri}} is supplied, Camel builds {{new
> XmlClientConfigBuilder().build()}} and creates the client without applying a
> default filter. The node-mode counterpart {{getOrCreateHzInstance()}} does
> apply it on the equivalent branch, so the two modes behave differently for an
> otherwise identical endpoint configuration.
> {{ClientConfig}} exposes the same {{SerializationConfig}} as {{Config}}, so
> the helper needs a {{ClientConfig}} overload.
> h4. Proposed change
> * Add an {{applyDefault(ClientConfig)}} overload to
> {{HazelcastSerializationFilterHelper}}, sharing the existing logic.
> * Call it on the Camel-built branch of {{getOrCreateHzClientInstance()}},
> mirroring {{getOrCreateHzInstance()}}.
> * Extend {{HazelcastSerializationFilterHelperTest}} to cover the new overload.
> * Update the upgrade guide.
> As established by CAMEL-23414, a user-supplied {{Config}}/{{ClientConfig}} or
> a pre-built {{HazelcastInstance}} is left untouched.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)