diff --git a/quarkus/deployment/src/main/java/org/keycloak/quarkus/deployment/KeycloakProcessor.java b/quarkus/deployment/src/main/java/org/keycloak/quarkus/deployment/KeycloakProcessor.java index 09703ea9c2..bc065b6ff6 100644 --- a/quarkus/deployment/src/main/java/org/keycloak/quarkus/deployment/KeycloakProcessor.java +++ b/quarkus/deployment/src/main/java/org/keycloak/quarkus/deployment/KeycloakProcessor.java @@ -314,6 +314,7 @@ class KeycloakProcessor { defaultSchema.ifPresent(ds -> unitProperties.setProperty(AvailableSettings.DEFAULT_SCHEMA, ds)); unitProperties.setProperty(AvailableSettings.JAKARTA_TRANSACTION_TYPE, PersistenceUnitTransactionType.JTA.name()); + descriptor.setTransactionType(PersistenceUnitTransactionType.JTA); final Optional lockTimeoutConfigValue = getOptionalValue("spi-map-storage-jpa-lock-timeout"); lockTimeoutConfigValue.ifPresent(v -> unitProperties.setProperty(AvailableSettings.JAKARTA_LOCK_TIMEOUT, v)); diff --git a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/transaction/QuarkusJtaTransactionManagerLookup.java b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/transaction/QuarkusJtaTransactionManagerLookup.java index b6d36f34f2..61c7627b13 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/transaction/QuarkusJtaTransactionManagerLookup.java +++ b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/transaction/QuarkusJtaTransactionManagerLookup.java @@ -19,7 +19,6 @@ package org.keycloak.quarkus.runtime.transaction; import jakarta.enterprise.inject.spi.CDI; import jakarta.transaction.TransactionManager; - import org.jboss.logging.Logger; import org.keycloak.Config; import org.keycloak.models.KeycloakSessionFactory; @@ -39,7 +38,7 @@ public class QuarkusJtaTransactionManagerLookup implements JtaTransactionManager tm = CDI.current().select(TransactionManager.class).get(); logger.tracev("TransactionManager = {0}", tm); if (tm == null) { - logger.debug("Could not locate JTA TransactionManager. JTA transactions not supported."); + throw new RuntimeException("You must provide JTA TransactionManager as the default transaction type is JTA"); } } }