You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2024/02/22 04:07:45 UTC
(james-project) branch master updated: Fixed issue with incorrect JPA properties values set for openjpa.Multithreaded and attachmentStorage.enabled
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new e2c5d512c1 Fixed issue with incorrect JPA properties values set for openjpa.Multithreaded and attachmentStorage.enabled
e2c5d512c1 is described below
commit e2c5d512c198e9c63415f2ddabfe3c2c80535eda
Author: Andrzej Wójcik <an...@tigase.net>
AuthorDate: Wed Feb 21 14:34:40 2024 +0100
Fixed issue with incorrect JPA properties values set for openjpa.Multithreaded and attachmentStorage.enabled
---
.../org/apache/james/modules/data/JPAEntityManagerModule.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/server/container/guice/jpa-common/src/main/java/org/apache/james/modules/data/JPAEntityManagerModule.java b/server/container/guice/jpa-common/src/main/java/org/apache/james/modules/data/JPAEntityManagerModule.java
index 19432d372c..22d9ab5ed4 100644
--- a/server/container/guice/jpa-common/src/main/java/org/apache/james/modules/data/JPAEntityManagerModule.java
+++ b/server/container/guice/jpa-common/src/main/java/org/apache/james/modules/data/JPAEntityManagerModule.java
@@ -67,14 +67,11 @@ public class JPAEntityManagerModule extends AbstractModule {
properties.putAll(jpaConfiguration.getCustomOpenjpaProperties());
jpaConfiguration.isMultithreaded()
- .ifPresent(isMultiThread ->
- properties.put(JPAConfiguration.JPA_MULTITHREADED, jpaConfiguration.isMultithreaded().toString())
- );
-
+ .map(Object::toString)
+ .ifPresent(value -> properties.put(JPAConfiguration.JPA_MULTITHREADED, value));
jpaConfiguration.isAttachmentStorageEnabled()
- .ifPresent(isMultiThread ->
- properties.put(JPAConfiguration.ATTACHMENT_STORAGE, jpaConfiguration.isAttachmentStorageEnabled().toString())
- );
+ .map(Object::toString)
+ .ifPresent(value -> properties.put(JPAConfiguration.ATTACHMENT_STORAGE, value));
return Persistence.createEntityManagerFactory("Global", properties);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org