james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joac...@apache.org
Subject svn commit: r481748 - in /james/server/sandbox/mailbox-namespaces/src/java/org/apache/james: imapserver/ImapSessionImpl.java imapserver/SelectedMailboxSession.java mailboxmanager/repository/MailboxManagerMailRepository.java
Date Sun, 03 Dec 2006 10:01:49 GMT
Author: joachim
Date: Sun Dec  3 02:01:46 2006
New Revision: 481748

URL: http://svn.apache.org/viewvc?view=rev&rev=481748
Log:
merged in logging from trunk

Modified:
    james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/ImapSessionImpl.java
    james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/SelectedMailboxSession.java
    james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java

Modified: james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/ImapSessionImpl.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/ImapSessionImpl.java?view=diff&rev=481748&r1=481747&r2=481748
==============================================================================
--- james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/ImapSessionImpl.java
(original)
+++ james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/ImapSessionImpl.java
Sun Dec  3 02:01:46 2006
@@ -22,6 +22,7 @@
 
 import javax.mail.Flags;
 
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.james.imapserver.store.MailboxException;
 import org.apache.james.imapserver.store.MessageFlags;
 import org.apache.james.mailboxmanager.MailboxManagerException;
@@ -35,7 +36,7 @@
 /**
  * @version $Revision: 109034 $
  */
-public final class ImapSessionImpl implements ImapSession, ImapConstants
+public final class ImapSessionImpl extends AbstractLogEnabled implements ImapSession, ImapConstants
 {
     private ImapSessionState state = ImapSessionState.NON_AUTHENTICATED;
     private User user = null;
@@ -166,6 +167,7 @@
     public void setSelected( ImapMailboxSession mailbox, boolean readOnly ) throws MailboxManagerException
     {
         SelectedMailboxSession sessionMailbox = new SelectedMailboxSession(mailbox, this,
readOnly);
+        setupLogger(sessionMailbox);
         this.state = ImapSessionState.SELECTED;
         closeMailbox();
         this.selectedMailbox = sessionMailbox;
@@ -181,12 +183,12 @@
         return this.state;
     }
 
-    public void closeMailbox() 
-    {
+    public void closeMailbox() {
         if (selectedMailbox != null) {
             try {
                 selectedMailbox.close();
             } catch (MailboxManagerException e) {
+                getLogger().error("error closing Mailbox", e);
             }
             selectedMailbox=null;
         }

Modified: james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/SelectedMailboxSession.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/SelectedMailboxSession.java?view=diff&rev=481748&r1=481747&r2=481748
==============================================================================
--- james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/SelectedMailboxSession.java
(original)
+++ james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/imapserver/SelectedMailboxSession.java
Sun Dec  3 02:01:46 2006
@@ -30,13 +30,14 @@
 
 import javax.mail.Flags;
 
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.james.imapserver.store.MailboxException;
 import org.apache.james.mailboxmanager.MailboxListener;
 import org.apache.james.mailboxmanager.MailboxManagerException;
 import org.apache.james.mailboxmanager.MessageResult;
 import org.apache.james.mailboxmanager.mailbox.ImapMailboxSession;
 
-public class SelectedMailboxSession implements MailboxListener {
+public class SelectedMailboxSession extends AbstractLogEnabled implements MailboxListener
{
 
     private ImapSession _session;
     private boolean _readonly;
@@ -62,6 +63,7 @@
         try {
             _session.closeConnection("Mailbox " + mailbox.getName() + " has been deleted");
         } catch (MailboxManagerException e) {
+            getLogger().error("error closing connection", e);
         }
     }
 
@@ -75,14 +77,12 @@
     }
     
 
-    public void close() throws MailboxManagerException
-    {
+    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/sandbox/mailbox-namespaces/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java?view=diff&rev=481748&r1=481747&r2=481748
==============================================================================
--- james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java
(original)
+++ james/server/sandbox/mailbox-namespaces/src/java/org/apache/james/mailboxmanager/repository/MailboxManagerMailRepository.java
Sun Dec  3 02:01:46 2006
@@ -323,6 +323,7 @@
                         try {
                             mailboxSession.close();
                         } catch (MailboxManagerException e) {
+                            getLogger().error("error closing Mailbox", e);
                         }
                         mailboxSession=null;
                     }



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