Skip to content

Align JMS XA examples with KaotoIO/forage#427 endpoint contract - #30

Draft
Croway wants to merge 1 commit into
mainfrom
fix/427-jms-xa-endpoint-contract
Draft

Align JMS XA examples with KaotoIO/forage#427 endpoint contract#30
Croway wants to merge 1 commit into
mainfrom
fix/427-jms-xa-endpoint-contract

Conversation

@Croway

@Croway Croway commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • With forage.jms.transaction.enabled=true, Forage now wires a JtaTransactionManager into the Camel JMS component; endpoints must not enable local JMS transactions (transacted=true) on XA connections - IBM MQ rejects them with MQRC 2072.
  • Documents that the transactions example needs PostgreSQL started with max_prepared_transactions > 0: a JMS+JDBC transaction is a real two-phase commit once JMS properly enlists in JTA, previously masked by the one-phase-commit optimization when only the JDBC branch participated.

Depends on

Requires a Forage release containing KaotoIO/forage#430 (fixes #427). This PR is opened as a draft and should only be merged once that Forage PR is merged and a Forage build containing it is available.

Test plan

  • jms/transactional verified end-to-end: clean commit path, rollback shows redelivered(false) then redelivered(true) on retry, no more spurious "session already closed" warnings.
  • transactions verified end-to-end against Postgres started with max_prepared_transactions=100: OK transactions commit and are visible in the test table; ROLLBACK transactions are correctly absent.

With forage.jms.transaction.enabled=true, Forage now wires a JtaTransactionManager
into the Camel JMS component; endpoints must not enable local JMS transactions
(transacted=true) on XA connections - IBM MQ rejects them with MQRC 2072.

Also documents that the transactions example needs PostgreSQL started with
max_prepared_transactions > 0: a JMS+JDBC transaction is a real two-phase commit
once JMS properly enlists in JTA, previously masked by the one-phase-commit
optimization when only the JDBC branch participated.

Requires a Forage release containing KaotoIO/forage#430 (fixes #427).
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 386fd074-0aa7-4307-918d-7801a0596827

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/427-jms-xa-endpoint-contract

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant