james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [2/4] james-project git commit: JAMES-1741 Some services were not binded in Scope Singleton
Date Fri, 20 May 2016 12:04:59 GMT
JAMES-1741 Some services were not binded in Scope Singleton


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

Branch: refs/heads/master
Commit: 0b4cf7ee93b066d4cf2aed62164dcfb97b4e3b9a
Parents: 1a3da33
Author: Benoit Tellier <btellier@linagora.com>
Authored: Thu May 19 17:29:11 2016 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Fri May 20 19:04:06 2016 +0700

----------------------------------------------------------------------
 .../james/modules/mailbox/CassandraMailboxModule.java  | 13 ++++++++++---
 .../modules/mailbox/ElasticSearchMailboxModule.java    |  4 ++++
 .../org/apache/james/modules/server/SieveModule.java   |  2 ++
 3 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/0b4cf7ee/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 d17a626..48aae4a 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
@@ -52,17 +52,24 @@ public class CassandraMailboxModule extends AbstractModule {
 
     @Override
     protected void configure() {
+        bind(CassandraMailboxSessionMapperFactory.class).in(Scopes.SINGLETON);
+        bind(CassandraMailboxManager.class).in(Scopes.SINGLETON);
+        bind(NoMailboxPathLocker.class).in(Scopes.SINGLETON);
+        bind(CassandraSubscriptionManager.class).in(Scopes.SINGLETON);
+        bind(CassandraModSeqProvider.class).in(Scopes.SINGLETON);
+        bind(CassandraUidProvider.class).in(Scopes.SINGLETON);
+        bind(UserRepositoryAuthenticator.class).in(Scopes.SINGLETON);
+
         bind(MessageMapperFactory.class).to(CassandraMailboxSessionMapperFactory.class);
         bind(MailboxMapperFactory.class).to(CassandraMailboxSessionMapperFactory.class);
         bind(MailboxSessionMapperFactory.class).to(CassandraMailboxSessionMapperFactory.class);
+
         bind(ModSeqProvider.class).to(CassandraModSeqProvider.class);
         bind(UidProvider.class).to(CassandraUidProvider.class);
-
         bind(SubscriptionManager.class).to(CassandraSubscriptionManager.class);
-        bind(MailboxSessionMapperFactory.class).to(CassandraMailboxSessionMapperFactory.class);
         bind(MailboxPathLocker.class).to(NoMailboxPathLocker.class);
         bind(Authenticator.class).to(UserRepositoryAuthenticator.class);
-        bind(MailboxManager.class).to(CassandraMailboxManager.class).in(Scopes.SINGLETON);
+        bind(MailboxManager.class).to(CassandraMailboxManager.class);
 
         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/0b4cf7ee/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchMailboxModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchMailboxModule.java
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchMailboxModule.java
index 53f1666..2d6fd07 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchMailboxModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchMailboxModule.java
@@ -40,6 +40,7 @@ import org.elasticsearch.client.transport.NoNodeAvailableException;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Provides;
+import com.google.inject.Scopes;
 import com.nurkiewicz.asyncretry.AsyncRetryExecutor;
 
 public class ElasticSearchMailboxModule extends AbstractModule {
@@ -49,7 +50,10 @@ public class ElasticSearchMailboxModule extends AbstractModule {
 
     @Override
     protected void configure() {
+        bind(ElasticSearchListeningMessageSearchIndex.class).in(Scopes.SINGLETON);
         bind(MessageSearchIndex.class).to(ElasticSearchListeningMessageSearchIndex.class);
+
+        bind(TikaTextExtractor.class).in(Scopes.SINGLETON);
         bind(TextExtractor.class).to(TikaTextExtractor.class);
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/0b4cf7ee/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/SieveModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/SieveModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/SieveModule.java
index 726f815..b41ddfa 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/SieveModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/SieveModule.java
@@ -23,11 +23,13 @@ import org.apache.james.managesieve.api.SieveParser;
 import org.apache.james.managesieve.jsieve.Parser;
 
 import com.google.inject.AbstractModule;
+import com.google.inject.Scopes;
 
 public class SieveModule extends AbstractModule {
 
     @Override
     protected void configure() {
+        bind(Parser.class).in(Scopes.SINGLETON);
         bind(SieveParser.class).to(Parser.class);
     }
 


---------------------------------------------------------------------
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