Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to get TransactionManager from Arc container #72

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import jakarta.transaction.RollbackException;
import jakarta.transaction.SystemException;
import jakarta.transaction.Transaction;

import com.arjuna.ats.jta.TransactionManager;
import jakarta.transaction.TransactionManager;

import io.quarkus.arc.Arc;
import io.quarkus.narayana.jta.QuarkusTransaction;
Expand All @@ -31,7 +30,7 @@ public void beforeDelivery(Method method) throws ResourceException {
Arc.container().requestContext().activate();
QuarkusTransaction.begin();
try {
Transaction transaction = TransactionManager.transactionManager().getTransaction();
Transaction transaction = Arc.container().instance(TransactionManager.class).get().getTransaction();
gastaldi marked this conversation as resolved.
Show resolved Hide resolved
// Enlisting the resource so the message delivery is part of the transaction
// See https://jakarta.ee/specifications/connectors/2.1/jakarta-connectors-spec-2.1#transacted-delivery-using-container-managed-transaction
if (!transaction.enlistResource(xaResource)) {
Expand Down