oscerd commented on PR #9072: URL: https://github.com/apache/camel-quarkus/pull/9072#issuecomment-5496876750
No need to apologise @zhfeng — your recollection was closer than mine, and it explains *why* the pattern stayed local. I checked and you are right about the mechanism: `SpringTransactionPolicy` (`camel-spring-parent/camel-spring/.../spi/SpringTransactionPolicy.java`) holds a Spring `TransactionTemplate` and hands the work to it, rather than driving a `TransactionManager` directly. Since it never calls `rollback()` / `setRollbackOnly()` / `resume()` itself, there is no place for this kind of swallowing to live — Spring owns that part. `camel-jta`'s `JtaTransactionPolicy` is abstract and leaves `run(Runnable)` to subclasses, so the concrete `runWithTransaction` / `rollback` / `resumeTransaction` really did only exist here. So the two things together are why this was camel-quarkus-only: Spring delegates it, and camel-jta never implemented it. Worth having in the thread for whoever looks next. Thanks for the review, and for prompting the cross-check — it was worth doing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
