Skip to content
This repository was archived by the owner on Feb 22, 2026. It is now read-only.

refactor: hexagonal architecture remediation — transactional engine @Import removal#12

Merged
casc84ab merged 4 commits into
developfrom
feature/hexagonal-architecture-remediation
Feb 13, 2026
Merged

refactor: hexagonal architecture remediation — transactional engine @Import removal#12
casc84ab merged 4 commits into
developfrom
feature/hexagonal-architecture-remediation

Conversation

@ancongui
Copy link
Copy Markdown
Contributor

Summary

  • Removed @Import({TransactionalEngineConfiguration, SagaPersistenceAutoConfiguration, SagaRedisAutoConfiguration}) from @EnableTransactionalEngine
  • Added TransactionalEngineConfiguration to .imports file (Saga configs were already listed)
  • @EnableTransactionalEngine is now a marker-only annotation — auto-configuration is handled entirely via .imports

Test Plan

  • Module compiles successfully
  • Verify transactional engine auto-configuration still activates
  • Verify @EnableTransactionalEngine still works as marker

…import removal

Part of the Firefly Framework hexagonal architecture remediation.

- Remove @import from EnableTransactionalEngine (redundant with .imports)
- Add TransactionalEngineConfiguration to .imports file
- EnableTransactionalEngine is now a marker-only annotation
@enable* annotations are designed to use @import — this is the correct
Spring pattern (cf. @EnableScheduling, @EnableCaching, etc.). The
anti-pattern we fixed was @import on @autoConfiguration classes.

Restore @import(TransactionalEngineConfiguration.class) so the
annotation works in both Spring Boot (auto-configuration) and plain
Spring contexts (e.g. AnnotationConfigApplicationContext in tests).
Conditional configs (persistence, Redis) remain in the .imports file.
@ancongui ancongui requested a review from casc84ab February 12, 2026 22:05
TransactionalEngineConfiguration had a default InMemoryTccPersistenceProvider
for TCC but no equivalent for Saga. When SagaPersistenceAutoConfiguration
is not loaded (e.g. in plain Spring contexts via @EnableTransactionalEngine),
SagaEngine creation fails due to missing SagaPersistenceProvider.

Add a @ConditionalOnMissingBean default so the core configuration is
self-contained, matching the existing TCC pattern.
…rationTest

This test requires SagaPersistenceAutoConfiguration and
SagaRedisAutoConfiguration for the SagaRecoveryService bean.
Add explicit @import to match the pattern already used in
SagaRecoveryIntegrationTest. Tests that need specific conditional
configs should declare them explicitly rather than relying on
@EnableTransactionalEngine to load everything transitively.
Copy link
Copy Markdown
Contributor

@casc84ab casc84ab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - @EnableTransactionalEngine is now a clean marker annotation. Auto-configuration via .imports is correct.

@casc84ab casc84ab merged commit 92db0a5 into develop Feb 13, 2026
4 checks passed
@casc84ab casc84ab deleted the feature/hexagonal-architecture-remediation branch February 13, 2026 09:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants