- analysis/·source-index·state.json 을 final/document.md 제2부·제3부로 접었다. SSOT 는 하나다 - 파일럿 — commit-ambiguity-as-a-result 를 새 기준으로 재선별. 후보 14 → 글감 5 (PROMOTE 5 · MERGE_INTO 3 · KEEP_IN_SSOT 4 · 보류 2). 기록 5건을 다시 썼고 그림 1개를 techviz 로 만들었다 - 재선별이 잡은 것: 제1부 §6.2·§11.1 이 자기 §13.2 와 어긋나 있었다(레인을 안 돌렸다 vs 돌렸다) — 정정. 이미 답이 나와 있던 Question 을 HEAD 재실행 질문으로 다시 세웠다. Concept 이 인용한 코드가 SSOT 에 없어 뺐다 - candidateScope·sourceRepository 기록. 나머지 43개 주제는 재선별 대기(PENDING 905) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
54 lines
2.8 KiB
Markdown
54 lines
2.8 KiB
Markdown
---
|
|
kind: CONCEPT
|
|
slug: adapter-outbound-persistence-jpa-c09
|
|
title: 같은 leaf 안에 트랜잭션 모델이 둘 있다
|
|
topic: state-machines-and-ownership
|
|
project: clean-architecture-backend-template
|
|
status: 게시 전
|
|
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
|
rootTreeNode: concept:adapter-outbound-persistence-jpa-c09
|
|
evidenceCapturedOn: 2026-09-01
|
|
assets:
|
|
- key: adapter-outbound-persistence-jpa-c09
|
|
file: ../../../final/evidence/rendered/adapter-outbound-persistence-jpa-c09.svg
|
|
evidence:
|
|
- ../../../final/evidence/raw/adapter-outbound-persistence-jpa-c09.txt
|
|
source:
|
|
- 원본 분석 절은 final/document.md#a05#L737 이다.
|
|
module: adapter-outbound-persistence-jpa
|
|
---
|
|
|
|
# 같은 leaf 안에 트랜잭션 모델이 둘 있다
|
|
|
|
application-core가 소유한 canonical boundary와 이 leaf의 `api/**`가 소유한 boundary가 동시에 존재한다.
|
|
|
|
## 본문
|
|
|
|
<!-- body:start -->
|
|
|
|
현재 persistence-jpa에는 transaction을 표현하는 두 계열이 동시에 존재한다.
|
|
|
|
```text
|
|
PolicyTransactionPort / TransactionPort
|
|
-> SpringTransactionPort (@Component)
|
|
-> SpringPolicyTransactionPort
|
|
-> PlatformTransactionManager
|
|
```
|
|
|
|
A의 어휘는 `TransactionRequest`, `TransactionPolicyId`, `CallBudget`, `TransactionResult`, `TransactionOutcome`, `OperationId`, `TransactionPhase`, `ReconciliationReference`다. 이 모델은 application-core가 소유한다 — use case가 outbound adapter type을 import하지 않아도 transaction policy와 uncertain outcome을 표현할 수 있다.
|
|
|
|
## TransactionRequest 참조 위치
|
|
|
|
:::evidence key="adapter-outbound-persistence-jpa-c09" alt="코드베이스에서 TransactionRequest 를 검색한 출력 33줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="TransactionRequest 코드베이스 검색 — 33줄 · exit 0" zoom="true"
|
|
:::
|
|
|
|
## B는 bean graph에 있고 호출자는 없다
|
|
|
|
B의 어휘는 `PersistenceOperationName`, `TransactionProfile`, `RetryProfile`, `JpaPersistenceException`, `TransactionCompletionEvidence`다. `JpaPlatformRuntimeAutoConfiguration`은 `PlatformTransactionManager`가 있으면 `SpringJpaTransactionExecutor` bean을 만들고, 그 executor가 있으면 `FullTransactionRetryCoordinator` bean도 만든다. 따라서 source tree 수준에서는 B가 단순 historical class가 아니라 **현재 runtime bean graph에도 포함되는 구현**이다. 그러나 repository production call search에서는 `FullTransactionRetryCoordinator.execute(...)`를 실제 business/application code가 호출하는 경로가 확인되지 않았다.
|
|
|
|
## 공존 자체는 결함이 아니다
|
|
|
|
반대로 application-core transaction port는 sample/use-case/composition에서 canonical contract로 사용된다. `api/**`는 intended external surface이므로 fork/application이 B를 programmatically 사용할 수 있다.
|
|
|
|
<!-- body:end -->
|