Skip to content

[backport camel-4.14.x] CAMEL-23414: Allow customization of SerializationConfig on managed Hazelcast instances#22955

Merged
oscerd merged 1 commit intocamel-4.14.xfrom
backport/22943-to-camel-4.14.x
May 5, 2026
Merged

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

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 5, 2026

Backport of #22943

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

Original PR: #22943CAMEL-23414: Allow customization of SerializationConfig on managed Hazelcast instances
Original author: @oscerd
Target branch: camel-4.14.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.14.x. The note was moved to camel-4x-upgrade-guide-4_14.adoc under the Upgrading from 4.14.7 to 4.14.8 section, placed right after the existing camel-jms entry to keep all 4.14.8 security-related notes grouped together (same convention used in the camel-4.18.x backport, #22946).

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 install on camel-4.14.x: clean.
  • Full root build (mvn clean install -DskipTests -Dquickly): clean.

…zelcast instances

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
Copy link
Copy Markdown
Contributor

btw the upgrade guide doc changes should be done in main branch as that is what is published on the website, also for 4.18 and 4.14 changes

@oscerd
Copy link
Copy Markdown
Contributor Author

oscerd commented May 5, 2026

btw the upgrade guide doc changes should be done in main branch as that is what is published on the website, also for 4.18 and 4.14 changes

Yes, this is something that needs to be fixed at agent-harness level

@oscerd oscerd merged commit 974a11b into camel-4.14.x May 5, 2026
3 checks passed
@oscerd oscerd deleted the backport/22943-to-camel-4.14.x branch May 5, 2026 13:05
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