james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [4/4] james-project git commit: JAMES-1727 Camel processors should be bound in scope singleton
Date Thu, 19 May 2016 10:06:11 GMT
JAMES-1727 Camel processors should be bound 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/f6ba5d50
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/f6ba5d50
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/f6ba5d50

Branch: refs/heads/master
Commit: f6ba5d502abcb5ff632ca2ec04736cc36e81657a
Parents: eb3bfd0
Author: Benoit Tellier <btellier@linagora.com>
Authored: Thu May 19 15:17:30 2016 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Thu May 19 15:22:33 2016 +0700

----------------------------------------------------------------------
 .../james/modules/server/CamelMailetContainerModule.java     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/f6ba5d50/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
index b3aede8..de270d4 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
@@ -47,6 +47,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;
 
@@ -58,10 +59,15 @@ public class CamelMailetContainerModule extends AbstractModule {
 
     @Override
     protected void configure() {
-        bind(MailProcessor.class).to(CamelCompositeProcessor.class).in(Singleton.class);
+        bind(CamelCompositeProcessor.class).in(Scopes.SINGLETON);
+        bind(MailProcessor.class).to(CamelCompositeProcessor.class);
+
+        bind(JamesMailSpooler.class).in(Scopes.SINGLETON);
         bind(MailSpoolerMBean.class).to(JamesMailSpooler.class);
+
         bind(MailetLoader.class).to(GuiceMailetLoader.class);
         bind(MatcherLoader.class).to(GuiceMatcherLoader.class);
+
         Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(MailetModuleConfigurationPerformer.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