Skip to content

Fetch segments inside a unit of work - #202

Open
stefanmirkovic wants to merge 1 commit into
mainfrom
fix/token-store-processing-context
Open

stefanmirkovic wants to merge 1 commit into
mainfrom
fix/token-store-processing-context

Conversation

@stefanmirkovic

Copy link
Copy Markdown
Contributor

The nightly compatibility build against Axon Framework 5.5.0-SNAPSHOT fails to compile. AF commit edbc5a524d ("Require a processing context for token store operations") made the ProcessingContext of every TokenStore operation non-null, and JpaTokenStore now rejects work outside a transaction. ProcessorReportCreator.createSegmentOverview passed null to fetchSegments.

The call now runs in a unit of work from the configured UnitOfWorkFactory, the same way RSocketModelInspectionResponder loads entities. In a Spring application that factory is transactional, so a JPA token store works too.

Built locally against 5.5.0-SNAPSHOT and against the version in the pom (5.3.2): 193 tests green in both. The Toxiproxy integration test was skipped locally because its container did not start on my machine.

Axon Framework 5.5 requires a non-null ProcessingContext for every
TokenStore operation, and JpaTokenStore rejects work outside a
transaction. createSegmentOverview passed null to fetchSegments, so the
client no longer compiled against 5.5.0-SNAPSHOT and the nightly
compatibility build failed.

The call now runs in a unit of work from the configured
UnitOfWorkFactory, which is transactional in a Spring application.
@stefanmirkovic stefanmirkovic self-assigned this Nov 12, 2026
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