Revise native Hibernate 5 bootstrapping with JTA transaction manager
Closes gh-25858
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -225,6 +225,8 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
"Unknown transaction manager type: " + jtaTransactionManager.getClass().getName());
|
||||
}
|
||||
|
||||
getProperties().put(AvailableSettings.TRANSACTION_COORDINATOR_STRATEGY, "jta");
|
||||
|
||||
// Hibernate 5.1/5.2: manually enforce connection release mode AFTER_STATEMENT (the JTA default)
|
||||
try {
|
||||
// Try Hibernate 5.2
|
||||
|
||||
Reference in New Issue
Block a user