JAMES-2242 JamesMailetContext was not bound as Singleton by Guice

This is why I ended up with a null postmaster while bouncing...


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

Branch: refs/heads/master
Commit: 775de66bba207ee31728e1b9b3a707bf842d7445
Parents: 9cc4c6c
Author: benwa <btell...@linagora.com>
Authored: Wed Nov 29 15:09:39 2017 +0700
Committer: Antoine Duprat <adup...@linagora.com>
Committed: Mon Dec 4 14:42:17 2017 +0100

----------------------------------------------------------------------
 .../apache/james/modules/server/CamelMailetContainerModule.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/775de66b/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
 
b/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
index 576bef2..3680c0a 100644
--- 
a/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
+++ 
b/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
@@ -73,6 +73,8 @@ public class CamelMailetContainerModule extends 
AbstractModule {
         bind(JamesMailSpooler.class).in(Scopes.SINGLETON);
         bind(MailSpoolerMBean.class).to(JamesMailSpooler.class);
 
+        bind(MailetContext.class).to(JamesMailetContext.class);
+
         bind(MailetLoader.class).to(GuiceMailetLoader.class);
         bind(MatcherLoader.class).to(GuiceMatcherLoader.class);
 
@@ -84,7 +86,7 @@ public class CamelMailetContainerModule extends 
AbstractModule {
 
     @Provides
     @Singleton
-    private MailetContext provideMailetContext(MailQueueFactory 
mailQueueFactory,
+    private JamesMailetContext provideMailetContext(MailQueueFactory 
mailQueueFactory,
                                                     DNSService dns,
                                                     UsersRepository localusers,
                                                     DomainList domains) {


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

Reply via email to