Change default transaction type to JTA
This commit is contained in:
parent
8584174099
commit
9796e69d8d
1 changed files with 1 additions and 7 deletions
|
@ -313,13 +313,7 @@ class KeycloakProcessor {
|
||||||
final Optional<String> defaultSchema = getOptionalKcValue(DatabaseOptions.DB_SCHEMA.getKey());
|
final Optional<String> defaultSchema = getOptionalKcValue(DatabaseOptions.DB_SCHEMA.getKey());
|
||||||
defaultSchema.ifPresent(ds -> unitProperties.setProperty(AvailableSettings.DEFAULT_SCHEMA, ds));
|
defaultSchema.ifPresent(ds -> unitProperties.setProperty(AvailableSettings.DEFAULT_SCHEMA, ds));
|
||||||
|
|
||||||
final Optional<Boolean> transactionJtaEnabled = getOptionalKcBooleanValue(TransactionOptions.TRANSACTION_JTA_ENABLED.getKey());
|
unitProperties.setProperty(AvailableSettings.JAKARTA_TRANSACTION_TYPE, PersistenceUnitTransactionType.JTA.name());
|
||||||
if (transactionJtaEnabled.isPresent() && !transactionJtaEnabled.get()) {
|
|
||||||
unitProperties.setProperty(AvailableSettings.JAKARTA_TRANSACTION_TYPE, PersistenceUnitTransactionType.RESOURCE_LOCAL.name());
|
|
||||||
} else {
|
|
||||||
// will happen for both "enabled" and "xa"
|
|
||||||
unitProperties.setProperty(AvailableSettings.JAKARTA_TRANSACTION_TYPE, PersistenceUnitTransactionType.JTA.name());
|
|
||||||
}
|
|
||||||
|
|
||||||
final Optional<String> lockTimeoutConfigValue = getOptionalValue("spi-map-storage-jpa-lock-timeout");
|
final Optional<String> lockTimeoutConfigValue = getOptionalValue("spi-map-storage-jpa-lock-timeout");
|
||||||
lockTimeoutConfigValue.ifPresent(v -> unitProperties.setProperty(AvailableSettings.JAKARTA_LOCK_TIMEOUT, v));
|
lockTimeoutConfigValue.ifPresent(v -> unitProperties.setProperty(AvailableSettings.JAKARTA_LOCK_TIMEOUT, v));
|
||||||
|
|
Loading…
Reference in a new issue