# 능력 리포트가 이 능력에 매긴 등급 JpaPlatformAutoConfiguration.java:57: CapabilitySupport.stable(JpaCapability.COMPLETION_EVIDENCE), JpaCapability.java:16: COMPLETION_EVIDENCE("transaction.completion-evidence"), # 매니저의 javadoc 이 주장하는 것 11:/** 12: * A {@link JpaTransactionManager} that records how far each transaction got, so a commit failure 13: * can be classified as "rolled back" or "outcome unknown" instead of guessed (design §17.2). 14: * 15: *
The phase is marked {@link TransactionCompletionEvidence#COMMITTING} immediately before the 16: * provider commit and never after. That ordering is the whole mechanism: if the JVM, the network, 17: * or the server dies inside {@code super.doCommit}, the last thing written is "we asked, we do not 18: * know", which is exactly the state that must not be mistaken for a rollback. 19: * 20: *
Evidence is cleared on every path — commit success, commit failure, rollback, and cleanup. A 21: * frame left behind on a pooled thread would attach this transaction's phase to the next unrelated 22: * unit of work that thread picks up. 23: */ # 같은 파일의 코드가 하는 것 49: @Override 50: protected void doCommit(DefaultTransactionStatus status) { 51: TransactionEvidenceContext.mark(TransactionCompletionEvidence.COMMITTING); 52: try { 53: super.doCommit(status); 54: TransactionEvidenceContext.mark(TransactionCompletionEvidence.COMMITTED); 55: } catch (RuntimeException failure) { 56: TransactionEvidenceContext.mark(TransactionCompletionEvidence.UNKNOWN); 57: throw classifier.translateCommitFailure(failure); 58: } finally { 59: // Deliberately not cleared here. The executor's scope owns the frame's lifetime; a second 60: // owner popping was how an inner REQUIRES_NEW transaction deleted its outer frame. 61: } 62: } 63: 64: @Override 65: protected void doRollback(DefaultTransactionStatus status) { 66: try { 67: super.doRollback(status); 68: TransactionEvidenceContext.mark(TransactionCompletionEvidence.ROLLED_BACK); 69: } finally { 70: // Deliberately not cleared here. The executor's scope owns the frame's lifetime; a second 71: // owner popping was how an inner REQUIRES_NEW transaction deleted its outer frame. 72: } 73: } # 그 매니저를 만드는 코드 app-bootstrap/src/main/java/dev/caskeleton/bootstrap/autoconfigure/jpa/JpaTransactionAutoConfiguration.java:55: * EvidenceAwareJpaTransactionManager.standard(entityManagerFactory, clock)}. The composition root adapter/outbound/persistence-jpa/src/main/java/dev/caskeleton/adapter/outbound/persistence/transaction/EvidenceAwareJpaTransactionManager.java:39: return new EvidenceAwareJpaTransactionManager( # 자기 파일과 javadoc 을 뺀 생성 지점: 0 # FQCN 이 설정 리소스에 등장하는 곳: 0 # 그 클래스를 상속하는 코드: 0 # 트랜잭션 매니저 빈을 등록하는 코드 (애너테이션 다음 여섯 줄까지 본다) # main: 0 # test: 1 JpaPlatformRuntimeAutoConfigurationTest.java-257- PlatformTransactionManager transactionManager() {