Skip to content

CAMEL-23414: Allow customization of SerializationConfig on managed Hazelcast instances#22943

Merged
oscerd merged 1 commit intomainfrom
ci-issue-CAMEL-23414
May 5, 2026
Merged

CAMEL-23414: Allow customization of SerializationConfig on managed Hazelcast instances#22943
oscerd merged 1 commit intomainfrom
ci-issue-CAMEL-23414

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 5, 2026

Summary

  • 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 — 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.

Override paths

  • Pass a pre-built HazelcastInstance.
  • Pass a pre-built Config via the hazelcastConfigUri parameter or a referenced Config bean.
  • Configure a custom JavaSerializationFilterConfig on the supplied Config's SerializationConfig — Camel will not overwrite it.

Jira

https://issues.apache.org/jira/browse/CAMEL-23414

Test plan

  • New HazelcastSerializationFilterHelperTest: default applied, user filter respected, null-safe.
  • Module test suite (mvn -DskipITs test): 220/220 pass.
  • Targeted clean install of catalog/camel-catalog, dsl/camel-componentdsl, dsl/camel-endpointdsl succeeds with no regen artifacts.
  • Upgrade guide note added in camel-4x-upgrade-guide-4_21.adoc.

…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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🧪 CI tested the following changed modules:

  • components/camel-hazelcast
  • docs
All tested modules (8 modules)
  • Camel :: HazelCast
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@oscerd oscerd merged commit 7a30904 into main May 5, 2026
7 checks passed
@oscerd oscerd deleted the ci-issue-CAMEL-23414 branch May 5, 2026 09:32
oscerd added a commit that referenced this pull request May 5, 2026
…zelcast instances (4.18.x backport)

Backport of #22943 onto camel-4.18.x.

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.18.3.

Closes #22946
oscerd added a commit that referenced this pull request May 5, 2026
…zelcast instances (4.14.x backport)

Backport of #22943 onto camel-4.14.x.

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.14.8.

Closes #22955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants