[backport camel-4.18.x] CAMEL-23414: Allow customization of SerializationConfig on managed Hazelcast instances#22946
Merged
oscerd merged 1 commit intocamel-4.18.xfrom May 5, 2026
Conversation
…zelcast instances (#22943) Apply a default JavaSerializationFilterConfig on the SerializationConfig of the Config built by Camel when no user-supplied Config or HazelcastInstance is provided. The default whitelists class name prefixes java., javax., org.apache.camel. and blacklists java.net. Affects: - HazelcastDefaultComponent#getOrCreateHzInstance (only when neither hazelcastInstance, hazelcastConfigUri, nor a referenced Config is supplied) - HazelcastUtil#newInstance() (no-arg) - HazelcastAggregationRepository#doStart (when no hazelcastInstance is supplied) - HazelcastIdempotentRepository#doStart (when no hazelcastInstance is supplied) A user-supplied JavaSerializationFilterConfig is respected and is not overwritten. Adds a HazelcastSerializationFilterHelper utility, a unit test, and an upgrade guide note for 4.21. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
davsclaus
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #22943
Cherry-pick of #22943 onto
camel-4.18.x.Original PR: #22943 — CAMEL-23414: Allow customization of SerializationConfig on managed Hazelcast instances
Original author: @oscerd
Target branch:
camel-4.18.xConflict resolution
The cherry-pick conflicted on the upgrade-guide note because
camel-4x-upgrade-guide-4_21.adocdoes not exist oncamel-4.18.x. The note was moved tocamel-4x-upgrade-guide-4_18.adocunder theUpgrading from 4.18.2 to 4.18.3section, mirroring the placement convention used by thecamel-jmsentry already there.Original description
JavaSerializationFilterConfigon theSerializationConfigof theConfigbuilt by Camel when no user-suppliedConfigorHazelcastInstanceis provided.java.,javax.,org.apache.camel.and blacklistsjava.net..JavaSerializationFilterConfigis respected and is not overwritten.Affected paths:
HazelcastDefaultComponent#getOrCreateHzInstance,HazelcastUtil#newInstance(),HazelcastAggregationRepository#doStart,HazelcastIdempotentRepository#doStart.Test plan
camel-4.18.x(mvn -DskipITs test): 208/208 pass.camel-4.18.x: clean.