james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joac...@apache.org
Subject svn commit: r481747 - in /james/server/trunk/src/java/org/apache/james: imapserver/ImapSessionImpl.java imapserver/SelectedMailboxSession.java mailboxmanager/mailbox/MailboxSession.java mailboxmanager/repository/MailboxManagerMailRepository.java
Date Sun, 03 Dec 2006 09:55:07 GMT
Author: joachim
Date: Sun Dec  3 01:55:06 2006
New Revision: 481747

URL: http://svn.apache.org/viewvc?view=rev&rev=481747
Log:
MailboxSession.close() throws MailboxManagerException

Modified:
    james/server/trunk/src/java/org/apache/james/imapserver/ImapSessionImpl.java
    james/server/trunk/src/java/org/apache/james/imapserver/SelectedMailboxSession.java
    james/server/trunk/src/java/org/apache/james/mailboxmanager/mailbox/MailboxSession.java
    james/server/trunk/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java

Modified: james/server/trunk/src/java/org/apache/james/imapserver/ImapSessionImpl.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/imapserver/ImapSessionImpl.java?view=diff&rev=481747&r1=481746&r2=481747
==============================================================================
--- james/server/trunk/src/java/org/apache/james/imapserver/ImapSessionImpl.java (original)
+++ james/server/trunk/src/java/org/apache/james/imapserver/ImapSessionImpl.java Sun Dec 
3 01:55:06 2006
@@ -183,10 +183,13 @@
         return this.state;
     }
 
-    public void closeMailbox()
-    {
+    public void closeMailbox() {
         if (selectedMailbox != null) {
-            selectedMailbox.close();
+            try {
+                selectedMailbox.close();
+            } catch (MailboxManagerException e) {
+                getLogger().error("error closing Mailbox", e);
+            }
             selectedMailbox=null;
         }
         

Modified: james/server/trunk/src/java/org/apache/james/imapserver/SelectedMailboxSession.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/imapserver/SelectedMailboxSession.java?view=diff&rev=481747&r1=481746&r2=481747
==============================================================================
--- james/server/trunk/src/java/org/apache/james/imapserver/SelectedMailboxSession.java (original)
+++ james/server/trunk/src/java/org/apache/james/imapserver/SelectedMailboxSession.java Sun
Dec  3 01:55:06 2006
@@ -37,8 +37,6 @@
 import org.apache.james.mailboxmanager.MessageResult;
 import org.apache.james.mailboxmanager.mailbox.ImapMailboxSession;
 
-import sun.security.action.GetLongAction;
-
 public class SelectedMailboxSession extends AbstractLogEnabled implements MailboxListener
{
 
     private ImapSession _session;
@@ -79,14 +77,12 @@
     }
     
 
-    public void close()
-    {
+    public void close() throws MailboxManagerException  {
         mailbox.close();
         mailbox=null;
     }
 
-    public void create()
-    {
+    public void create() {
         throw new RuntimeException("should not create a selected mailbox");
         
     }

Modified: james/server/trunk/src/java/org/apache/james/mailboxmanager/mailbox/MailboxSession.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/mailboxmanager/mailbox/MailboxSession.java?view=diff&rev=481747&r1=481746&r2=481747
==============================================================================
--- james/server/trunk/src/java/org/apache/james/mailboxmanager/mailbox/MailboxSession.java
(original)
+++ james/server/trunk/src/java/org/apache/james/mailboxmanager/mailbox/MailboxSession.java
Sun Dec  3 01:55:06 2006
@@ -19,9 +19,11 @@
 
 package org.apache.james.mailboxmanager.mailbox;
 
+import org.apache.james.mailboxmanager.MailboxManagerException;
+
 public interface MailboxSession extends Mailbox {
 
-    void close();
+    void close() throws MailboxManagerException;
 
     boolean isWriteable();
 

Modified: james/server/trunk/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java?view=diff&rev=481747&r1=481746&r2=481747
==============================================================================
--- james/server/trunk/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java
(original)
+++ james/server/trunk/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java
Sun Dec  3 01:55:06 2006
@@ -324,8 +324,12 @@
             if (open < 1) {
                 if (open == 0) {
                     if (mailboxSession != null) {
-                        mailboxSession.close();
-                        mailboxSession = null;
+                        try {
+                            mailboxSession.close();
+                        } catch (MailboxManagerException e) {
+                            getLogger().error("error closing Mailbox", e);
+                        }
+                        mailboxSession=null;
                     }
                 } else {
                     throw new RuntimeException("use<0 !");



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