Files
llm-wiki/raw/company-tech-blogs/axonframework-transactionmanager-spring-adapter.md

11 KiB
Raw Permalink Blame History

title, source_type, url, archive_url, related_branches, related_projects, tags, status, confidence, created
title source_type url archive_url related_branches related_projects tags status confidence created
company-tech-blog / Axon Framework TransactionManager interface + SpringTransactionManager adapter (AxonIQ API Docs) company-tech-blog https://apidocs.axoniq.io/3.3/org/axonframework/common/transaction/TransactionManager.html
feature-application-port-usecase-contract
ca-skeleton
company-tech-blog
ca-skeleton
application
transaction-port
axonframework
hexagonal
raw high 2026-05-28

Axon Framework TransactionManager interface + SpringTransactionManager adapter (AxonIQ API Docs)

Layer: raw/company-tech-blogs/ — AxonIQ vendor API javadoc 의 원문 발췌·출처 기록. source_type = company-tech-blog: AxonIQ 는 3rd-party framework vendor. Spring 공식 문서가 아님. 공식 Spring best practice 로 승격 불가. D3 (TransactionPort 채택) 의 보조 증거로만 활용.

Parent / 활용 branch

이 자료는 혼자 존재하지 않는다. 아래 branch 의 구현 결정의 근거로서 보관됨.

Branch 이 자료가 정당화하는 결정
raw/branch-notes/feature-application-port-usecase-contract D3 (TransactionPort 채택): enterprise OSS (Axon 3.6k stars, AxonIQ enterprise) 가 동일 abstraction 패턴 (executeInTransaction(Runnable) / fetchInTransaction(Supplier<T>)) 을 사용 — 개인 블로그 2건 근거를 격상하는 보강 증거 (company-case-study 강도, Spring 공식 아님)

출처 / Source

왜 저장했는지 / Why archived

Axon Framework (GitHub 3.6k stars, AxonIQ enterprise backing) 의 TransactionManager interface 가 ca-tmpl TransactionPortinWrite(supplier) / inRead(supplier) 와 시그니처 구조 1:1 유사. executeInTransaction(Runnable) + fetchInTransaction(Supplier<T>) 라는 callback 기반 transaction abstraction 이 개인 블로그 사례를 넘어 enterprise OSS 에도 동일하게 존재함을 증명 — D3 정당화를 engineering-blogcompany-case-study 강도로 격상하는 보강 자료.

핵심 인용 / Key quotes (verbatim, 5건)

아래 모든 인용은 Self-Grep 검증 통과. HTML tag 제거, 공백 정규화. 원문 실체(javadoc 텍스트)는 보존.

[§Interface Description, line 110112] "Interface towards a mechanism that manages transactions. Typically, this will involve opening database transactions or connecting to external systems."

[§startTransaction(), line 177] "Starts a transaction. The return value is the started transaction that can be committed or rolled back."

[§executeInTransaction(Runnable), line 191192] "Executes the given task in a new Transaction. The transaction is committed when the task completes normally, and rolled back when it throws an exception."

[§fetchInTransaction(Supplier), line 206209] "Invokes the given supplier in a transaction managed by the current TransactionManager. Upon completion of the call, the transaction will be committed in the case of a regular return value, or rolled back in case an exception occurred."

[§SpringTransactionManager class description, line 120121] "TransactionManager implementation that uses a PlatformTransactionManager as underlying transaction manager."

Claims Extracted / 추출된 주장

주의: source_type = company-tech-blog (AxonIQ vendor javadoc). Strength = company-case-study. Spring 공식 best practice 가 아님.

Claim ID Claim (이 자료가 직접 말하는 것) Evidence quote Strength Applies to Does not prove
AXON-TX-C1 Axon Framework TransactionManager interface 는 transactions 를 추상화하는 mechanism 을 향한 interface 이며, 전형적으로 database transaction 개시 또는 외부 시스템 연결을 포함한다 [§Interface Description] "Interface towards a mechanism that manages transactions. Typically, this will involve opening database transactions or connecting to external systems." company-case-study Axon Framework 3.3.x 를 사용하는 JVM 애플리케이션 Spring 공식 transaction abstraction 이 이 인터페이스를 권장하는 것을 증명하지 않음. Axon 특화 abstraction
AXON-TX-C2 executeInTransaction(Runnable task) 는 새 Transaction 안에서 task 를 실행하며, task 가 정상 완료 시 commit, exception throw 시 rollback 한다. fetchInTransaction(Supplier<T> supplier) 는 현재 TransactionManager 가 관리하는 transaction 안에서 supplier 를 호출하고, 정상 반환 시 commit, exception 시 rollback 한다 [§executeInTransaction] "Executes the given task in a new Transaction. The transaction is committed when the task completes normally, and rolled back when it throws an exception." / [§fetchInTransaction] "Invokes the given supplier in a transaction managed by the current TransactionManager. Upon completion of the call, the transaction will be committed in the case of a regular return value, or rolled back in case an exception occurred." company-case-study Axon Framework 3.3.x — executeInTransaction (Runnable) + fetchInTransaction (Supplier) 두 default method (1) ca-tmpl inWrite / inRead / inNew 3중 메서드 구조가 Axon 과 1:1 매핑임을 증명하지 않음 — Axon 은 단일 executeInTransaction + fetchInTransaction. ca-tmpl 의 3중 분리는 자체 결정. (2) propagation 옵션 없음 — Axon executeInTransaction 은 항상 new transaction (ca-tmpl inNew 와만 1:1). inWrite (REQUIRED) / inRead (REQUIRED + readOnly) 와는 매핑 안 됨
AXON-TX-C3 SpringTransactionManager 는 Spring PlatformTransactionManager 를 underlying transaction manager 로 사용하는 TransactionManager 구현체이며, SpringTransactionManager(PlatformTransactionManager transactionManager) 생성자로 초기화된다 [§SpringTransactionManager class] "TransactionManager implementation that uses a PlatformTransactionManager as underlying transaction manager." / [§constructor] "Initializes the SpringTransactionManager with the given transactionManager and the default transaction definition." company-case-study Axon Framework 3.4, Spring 환경 ca-tmpl SpringTransactionPort 가 이 어댑터 패턴과 "구조 동일" 하다는 것은 structural analogy 임. Axon SpringTransactionManager 는 Axon unit-of-work lifecycle 에 결합 — ca-tmpl SpringTransactionPort 는 독립 TransactionTemplate 기반으로 구현. 동일 구조이지만 런타임 lifecycle 은 다름
AXON-TX-C4 Axon Framework 는 GitHub 3.6k stars + AxonIQ enterprise backing 을 가진 established 3rd-party framework 이며, enterprise-grade transaction abstraction 사례를 제공한다 [title element, line 7] "TransactionManager (Axon Framework 3.3.4 API)" — AxonIQ 공식 API 문서. GitHub star / enterprise backing 은 별도 공개 정보 company-case-study Axon Framework ecosystem 을 채택한 JVM 프로젝트 Spring 공식 best practice 임을 증명하지 않음. AxonIQ 는 독립 vendor. "enterprise OSS 사용 사례" 수준 근거

Usage Boundaries / 적용 경계

이 자료가 직접 증명하는 것

  • AXON-TX-C1: Axon Framework 의 transaction abstraction 이 Runnable / Supplier<T> callback 기반임
  • AXON-TX-C2: callback 기반 transaction abstraction (executeInTransaction + fetchInTransaction) 이 enterprise OSS 에도 존재함 — D3 의 보강 증거
  • AXON-TX-C3: Spring PlatformTransactionManager 를 underlying 으로 감싸는 어댑터 패턴이 Axon 에도 사용됨
  • AXON-TX-C4: Axon Framework 는 established enterprise OSS (company-case-study 강도)

이 자료가 증명하지 않는 것

  • Axon 은 3rd-party framework — Spring 공식 best practice 가 아님. D3 에 단독으로 쓰면 근거 강도 미달
  • ca-tmpl TransactionPortinWrite / inRead / inNew 3중 메서드 구조 는 Axon 과 1:1 매핑 안 됨. Axon 은 단일 executeInTransaction (항상 new transaction) + fetchInTransaction (결과 반환). ca-tmpl 의 REQUIRED / readOnly / REQUIRES_NEW 3분리는 자체 결정
  • Axon TransactionManager.executeInTransactionpropagation 옵션 없음 (항상 new transaction) — ca-tmpl inNew (REQUIRES_NEW) 와만 1:1. inWrite (REQUIRED propagation 재사용) / inRead (readOnly) 는 Axon 에 직접 대응 없음
  • Axon SpringTransactionManager 는 Axon unit-of-work lifecycle 에 결합되어 있음 — ca-tmpl SpringTransactionPort 의 독립적 TransactionTemplate 구현과 런타임 lifecycle 이 다름

내 프로젝트에 적용하려면 추가 확인이 필요한 것

  • D3 를 company-case-study 이상으로 격상하려면 Spring 공식 문서에서 "application layer 의 transaction callback abstraction" 을 직접 권고하는 source 필요 — 현재 미존재
  • inWrite (REQUIRED) / inRead (readOnly) 의 propagation 기반 분리 결정 근거는 raw/official-docs/spring-tx-management-reference.md (SPRING-TX-MGR-C3, C6) 가 별도로 제공

메모 / Notes

  • Axon Framework 의 NoTransactionManager (Known Implementing Enum) 는 ca-tmpl 의 TransactionPort noop stub 구현에 참고 가능 (테스트 환경)
  • Axon 은 fetchInTransactionexecuteInTransaction 의 결과 반환 대안으로 명시 — ca-tmpl 에서 inWrite(Supplier<T>) / inWrite(Runnable) default 두 시그니처로 분리한 것과 구조적 유사
  • SpringTransactionManager(PlatformTransactionManager, TransactionDefinition) 두 번째 생성자는 ca-tmpl 의 모드별 pre-built template (write / readOnly / requiresNew) 과 목적 동일
  • 이 javadoc 출처는 API Docs — 기술 블로그 아닌 vendor 공식 API 문서이지만, Spring/Oracle/IETF 공식 표준이 아닌 3rd-party vendor 이므로 company-tech-blog + company-case-study 강도 적용