Ensure that Hibernate's JtaPlatform can be customized
Previously, when JpaProperties was applying additional properties it discarded any existing properties. This meant that custom configuration of Hibernate's JtaPlatform was not detected and that Boot's SpringJtaPlatform would always be configured instead. This commit updates JpaProperties to include all of the existing properties when it's asked to apply any additional properties. See gh-2348 Closes gh-2359
This commit is contained in:
parent
e19bfd9251
commit
c45604b825
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2014 the original author or authors.
|
* Copyright 2012-2015 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -168,7 +168,7 @@ public class JpaProperties {
|
||||||
|
|
||||||
private Map<String, String> getAdditionalProperties(Map<String, String> existing,
|
private Map<String, String> getAdditionalProperties(Map<String, String> existing,
|
||||||
DataSource dataSource) {
|
DataSource dataSource) {
|
||||||
Map<String, String> result = new HashMap<String, String>();
|
Map<String, String> result = new HashMap<String, String>(existing);
|
||||||
if (!isAlreadyProvided(existing, "ejb.naming_strategy")
|
if (!isAlreadyProvided(existing, "ejb.naming_strategy")
|
||||||
&& this.namingStrategy != null) {
|
&& this.namingStrategy != null) {
|
||||||
result.put("hibernate.ejb.naming_strategy", this.namingStrategy.getName());
|
result.put("hibernate.ejb.naming_strategy", this.namingStrategy.getName());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue