james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [1/4] james-project git commit: JAMES-1741 relocate scope bindings in Guice modules
Date Fri, 20 May 2016 12:04:58 GMT
Repository: james-project
Updated Branches:
  refs/heads/master 03a46df84 -> 04b8c3e2b


JAMES-1741 relocate scope bindings in Guice modules


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/1a3da335
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/1a3da335
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/1a3da335

Branch: refs/heads/master
Commit: 1a3da335db3b355515f5e842d87f58094d290acf
Parents: 03a46df
Author: Benoit Tellier <btellier@linagora.com>
Authored: Thu May 19 16:46:19 2016 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Fri May 20 18:53:48 2016 +0700

----------------------------------------------------------------------
 .../james/mailbox/cassandra/CassandraMailboxManager.java     | 2 --
 .../cassandra/quota/CassandraCurrentQuotaManager.java        | 2 --
 .../cassandra/quota/CassandraPerUserMaxQuotaManager.java     | 2 --
 .../mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java  | 2 --
 .../inmemory/quota/InMemoryPerUserMaxQuotaManager.java       | 3 ---
 .../org/apache/james/mailbox/store/StoreMailboxManager.java  | 2 --
 .../james/mailbox/store/quota/CurrentQuotaCalculator.java    | 2 --
 .../james/mailbox/store/quota/FixedMaxQuotaManager.java      | 3 ---
 .../mailbox/store/quota/ListeningCurrentQuotaUpdater.java    | 2 --
 .../apache/james/mailbox/store/quota/NoMaxQuotaManager.java  | 3 ---
 .../org/apache/james/mailbox/store/quota/NoQuotaManager.java | 3 ---
 .../org/apache/james/mailbox/store/quota/NoQuotaUpdater.java | 3 ---
 .../apache/james/mailbox/store/quota/StoreQuotaManager.java  | 2 --
 .../james/mailbox/store/search/SimpleMessageSearchIndex.java | 2 --
 .../org/apache/james/core/filesystem/FileSystemImpl.java     | 2 --
 .../apache/james/modules/mailbox/CassandraMailboxModule.java | 3 ++-
 .../main/java/org/apache/james/jmap/JMAPCommonModule.java    | 8 ++++----
 .../src/main/java/org/apache/james/jmap/JMAPModule.java      | 2 ++
 .../java/org/apache/james/modules/CommonServicesModule.java  | 8 ++++----
 .../org/apache/james/modules/server/ActiveMQQueueModule.java | 2 ++
 .../james/modules/server/ConfigurationProviderModule.java    | 3 ++-
 .../org/apache/james/modules/server/DNSServiceModule.java    | 3 ++-
 .../org/apache/james/modules/server/EmbeddedActiveMQ.java    | 2 --
 .../james/modules/server/MailStoreRepositoryModule.java      | 3 +++
 .../java/org/apache/james/modules/server/QuotaModule.java    | 2 +-
 .../org/apache/james/utils/FileConfigurationProvider.java    | 2 --
 .../org/apache/james/utils/InMemoryMailRepositoryStore.java  | 3 ---
 .../apache/james/modules/server/MemoryMailQueueFactory.java  | 2 --
 .../apache/james/modules/server/MemoryMailQueueModule.java   | 3 ++-
 .../jmap/memory/access/MemoryAccessTokenRepository.java      | 2 --
 .../james/jmap/memory/vacation/MemoryVacationRepository.java | 3 ---
 .../org/apache/james/dnsservice/dnsjava/DNSJavaService.java  | 2 --
 .../java/org/apache/james/jmap/AuthenticationServlet.java    | 2 --
 .../jmap/src/main/java/org/apache/james/jmap/JMAPServer.java | 3 ---
 .../org/apache/james/jmap/crypto/AccessTokenManagerImpl.java | 2 --
 .../org/apache/james/jmap/crypto/JamesSignatureHandler.java  | 2 --
 .../james/jmap/crypto/SignedContinuationTokenManager.java    | 2 --
 37 files changed, 24 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
index c4cd3a9..1ba5369 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/CassandraMailboxManager.java
@@ -22,7 +22,6 @@ package org.apache.james.mailbox.cassandra;
 import java.util.List;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.james.mailbox.MailboxPathLocker;
 import org.apache.james.mailbox.MailboxSession;
@@ -43,7 +42,6 @@ import com.google.common.collect.Lists;
 /**
  * Cassandra implementation of {@link StoreMailboxManager}
  */
-@Singleton
 public class CassandraMailboxManager extends StoreMailboxManager {
     private final MailboxPathLocker locker;
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraCurrentQuotaManager.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraCurrentQuotaManager.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraCurrentQuotaManager.java
index 1376236..9ce4dee 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraCurrentQuotaManager.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraCurrentQuotaManager.java
@@ -37,9 +37,7 @@ import org.apache.james.mailbox.model.QuotaRoot;
 import org.apache.james.mailbox.store.quota.StoreCurrentQuotaManager;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
-@Singleton
 public class CassandraCurrentQuotaManager implements StoreCurrentQuotaManager {
 
     private final Session session;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraPerUserMaxQuotaManager.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraPerUserMaxQuotaManager.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraPerUserMaxQuotaManager.java
index 535270f..347227e 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraPerUserMaxQuotaManager.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/quota/CassandraPerUserMaxQuotaManager.java
@@ -36,9 +36,7 @@ import org.apache.james.mailbox.model.QuotaRoot;
 import org.apache.james.mailbox.quota.MaxQuotaManager;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
-@Singleton
 public class CassandraPerUserMaxQuotaManager implements MaxQuotaManager {
 
     private final Session session;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
----------------------------------------------------------------------
diff --git a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
index 1771485..f378d7f 100644
--- a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
+++ b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryCurrentQuotaManager.java
@@ -23,7 +23,6 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.atomic.AtomicLong;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.james.mailbox.MailboxListener;
 import org.apache.james.mailbox.MailboxManager;
@@ -39,7 +38,6 @@ import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
 
-@Singleton
 public class InMemoryCurrentQuotaManager implements StoreCurrentQuotaManager {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(InMemoryCurrentQuotaManager.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryPerUserMaxQuotaManager.java
----------------------------------------------------------------------
diff --git a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryPerUserMaxQuotaManager.java
b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryPerUserMaxQuotaManager.java
index ed2b09a..dabfb10 100644
--- a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryPerUserMaxQuotaManager.java
+++ b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/quota/InMemoryPerUserMaxQuotaManager.java
@@ -26,9 +26,6 @@ import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.Quota;
 import org.apache.james.mailbox.model.QuotaRoot;
 
-import javax.inject.Singleton;
-
-@Singleton
 public class InMemoryPerUserMaxQuotaManager implements MaxQuotaManager {
 
     private long maxMessage = Quota.UNLIMITED;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
index 462f170..228344e 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
@@ -27,7 +27,6 @@ import java.util.Random;
 
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.james.mailbox.MailboxListener;
 import org.apache.james.mailbox.MailboxManager;
@@ -80,7 +79,6 @@ import com.google.common.collect.Lists;
  * If you need a more low-level api just implement {@link MailboxManager} directly
  *
  */
-@Singleton
 public class StoreMailboxManager implements MailboxManager {
 
     public static final char SQL_WILDCARD_CHAR = '%';

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
index 77dc150..0a7df7d 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
@@ -23,7 +23,6 @@ import java.util.Iterator;
 import java.util.List;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.exception.MailboxException;
@@ -41,7 +40,6 @@ import com.google.common.base.Function;
 import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
 
-@Singleton
 public class CurrentQuotaCalculator {
 
     private final MailboxSessionMapperFactory factory;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/FixedMaxQuotaManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/FixedMaxQuotaManager.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/FixedMaxQuotaManager.java
index 5e20522..244935d 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/FixedMaxQuotaManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/FixedMaxQuotaManager.java
@@ -6,14 +6,11 @@ import org.apache.james.mailbox.quota.MaxQuotaManager;
 import org.apache.james.mailbox.model.Quota;
 import org.apache.james.mailbox.model.QuotaRoot;
 
-import javax.inject.Singleton;
-
 /**
  * {@link MaxQuotaManager} which use the same quota for all users.
  *
  * By default this means not quota at all
  */
-@Singleton
 public class FixedMaxQuotaManager implements MaxQuotaManager {
     private long maxStorage = Quota.UNLIMITED;
     private long maxMessage = Quota.UNLIMITED;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java
index 6b60bef..df3f0cc 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/ListeningCurrentQuotaUpdater.java
@@ -26,9 +26,7 @@ import org.apache.james.mailbox.model.QuotaRoot;
 import org.apache.james.mailbox.quota.QuotaRootResolver;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
-@Singleton
 public class ListeningCurrentQuotaUpdater implements MailboxListener, QuotaUpdater {
 
     private StoreCurrentQuotaManager currentQuotaManager;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoMaxQuotaManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoMaxQuotaManager.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoMaxQuotaManager.java
index d98734b..6b28e98 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoMaxQuotaManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoMaxQuotaManager.java
@@ -24,14 +24,11 @@ import org.apache.james.mailbox.model.Quota;
 import org.apache.james.mailbox.model.QuotaRoot;
 import org.apache.james.mailbox.quota.MaxQuotaManager;
 
-import javax.inject.Singleton;
-
 /**
  * A Max Quota Manager that simply throws exceptions
  *
  * Intended to be used to disactivate Max Quota admin support
  */
-@Singleton
 public class NoMaxQuotaManager implements MaxQuotaManager {
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java
index ac383d0..64b58b2 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaManager.java
@@ -24,12 +24,9 @@ import org.apache.james.mailbox.model.Quota;
 import org.apache.james.mailbox.model.QuotaRoot;
 import org.apache.james.mailbox.quota.QuotaManager;
 
-import javax.inject.Singleton;
-
 /**
  * This quota manager is intended to be used when you want to deactivate the Quota feature
  */
-@Singleton
 public class NoQuotaManager implements QuotaManager {
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaUpdater.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaUpdater.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaUpdater.java
index 7b9cb1d..82d23d7 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaUpdater.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/NoQuotaUpdater.java
@@ -19,8 +19,5 @@
 
 package org.apache.james.mailbox.store.quota;
 
-import javax.inject.Singleton;
-
-@Singleton
 public class NoQuotaUpdater implements QuotaUpdater {
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/StoreQuotaManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/StoreQuotaManager.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/StoreQuotaManager.java
index cae94a1..c1923cf 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/StoreQuotaManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/StoreQuotaManager.java
@@ -27,14 +27,12 @@ import org.apache.james.mailbox.model.Quota;
 import org.apache.james.mailbox.model.QuotaRoot;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 /**
  * Default implementation for the Quota Manager.
  *
  * Relies on the CurrentQuotaManager and MaxQuotaManager provided.
  */
-@Singleton
 public class StoreQuotaManager implements QuotaManager {
     private CurrentQuotaManager currentQuotaManager;
     private MaxQuotaManager maxQuotaManager;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
index 6c43ddc..99d38f6 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
@@ -24,7 +24,6 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.exception.MailboxException;
@@ -48,7 +47,6 @@ import org.apache.james.mailbox.store.mail.model.MailboxMessage;
  * 
  *
  */
-@Singleton
 public class SimpleMessageSearchIndex implements MessageSearchIndex {
 
     private final MessageMapperFactory factory;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/core/src/main/java/org/apache/james/core/filesystem/FileSystemImpl.java
----------------------------------------------------------------------
diff --git a/server/container/core/src/main/java/org/apache/james/core/filesystem/FileSystemImpl.java
b/server/container/core/src/main/java/org/apache/james/core/filesystem/FileSystemImpl.java
index 7724d76..b4dfadc 100644
--- a/server/container/core/src/main/java/org/apache/james/core/filesystem/FileSystemImpl.java
+++ b/server/container/core/src/main/java/org/apache/james/core/filesystem/FileSystemImpl.java
@@ -24,12 +24,10 @@ import java.io.IOException;
 import java.io.InputStream;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.james.filesystem.api.FileSystem;
 import org.apache.james.filesystem.api.JamesDirectoriesProvider;
 
-@Singleton
 public class FileSystemImpl implements FileSystem {
 
     private final JamesDirectoriesProvider directoryProvider;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
index 6bbba65..d17a626 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
@@ -44,6 +44,7 @@ import org.apache.james.utils.MailboxManagerDefinition;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
 import com.google.inject.Provides;
+import com.google.inject.Scopes;
 import com.google.inject.multibindings.Multibinder;
 import com.google.inject.name.Named;
 
@@ -61,7 +62,7 @@ public class CassandraMailboxModule extends AbstractModule {
         bind(MailboxSessionMapperFactory.class).to(CassandraMailboxSessionMapperFactory.class);
         bind(MailboxPathLocker.class).to(NoMailboxPathLocker.class);
         bind(Authenticator.class).to(UserRepositoryAuthenticator.class);
-        bind(MailboxManager.class).to(CassandraMailboxManager.class);
+        bind(MailboxManager.class).to(CassandraMailboxManager.class).in(Scopes.SINGLETON);
 
         Multibinder<CassandraModule> cassandraDataDefinitions = Multibinder.newSetBinder(binder(),
CassandraModule.class);
         cassandraDataDefinitions.addBinding().to(org.apache.james.mailbox.cassandra.modules.CassandraAclModule.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPCommonModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPCommonModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPCommonModule.java
index 9275010..a3a7f02 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPCommonModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPCommonModule.java
@@ -48,12 +48,12 @@ public class JMAPCommonModule extends AbstractModule {
 
     @Override
     protected void configure() {
-        bind(SignatureHandler.class).to(JamesSignatureHandler.class);
-        bind(ZonedDateTimeProvider.class).to(DefaultZonedDateTimeProvider.class);
-        bind(ContinuationTokenManager.class).to(SignedContinuationTokenManager.class);
+        bind(SignatureHandler.class).to(JamesSignatureHandler.class).in(Scopes.SINGLETON);
+        bind(ZonedDateTimeProvider.class).to(DefaultZonedDateTimeProvider.class).in(Scopes.SINGLETON);
+        bind(ContinuationTokenManager.class).to(SignedContinuationTokenManager.class).in(Scopes.SINGLETON);
 
         bindConstant().annotatedWith(Names.named(AccessTokenRepository.TOKEN_EXPIRATION_IN_MS)).to(DEFAULT_TOKEN_EXPIRATION_IN_MS);
-        bind(AccessTokenManager.class).to(AccessTokenManagerImpl.class);
+        bind(AccessTokenManager.class).to(AccessTokenManagerImpl.class).in(Scopes.SINGLETON);
 
         bind(MailSpool.class).in(Singleton.class);
         bind(MailFactory.class).in(Singleton.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPModule.java
index 54c0839..b7c809f 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/jmap/JMAPModule.java
@@ -44,6 +44,7 @@ import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
 import com.google.inject.Provides;
+import com.google.inject.Scopes;
 import com.google.inject.Singleton;
 import com.google.inject.multibindings.Multibinder;
 
@@ -54,6 +55,7 @@ public class JMAPModule extends AbstractModule {
     protected void configure() {
         install(new JMAPCommonModule());
         install(new MethodsModule());
+        bind(JMAPServer.class).in(Scopes.SINGLETON);
         bind(RequestHandler.class).in(Singleton.class);
         Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(MoveCapabilityPrecondition.class);
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/modules/CommonServicesModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/CommonServicesModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/CommonServicesModule.java
index 02cb0c5..fea8fcd 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/CommonServicesModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/CommonServicesModule.java
@@ -39,6 +39,7 @@ import org.apache.onami.lifecycle.jsr250.PreDestroyModule;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Provides;
+import com.google.inject.Scopes;
 
 public class CommonServicesModule extends AbstractModule {
     
@@ -54,10 +55,9 @@ public class CommonServicesModule extends AbstractModule {
         install(new PreDestroyModule());
         install(new DNSServiceModule());
         install(new AsyncTasksExecutorModule());
-        
-        bind(FileSystem.class).to(FileSystemImpl.class);
-        bind(ConfigurationProvider.class).to(FileConfigurationProvider.class);
-        bind(GuiceServerProbe.class).in(Singleton.class);
+
+        bind(FileSystem.class).to(FileSystemImpl.class).in(Scopes.SINGLETON);
+        bind(GuiceServerProbe.class).in(Scopes.SINGLETON);
     }
 
     @Provides @Singleton @Named(CONFIGURATION_PATH)

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ActiveMQQueueModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ActiveMQQueueModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ActiveMQQueueModule.java
index e6edbbc..e39bfbd 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ActiveMQQueueModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ActiveMQQueueModule.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Provides;
+import com.google.inject.Scopes;
 import com.google.inject.Singleton;
 
 public class ActiveMQQueueModule extends AbstractModule {
@@ -38,6 +39,7 @@ public class ActiveMQQueueModule extends AbstractModule {
     
     @Override
     protected void configure() {
+        bind(EmbeddedActiveMQ.class).in(Scopes.SINGLETON);
         bind(MailQueueItemDecoratorFactory.class).to(PostDequeueDecoratorFactory.class).in(Singleton.class);
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ConfigurationProviderModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ConfigurationProviderModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ConfigurationProviderModule.java
index f9d3cff..dff1a1e 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ConfigurationProviderModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/ConfigurationProviderModule.java
@@ -22,12 +22,13 @@ import org.apache.james.utils.ConfigurationProvider;
 import org.apache.james.utils.FileConfigurationProvider;
 
 import com.google.inject.AbstractModule;
+import com.google.inject.Scopes;
 
 public class ConfigurationProviderModule extends AbstractModule {
 
     @Override
     public void configure() {
-        bind(ConfigurationProvider.class).to(FileConfigurationProvider.class);
+        bind(ConfigurationProvider.class).to(FileConfigurationProvider.class).in(Scopes.SINGLETON);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
index 91eb004..d987dbf 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
@@ -32,6 +32,7 @@ import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
+import com.google.inject.Scopes;
 import com.google.inject.Singleton;
 import com.google.inject.multibindings.Multibinder;
 
@@ -41,7 +42,7 @@ public class DNSServiceModule extends AbstractModule {
 
     @Override
     protected void configure() {
-        bind(DNSService.class).to(DNSJavaService.class);
+        bind(DNSService.class).to(DNSJavaService.class).in(Scopes.SINGLETON);
         Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(DNSServiceConfigurationPerformer.class);
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/EmbeddedActiveMQ.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/EmbeddedActiveMQ.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/EmbeddedActiveMQ.java
index 3c34f74..748ae5b 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/EmbeddedActiveMQ.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/EmbeddedActiveMQ.java
@@ -35,9 +35,7 @@ import org.apache.james.queue.activemq.FileSystemBlobTransferPolicy;
 
 import com.google.common.base.Throwables;
 import com.google.inject.Inject;
-import com.google.inject.Singleton;
 
-@Singleton
 public class EmbeddedActiveMQ {
 
     private final ActiveMQConnectionFactory activeMQConnectionFactory;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
index 6a1b31f..b5d1b35 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
@@ -36,6 +36,7 @@ import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
+import com.google.inject.Scopes;
 import com.google.inject.Singleton;
 import com.google.inject.multibindings.Multibinder;
 
@@ -43,7 +44,9 @@ public class MailStoreRepositoryModule extends AbstractModule {
 
     @Override
     protected void configure() {
+        bind(InMemoryMailRepositoryStore.class).in(Scopes.SINGLETON);
         bind(MailRepositoryStore.class).to(InMemoryMailRepositoryStore.class);
+
         Multibinder<MailRepositoryProvider> multibinder = Multibinder.newSetBinder(binder(),
MailRepositoryProvider.class);
         multibinder.addBinding().to(FileMailRepositoryProvider.class);
         Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(MailRepositoryStoreModuleConfigurationPerformer.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/QuotaModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/QuotaModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/QuotaModule.java
index f8e7815..659434d 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/QuotaModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/QuotaModule.java
@@ -31,7 +31,7 @@ public class QuotaModule extends AbstractModule {
 
     @Override
     protected void configure() {
-        bind(QuotaManager.class).to(NoQuotaManager.class);
+        bind(QuotaManager.class).to(NoQuotaManager.class).in(Scopes.SINGLETON);
         bind(QuotaRootResolver.class).to(DefaultQuotaRootResolver.class).in(Scopes.SINGLETON);
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/utils/FileConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/FileConfigurationProvider.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/FileConfigurationProvider.java
index b28a94a..78144c6 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/FileConfigurationProvider.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/FileConfigurationProvider.java
@@ -37,9 +37,7 @@ import com.google.common.base.Preconditions;
 import com.google.common.base.Splitter;
 import com.google.common.base.Strings;
 import com.google.common.collect.Iterables;
-import com.google.inject.Singleton;
 
-@Singleton
 public class FileConfigurationProvider implements ConfigurationProvider {
 
     private static final String CONFIGURATION_FILE_SUFFIX = ".xml";

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/guice-common/src/main/java/org/apache/james/utils/InMemoryMailRepositoryStore.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/InMemoryMailRepositoryStore.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/InMemoryMailRepositoryStore.java
index cda5a3b..85b9dad 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/InMemoryMailRepositoryStore.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/InMemoryMailRepositoryStore.java
@@ -27,8 +27,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.stream.Collectors;
 
-import javax.inject.Singleton;
-
 import org.apache.commons.configuration.CombinedConfiguration;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.DefaultConfigurationBuilder;
@@ -43,7 +41,6 @@ import org.slf4j.LoggerFactory;
 
 import com.google.inject.Inject;
 
-@Singleton
 public class InMemoryMailRepositoryStore implements MailRepositoryStore, Configurable {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(InMemoryMailRepositoryStore.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueFactory.java
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueFactory.java
b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueFactory.java
index df24931..75466e4 100644
--- a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueFactory.java
+++ b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueFactory.java
@@ -35,9 +35,7 @@ import org.apache.mailet.Mail;
 import com.google.common.base.Objects;
 import com.google.common.base.Throwables;
 import com.google.inject.Inject;
-import com.google.inject.Singleton;
 
-@Singleton
 public class MemoryMailQueueFactory implements MailQueueFactory {
 
     private final ConcurrentHashMap<String, MailQueue> mailQueues;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueModule.java
b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueModule.java
index 2698900..1e9c5b1 100644
--- a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueModule.java
+++ b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueModule.java
@@ -24,13 +24,14 @@ import org.apache.james.queue.api.MailQueueFactory;
 import org.apache.james.queue.api.MailQueueItemDecoratorFactory;
 
 import com.google.inject.AbstractModule;
+import com.google.inject.Scopes;
 import com.google.inject.Singleton;
 
 public class MemoryMailQueueModule extends AbstractModule {
 
     @Override
     protected void configure() {
-        bind(MailQueueFactory.class).to(MemoryMailQueueFactory.class);
+        bind(MailQueueFactory.class).to(MemoryMailQueueFactory.class).in(Scopes.SINGLETON);
         bind(MailQueueItemDecoratorFactory.class).to(PostDequeueDecoratorFactory.class).in(Singleton.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepository.java
----------------------------------------------------------------------
diff --git a/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepository.java
b/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepository.java
index b236599..18f3645 100644
--- a/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepository.java
+++ b/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/access/MemoryAccessTokenRepository.java
@@ -25,7 +25,6 @@ import java.util.concurrent.CompletionException;
 
 import javax.inject.Inject;
 import javax.inject.Named;
-import javax.inject.Singleton;
 
 import org.apache.commons.collections4.map.PassiveExpiringMap;
 import org.apache.james.jmap.api.access.AccessToken;
@@ -34,7 +33,6 @@ import org.apache.james.jmap.api.access.exceptions.InvalidAccessToken;
 
 import com.google.common.base.Preconditions;
 
-@Singleton
 public class MemoryAccessTokenRepository implements AccessTokenRepository {
 
     private final PassiveExpiringMap<AccessToken, String> tokensExpirationDates;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/vacation/MemoryVacationRepository.java
----------------------------------------------------------------------
diff --git a/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/vacation/MemoryVacationRepository.java
b/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/vacation/MemoryVacationRepository.java
index d5a1fc0..3e5337b 100644
--- a/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/vacation/MemoryVacationRepository.java
+++ b/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/vacation/MemoryVacationRepository.java
@@ -23,15 +23,12 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.CompletableFuture;
 
-import javax.inject.Singleton;
-
 import org.apache.james.jmap.api.vacation.AccountId;
 import org.apache.james.jmap.api.vacation.Vacation;
 import org.apache.james.jmap.api.vacation.VacationRepository;
 
 import com.google.common.base.Preconditions;
 
-@Singleton
 public class MemoryVacationRepository implements VacationRepository {
 
     private final Map<AccountId, Vacation> vacationMap;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java
----------------------------------------------------------------------
diff --git a/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java
b/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java
index f4aadec..fbb44f0 100644
--- a/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java
+++ b/server/dns-service/dnsservice-dnsjava/src/main/java/org/apache/james/dnsservice/dnsjava/DNSJavaService.java
@@ -44,7 +44,6 @@ import org.xbill.DNS.TextParseException;
 import org.xbill.DNS.Type;
 
 import javax.annotation.PostConstruct;
-import javax.inject.Singleton;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
@@ -57,7 +56,6 @@ import java.util.List;
 /**
  * Provides DNS client functionality to services running inside James
  */
-@Singleton
 public class DNSJavaService implements DNSService, DNSServiceMBean, LogEnabled, Configurable
{
 
     /**

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/protocols/jmap/src/main/java/org/apache/james/jmap/AuthenticationServlet.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/AuthenticationServlet.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/AuthenticationServlet.java
index f784ddd..2984a7d 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/AuthenticationServlet.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/AuthenticationServlet.java
@@ -21,7 +21,6 @@ package org.apache.james.jmap;
 import java.io.IOException;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
@@ -46,7 +45,6 @@ import org.slf4j.LoggerFactory;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.annotations.VisibleForTesting;
 
-@Singleton
 public class AuthenticationServlet extends HttpServlet {
 
     public static final String JSON_CONTENT_TYPE = "application/json";

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServer.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServer.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServer.java
index 867ecbd..17ac730 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServer.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServer.java
@@ -23,7 +23,6 @@ import static org.apache.james.jmap.BypassAuthOnRequestMethod.bypass;
 
 import javax.annotation.PreDestroy;
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.HierarchicalConfiguration;
@@ -34,8 +33,6 @@ import org.apache.james.lifecycle.api.Configurable;
 
 import com.google.common.base.Throwables;
 
-
-@Singleton
 public class JMAPServer implements Configurable {
 
     private final JettyHttpServer server;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
index 633554f..cf99e9c 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
@@ -22,7 +22,6 @@ package org.apache.james.jmap.crypto;
 import java.util.concurrent.CompletionException;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.james.jmap.api.AccessTokenManager;
 import org.apache.james.jmap.api.access.AccessToken;
@@ -32,7 +31,6 @@ import org.apache.james.jmap.api.access.exceptions.InvalidAccessToken;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Throwables;
 
-@Singleton
 public class AccessTokenManagerImpl implements AccessTokenManager {
 
     private final AccessTokenRepository accessTokenRepository;

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
index 220e44e..deb2426 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
@@ -30,7 +30,6 @@ import java.security.Signature;
 import java.security.SignatureException;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.commons.codec.binary.Base64;
 import org.apache.james.filesystem.api.FileSystem;
@@ -42,7 +41,6 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Throwables;
 
-@Singleton
 public class JamesSignatureHandler implements SignatureHandler {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(JamesSignatureHandler.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/1a3da335/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/SignedContinuationTokenManager.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/SignedContinuationTokenManager.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/SignedContinuationTokenManager.java
index 328359a..781c424 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/SignedContinuationTokenManager.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/SignedContinuationTokenManager.java
@@ -23,7 +23,6 @@ import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
 
 import javax.inject.Inject;
-import javax.inject.Singleton;
 
 import org.apache.james.jmap.api.ContinuationTokenManager;
 import org.apache.james.jmap.model.ContinuationToken;
@@ -31,7 +30,6 @@ import org.apache.james.jmap.utils.ZonedDateTimeProvider;
 
 import com.google.common.base.Preconditions;
 
-@Singleton
 public class SignedContinuationTokenManager implements ContinuationTokenManager {
 
     private final SignatureHandler signatureHandler;


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message