# 루트의 몫이라고 적힌 두 가지 51: /** 52: * The commit-phase classifier the evidence-aware transaction manager is built with. 53: * 54: *

The manager itself is constructed inside the persistence leaf, through {@code 55: * EvidenceAwareJpaTransactionManager.standard(entityManagerFactory, clock)}. The composition root 56: * deliberately does not do it here: that would require {@code jakarta.persistence} and {@code 57: * org.hibernate} on the composition root's compile classpath, and this repository keeps ORM types 58: * inside the persistence leaf. What the root owns is the decision — whether to install the 59: * platform's manager at all — and the classifier it uses. 60: */ 61: public CommitFailureClassifier commitFailureClassifier() { 62: return CommitFailureClassifier.standard(clock); # 그 분류기 팩토리를 부르는 코드: 0 # 이 자동설정 클래스가 스프링 설정인가 29: *

Plain construction rather than Spring auto-configuration: this repository's composition root 40:public final class JpaTransactionAutoConfiguration { # 이 클래스를 쓰는 프로덕션 코드가 부르는 메서드 app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java:159: JpaTransactionAutoConfiguration composition = new JpaTransactionAutoConfiguration(clock); app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java-160- VendorFailureTranslator vendor = vendorFailures.getIfAvailable(); app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java-161- return vendor == null app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java:172: return new JpaTransactionAutoConfiguration(clock) app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java-173- .retryCoordinator( app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java-174- executor, # 완료 불명 예외가 만들어지는 유일한 곳과 그것을 부르는 유일한 곳 adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/transaction/CommitFailureClassifier.java:97: return new TransactionCompletionUnknownException( adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/transaction/EvidenceAwareJpaTransactionManager.java:57: throw classifier.translateCommitFailure(failure); # 그 분류기가 프레임에서 꺼내는 값 90: frame.map(TransactionEvidenceFrame::operation).orElse(UnknownOperation.NAME); 92: frame.map(present -> between(present.startedAt(), now)).orElse(Duration.ZERO); 93: int attempt = frame.map(TransactionEvidenceFrame::attempt).orElse(1); 99: frame.flatMap(TransactionEvidenceFrame::reconciliationKey).orElse(null), # 단계를 읽는 접근자를 부르는 코드: 0 # 조립되는 실행기는 프레임을 만든다 78- // REQUIRES_NEW transaction can no longer delete the frame belonging to the one it suspended. 79- try (TransactionEvidenceScope scope = 80: TransactionEvidenceContext.begin(operation, transactionKey, clock.instant(), attempt)) { 154: @ConditionalOnBean(PlatformTransactionManager.class) # 그 매니저의 순서를 실행하는 테스트가 있는가 # EvidenceAwareJpaTransactionManagerTest 안의 그 타입 참조: 1 22: *

The manager itself needs an {@code EntityManagerFactory}, so what is asserted here is the 24: * manager's own {@code doCommit} ordering is exercised end to end by the commit-ambiguity contract