Project

General

Profile

Actions

Task #10

open

Critical use cases lack @Transactional boundaries

Added by Redmine Admin about 2 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
04/27/2026
Due date:
% Done:

0%

Estimated time:

Description

Where:

  • src/main/kotlin/com/articon/base/application/ordering/order/usecases/CreateOrderUseCase.kt (execute body, lines 37–98)
  • src/main/kotlin/com/articon/base/application/identity/auth/usecases/LoginUserUseCase.kt (execute body, lines 15–44)

What's wrong: The use-case execute() methods perform multi-step DB work (lookup → mutate → save → persist tokens / order lines) without @Transactional on the use case or its immediate caller.

Why it matters: A failure mid-flow leaves the DB partially mutated — orphaned order rows, half-issued tokens, etc. Concurrent users can also observe torn reads.

Suggested fix: Annotate the use-case methods (or apply @TransactionalAdvice at the application-layer boundary) and add an integration test that simulates a failure between steps.

No data to display

Actions

Also available in: Atom PDF