You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/07/29 13:37:44 UTC
svn commit: r980410 -
/james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java
Author: norman
Date: Thu Jul 29 11:37:44 2010
New Revision: 980410
URL: http://svn.apache.org/viewvc?rev=980410&view=rev
Log:
Only add the delegatingMailboxListener one time
Modified:
james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java
Modified: james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java?rev=980410&r1=980409&r2=980410&view=diff
==============================================================================
--- james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java (original)
+++ james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMailboxManager.java Thu Jul 29 11:37:44 2010
@@ -60,6 +60,7 @@ public abstract class StoreMailboxManage
private final MailboxEventDispatcher dispatcher = new MailboxEventDispatcher();
private final DelegatingMailboxListener delegatingListener = new DelegatingMailboxListener();
+
protected final MailboxSessionMapperFactory<Id> mailboxSessionMapperFactory;
private UidConsumer<Id> consumer;
@@ -68,6 +69,9 @@ public abstract class StoreMailboxManage
super(authenticator, subscriber);
this.consumer = consumer;
this.mailboxSessionMapperFactory = mailboxSessionMapperFactory;
+
+ // The dispatcher need to have the delegating listener added
+ dispatcher.addMailboxListener(delegatingListener);
}
/**
@@ -114,9 +118,7 @@ public abstract class StoreMailboxManage
} else {
getLog().debug("Loaded mailbox " + mailboxPath);
- StoreMessageManager<Id> result = createMessageManager(dispatcher, consumer, mailboxRow, session);
- result.addListener(delegatingListener);
- return result;
+ return createMessageManager(dispatcher, consumer, mailboxRow, session);
}
}
}
@@ -302,8 +304,7 @@ public abstract class StoreMailboxManage
final MailboxMapper<Id> mapper = mailboxSessionMapperFactory.getMailboxMapper(session);
mapper.findMailboxByPath(mailboxPath);
return true;
- }
- catch (MailboxNotFoundException e) {
+ } catch (MailboxNotFoundException e) {
return false;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org