Skip to content

[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
backport/22943-to-camel-4.18.x
May 5, 2026
Merged

[backport camel-4.18.x] CAMEL-23414: Allow customization of SerializationConfig on managed Hazelcast instances#22946
oscerd merged 1 commit intocamel-4.18.xfrom
backport/22943-to-camel-4.18.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 5, 2026

Backport of #22943

Cherry-pick of #22943 onto camel-4.18.x.

Original PR: #22943CAMEL-23414: Allow customization of SerializationConfig on managed Hazelcast instances
Original author: @oscerd
Target branch: camel-4.18.x

Conflict resolution

The cherry-pick conflicted on the upgrade-guide note because camel-4x-upgrade-guide-4_21.adoc does not exist on camel-4.18.x. The note was moved to camel-4x-upgrade-guide-4_18.adoc under the Upgrading from 4.18.2 to 4.18.3 section, mirroring the placement convention used by the camel-jms entry already there.

Original description

  • Apply a default JavaSerializationFilterConfig on the SerializationConfig of the Config built by Camel when no user-supplied Config or HazelcastInstance is provided.
  • Default whitelists class name prefixes java., javax., org.apache.camel. and blacklists java.net..
  • A user-supplied JavaSerializationFilterConfig is respected and is not overwritten.

Affected paths: HazelcastDefaultComponent#getOrCreateHzInstance, HazelcastUtil#newInstance(), HazelcastAggregationRepository#doStart, HazelcastIdempotentRepository#doStart.

Test plan

  • Module test suite on camel-4.18.x (mvn -DskipITs test): 208/208 pass.
  • Module install on camel-4.18.x: clean.

…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>
@oscerd oscerd merged commit 5caf436 into camel-4.18.x May 5, 2026
3 checks passed
@oscerd oscerd deleted the backport/22943-to-camel-4.18.x branch May 5, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants