james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r731050 - in /james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor: base/AbstractMailboxAwareProcessor.java base/ImapSessionUtils.java imap4rev1/LoginProcessor.java
Date Sat, 03 Jan 2009 17:56:15 GMT
Author: rdonkin
Date: Sat Jan  3 09:56:15 2009
New Revision: 731050

URL: http://svn.apache.org/viewvc?rev=731050&view=rev
Log:
Set mailbox session on LOGIN

Modified:
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractMailboxAwareProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/ImapSessionUtils.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/imap4rev1/LoginProcessor.java

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractMailboxAwareProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractMailboxAwareProcessor.java?rev=731050&r1=731049&r2=731050&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractMailboxAwareProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractMailboxAwareProcessor.java
Sat Jan  3 09:56:15 2009
@@ -334,10 +334,6 @@
                 session.setAttribute(
                         ImapSessionUtils.MAILBOX_MANAGER_ATTRIBUTE_SESSION_KEY,
                         result);
-                if (ImapSessionUtils.getMailboxSession(session) == null) {
-                    final MailboxSession mailboxSession = (MailboxSession) result.createSession();
-                    ImapSessionUtils.setMailboxSession(session, mailboxSession);
-                }
             }
         }
         return result;

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/ImapSessionUtils.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/ImapSessionUtils.java?rev=731050&r1=731049&r2=731050&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/ImapSessionUtils.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/ImapSessionUtils.java
Sat Jan  3 09:56:15 2009
@@ -38,13 +38,6 @@
         return result;
     }
 
-    public static void setMailboxSession(final ImapSession session,
-            final MailboxSession mailboxSession) {
-        session.setAttribute(
-                ImapSessionUtils.MAILBOX_SESSION_ATTRIBUTE_SESSION_KEY,
-                mailboxSession);
-    }
-
     public static String getUserName(final ImapSession session) {
         final String result = (String) session
                 .getAttribute(MAILBOX_USER_ATTRIBUTE_SESSION_KEY);

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/imap4rev1/LoginProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/imap4rev1/LoginProcessor.java?rev=731050&r1=731049&r2=731050&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/imap4rev1/LoginProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/imap4rev1/LoginProcessor.java
Sat Jan  3 09:56:15 2009
@@ -29,6 +29,7 @@
 import org.apache.james.imap.mailbox.MailboxException;
 import org.apache.james.imap.mailbox.MailboxManager;
 import org.apache.james.imap.mailbox.MailboxManagerProvider;
+import org.apache.james.imap.mailbox.MailboxSession;
 import org.apache.james.imap.message.request.imap4rev1.LoginRequest;
 import org.apache.james.imap.processor.base.AbstractMailboxAwareProcessor;
 import org.apache.james.imap.processor.base.ImapSessionUtils;
@@ -62,8 +63,12 @@
             final MailboxManager mailboxManager = getMailboxManager(session);
             if (mailboxManager.isAuthentic(userid, passwd)) {
                 session.authenticated();
+                final MailboxSession mailboxSession = mailboxManager.createSession();
+                session.setAttribute(
+                        ImapSessionUtils.MAILBOX_SESSION_ATTRIBUTE_SESSION_KEY,
+                        mailboxSession);
                 ImapSessionUtils.setUserName(session, userid);
-                getMailboxManager(session).getMailbox(buildFullName(session, MailboxManager.INBOX),
true);
+                mailboxManager.getMailbox(buildFullName(session, MailboxManager.INBOX), true);
                 okComplete(command, tag, responder);
             } else {
                 final Integer currentNumberOfFailures = (Integer) session



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