Clarify why `/confirm` reconstructs TCC participant URIs from `TransactionHistory` when the `Link` header is already provided
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- java, spring-boot
- Área
- documentation
Línea de trabajo
Comienza con las implementaciones de /reserve y /confirm/{tripBookingId} del servicio travel-agent, especialmente con getTravelParticipants(...) y el manejo del encabezado Link. Rastrea cómo TransactionHistory almacena las URI de las reservas de hotel y vuelo, y luego añade una breve nota de ejemplo que distinga la URI de la transacción de las URI de los participantes y explique por qué el flujo en dos pasos las reconstruye.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi Oracle MicroTx team,
I was going through the TCC Spring Boot sample and had a question about the two-step reservation flow, specifically the /confirm/{tripBookingId} endpoint in the travel-agent service.
From what I understand, the /reserve endpoint creates the reservations and returns a Link header containing the MicroTx TCC transaction URI. Later, the client passes that Link header back when calling /confirm/{tripBookingId}.
However, in the /confirm implementation, the code also fetches the saved TransactionHistory by tripBookingId and reconstructs the participant list from the stored reservation URIs:
BookingHistory.TransactionHistory transactionHistory = service.get(tripBookingId);
List<TccParticipant> participants = getTravelParticipants(transactionHistory);
ConfirmResponse confirmResponse = tccClientService.confirm(participants);
And getTravelParticipants(...) manually builds the participant list using the hotel and flight booking URIs stored in TransactionHistory.
My question is:
If the client is already passing the MicroTx Link header back to /confirm, why does the initiator still need to reconstruct the participant URIs from TransactionHistory?
I originally expected the Link header to be enough for MicroTx to identify the existing TCC transaction and its already-registered participants, especially since the participant services call addTccParticipant(...) during the Try/reservation phase.
So I am trying to understand whether the intended model is:
- The
Linkheader only identifies or resumes the TCC transaction, but does not by itself provide the participant reservation URIs to the initiator. - The initiator must persist the reservation URIs itself if confirm/cancel happens in a later HTTP request.
confirm(participants)is used in the two-step flow because the original Try-phase call stack and collected participant headers are no longer available.addTccParticipant(...)is still needed during the Try phase for protocol-level enlistment, but the two-step sample also stores URIs in application state so they can be supplied again later.
Is that the correct interpretation?
If so, it might be helpful to add a short comment or note in the sample explaining the difference between:
- the MicroTx transaction URI in the
Linkheader, and - the participant reservation URIs stored in
TransactionHistory.
Right now, it is a little hard to tell whether the stored participant URI reconstruction is required by the TCC protocol, required only by this sample’s two-step design, or just an implementation choice.
Thanks a lot for the sample. It has been helpful given lack of api documentation.
- Lenguaje dominante
- JavaScript
- Estrellas
- 9
- Forks
- 6
- Merge medio
- 11 h 12 min
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
vercel-labs/ui#999 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
gcivil-nyu-org/team5-mon-fall26#152 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
router-for-me/models#105 ·
Los mantenedores suelen responder en 1 día
-
[Prisma 8] Type-check time grows exponentially with chained .include() callsPosiblemente ocupada @SiKreuz la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
prisma/orm#31161 · 1 comentario ·
Los mantenedores suelen responder en 1 día