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 2023/09/28 08:12:11 UTC
[james-project] 06/08: JAMES-2156 add jpaConfiguration to the JPAHostSystem
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
commit 6a6077fd095cbaf864ee63d5c257479d73c8f42d
Author: Maksim Meliashchuk <ma...@gmail.com>
AuthorDate: Wed Sep 13 22:40:26 2023 +0300
JAMES-2156 add jpaConfiguration to the JPAHostSystem
---
.../org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
index b6da87ec69..5c40f0db23 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/host/JPAHostSystem.java
@@ -64,6 +64,7 @@ import org.apache.james.mailbox.store.search.MessageSearchIndex;
import org.apache.james.mailbox.store.search.SimpleMessageSearchIndex;
import org.apache.james.metrics.logger.DefaultMetricFactory;
import org.apache.james.metrics.tests.RecordingMetricFactory;
+import org.apache.james.modules.data.JPAConfiguration;
import org.apache.james.mpt.api.ImapFeatures;
import org.apache.james.mpt.api.ImapFeatures.Feature;
import org.apache.james.mpt.host.JamesImapHostSystem;
@@ -99,7 +100,11 @@ public class JPAHostSystem extends JamesImapHostSystem {
EntityManagerFactory entityManagerFactory = JPA_TEST_CLUSTER.getEntityManagerFactory();
JPAUidProvider uidProvider = new JPAUidProvider(entityManagerFactory);
JPAModSeqProvider modSeqProvider = new JPAModSeqProvider(entityManagerFactory);
- JPAMailboxSessionMapperFactory mapperFactory = new JPAMailboxSessionMapperFactory(entityManagerFactory, uidProvider, modSeqProvider);
+ JPAConfiguration jpaConfiguration = JPAConfiguration.builder()
+ .driverName("driverName")
+ .driverURL("driverUrl")
+ .build();
+ JPAMailboxSessionMapperFactory mapperFactory = new JPAMailboxSessionMapperFactory(entityManagerFactory, uidProvider, modSeqProvider, jpaConfiguration);
MailboxACLResolver aclResolver = new UnionMailboxACLResolver();
MessageParser messageParser = new MessageParser();
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org