james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1075221 - in /james/mailbox/trunk: ./ api/ api/src/main/java/org/apache/james/mailbox/ api/src/test/java/org/apache/james/mailbox/ api/src/test/java/org/apache/james/mailbox/mock/ jcr/ jcr/src/main/java/org/apache/james/mailbox/jcr/ jcr/sr...
Date Mon, 28 Feb 2011 06:46:27 GMT
Author: norman
Date: Mon Feb 28 06:46:25 2011
New Revision: 1075221

URL: http://svn.apache.org/viewvc?rev=1075221&view=rev
Log:
Replace commons-logging with slf4j. Thanks to Felix Knecht for the patch. See MAILBOX-40 and JAMES-1149

Modified:
    james/mailbox/trunk/api/pom.xml
    james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxManager.java
    james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxSession.java
    james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractMailboxManagerTest.java
    james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractStressTest.java
    james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
    james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxManager.java
    james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxSession.java
    james/mailbox/trunk/jcr/pom.xml
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRMapper.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRScalingMapper.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRSubscriptionManager.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMailboxMapper.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRHeader.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMessage.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java
    james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java
    james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java
    james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRStressTest.java
    james/mailbox/trunk/jpa/pom.xml
    james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java
    james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAStressTest.java
    james/mailbox/trunk/maildir/pom.xml
    james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java
    james/mailbox/trunk/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxManagerTest.java
    james/mailbox/trunk/memory/pom.xml
    james/mailbox/trunk/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManagerTest.java
    james/mailbox/trunk/pom.xml
    james/mailbox/trunk/store/pom.xml
    james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearcher.java
    james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearches.java
    james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SearchQueryIterator.java
    james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java
    james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
    james/mailbox/trunk/tool/pom.xml
    james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/copier/MailboxCopierImpl.java
    james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/jpa/migrator/JpaMigrator.java
    james/mailbox/trunk/tool/src/test/java/org/apache/james/mailbox/copier/MailboxCopierTest.java

Modified: james/mailbox/trunk/api/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/pom.xml?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/api/pom.xml (original)
+++ james/mailbox/trunk/api/pom.xml Mon Feb 28 06:46:25 2011
@@ -33,8 +33,13 @@
       <artifactId>${javax.mail.artifactId}</artifactId>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>junit</groupId>

Modified: james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxManager.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxManager.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxManager.java (original)
+++ james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxManager.java Mon Feb 28 06:46:25 2011
@@ -21,7 +21,7 @@ package org.apache.james.mailbox;
 
 import java.util.List;
 
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 
 /**
@@ -158,7 +158,7 @@ public interface MailboxManager extends 
      * @throws BadCredentialsException when system access is not allowed for the given user
      * @throws MailboxException when the creation fails for other reasons
      */
-    public MailboxSession createSystemSession(String userName, Log log) throws BadCredentialsException, MailboxException;
+    public MailboxSession createSystemSession(String userName, Logger log) throws BadCredentialsException, MailboxException;
 
     /**
      * Autenticates the given user against the given password.
@@ -172,7 +172,7 @@ public interface MailboxManager extends 
      * @throws BadCredentialsException when system access is denighed for the given user
      * @throws MailboxException when the creation fails for other reasons
      */
-    MailboxSession login(String userid, String passwd, Log log) throws BadCredentialsException, MailboxException;
+    MailboxSession login(String userid, String passwd, Logger log) throws BadCredentialsException, MailboxException;
     
     /**
      * <p>Logs the session out, freeing any resources.

Modified: james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxSession.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxSession.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxSession.java (original)
+++ james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxSession.java Mon Feb 28 06:46:25 2011
@@ -24,7 +24,7 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 /**
  * Mailbox session.
@@ -54,7 +54,7 @@ public interface MailboxSession {
      * Gets the logger for this session context.
      * @return not null
      */
-    public Log getLog();
+    public Logger getLog();
     
     /**
      * Gets the user executing this session.

Modified: james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractMailboxManagerTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractMailboxManagerTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractMailboxManagerTest.java (original)
+++ james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractMailboxManagerTest.java Mon Feb 28 06:46:25 2011
@@ -18,9 +18,9 @@
  ****************************************************************/
 package org.apache.james.mailbox;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.junit.Assert;
 import org.junit.Test;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -37,7 +37,7 @@ public abstract class AbstractMailboxMan
     public void testBasicOperations() throws BadCredentialsException, MailboxException {
         MailboxManager manager = createMailboxManager();
         
-        MailboxSession session = manager.createSystemSession(USER1, new SimpleLog("Mock"));
+        MailboxSession session = manager.createSystemSession(USER1, LoggerFactory.getLogger("Mock"));
         Assert.assertEquals(USER1, session.getUser().getUserName());
         
         manager.startProcessingRequest(session);

Modified: james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractStressTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractStressTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractStressTest.java (original)
+++ james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/AbstractStressTest.java Mon Feb 28 06:46:25 2011
@@ -27,7 +27,6 @@ import java.util.concurrent.atomic.Atomi
 
 import javax.mail.Flags;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.MailboxConstants;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxManager;
@@ -35,6 +34,7 @@ import org.apache.james.mailbox.MailboxP
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
 import org.junit.Test;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractStressTest {
 
@@ -49,7 +49,7 @@ public abstract class AbstractStressTest
         final CountDownLatch latch = new CountDownLatch(APPEND_OPERATIONS);
         final ExecutorService pool = Executors.newFixedThreadPool(APPEND_OPERATIONS/2);
         
-        MailboxSession session = getMailboxManager().createSystemSession("test", new SimpleLog("Test"));
+        MailboxSession session = getMailboxManager().createSystemSession("test", LoggerFactory.getLogger("Test"));
         getMailboxManager().startProcessingRequest(session);
         final MailboxPath path = new MailboxPath(MailboxConstants.USER_NAMESPACE, "username", "INBOX");
         getMailboxManager().createMailbox(path, session);
@@ -69,7 +69,7 @@ public abstract class AbstractStressTest
                     
 
                     try {
-                        MailboxSession session = getMailboxManager().createSystemSession("test", new SimpleLog("Test"));
+                        MailboxSession session = getMailboxManager().createSystemSession("test", LoggerFactory.getLogger("Test"));
 
                         getMailboxManager().startProcessingRequest(session);
                         MessageManager m = getMailboxManager().getMailbox(path, session);

Modified: james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java (original)
+++ james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java Mon Feb 28 06:46:25 2011
@@ -22,9 +22,9 @@ import java.io.UnsupportedEncodingExcept
 
 import junit.framework.Assert;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.mock.MockMailboxManager;
 import org.junit.Test;
+import org.slf4j.LoggerFactory;
 
 /**
  * Test the {@link StoreMailboxManager} methods that 
@@ -54,7 +54,7 @@ public abstract class MailboxManagerTest
 
         setMailboxManager(new MockMailboxManager(getMailboxManager()).getMockMailboxManager());
 
-        MailboxSession mailboxSession = getMailboxManager().createSystemSession("manager", new SimpleLog("testList"));
+        MailboxSession mailboxSession = getMailboxManager().createSystemSession("manager", LoggerFactory.getLogger("testList"));
         getMailboxManager().startProcessingRequest(mailboxSession);
         Assert.assertEquals(MockMailboxManager.EXPECTED_MAILBOXES_COUNT, getMailboxManager().list(mailboxSession).size());
 

Modified: james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxManager.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxManager.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxManager.java (original)
+++ james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxManager.java Mon Feb 28 06:46:25 2011
@@ -24,12 +24,12 @@ import java.util.Calendar;
 
 import javax.mail.Flags;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxPath;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
+import org.slf4j.LoggerFactory;
 
 /**
  * A mock mailbox manager.
@@ -114,7 +114,7 @@ public class MockMailboxManager {
                 
                 String folderName = "INBOX";
 
-                MailboxSession mailboxSession = getMockMailboxManager().createSystemSession(user, new SimpleLog("mailboxmanager-test"));
+                MailboxSession mailboxSession = getMockMailboxManager().createSystemSession(user, LoggerFactory.getLogger("mailboxmanager-test"));
                 mailboxPath = new MailboxPath("#private", user, folderName);
                 createMailbox(mailboxSession, mailboxPath);
                 

Modified: james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxSession.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxSession.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxSession.java (original)
+++ james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/mock/MockMailboxSession.java Mon Feb 28 06:46:25 2011
@@ -26,18 +26,18 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Random;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.MailboxConstants;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MailboxSession.User;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class MockMailboxSession implements MailboxSession{
 
     private User user;
     private boolean close;
     private Map<Object, Object> attrs = new HashMap<Object, Object>();
-    private SimpleLog log = new SimpleLog("MockLog");
+    private Logger log = LoggerFactory.getLogger("MockLog");
     private final static Random RANDOM = new Random();
 
     private long sessionId = RANDOM.nextLong();
@@ -67,7 +67,7 @@ public class MockMailboxSession implemen
         return attrs;
     }
 
-    public Log getLog() {
+    public Logger getLog() {
         return log;
     }
 

Modified: james/mailbox/trunk/jcr/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/pom.xml?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/pom.xml (original)
+++ james/mailbox/trunk/jcr/pom.xml Mon Feb 28 06:46:25 2011
@@ -37,10 +37,15 @@
       <artifactId>apache-james-mailbox-store</artifactId>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
     </dependency>	
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>   
+    <dependency>
       <groupId>${javax.mail.groupId}</groupId>
       <artifactId>${javax.mail.artifactId}</artifactId>
     </dependency>
@@ -84,11 +89,6 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.james</groupId>
       <artifactId>apache-james-mailbox-api</artifactId>
       <scope>test</scope>

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRMapper.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRMapper.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRMapper.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRMapper.java Mon Feb 28 06:46:25 2011
@@ -21,10 +21,10 @@ package org.apache.james.mailbox.jcr;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.store.transaction.TransactionalMapper;
+import org.slf4j.Logger;
 
 /**
  * Abstract Mapper base class for Level 1 Implementations of JCR. So no real transaction management is used. 
@@ -35,12 +35,12 @@ import org.apache.james.mailbox.store.tr
 public abstract class AbstractJCRMapper extends TransactionalMapper implements JCRImapConstants {
     public final static String MAILBOXES_PATH =  "mailboxes";
 
-    private final Log logger;
+    private final Logger logger;
     private final MailboxSessionJCRRepository repository;
     protected final MailboxSession mSession;
 
     
-    public AbstractJCRMapper(final MailboxSessionJCRRepository repository, MailboxSession mSession, Log logger) {
+    public AbstractJCRMapper(final MailboxSessionJCRRepository repository, MailboxSession mSession, Logger logger) {
         this.repository = repository;
         this.mSession = mSession;
         this.logger = logger;
@@ -51,7 +51,7 @@ public abstract class AbstractJCRMapper 
      * 
      * @return logger
      */
-    protected Log getLogger() {
+    protected Logger getLogger() {
         return logger;
     }
     

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRScalingMapper.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRScalingMapper.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRScalingMapper.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/AbstractJCRScalingMapper.java Mon Feb 28 06:46:25 2011
@@ -21,9 +21,9 @@ package org.apache.james.mailbox.jcr;
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.logging.Log;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.james.mailbox.MailboxSession;
+import org.slf4j.Logger;
 
 /**
  * Abstract base class for Mapper's which support scaling 
@@ -34,7 +34,7 @@ public abstract class AbstractJCRScaling
     private final int scaling;
     private final static char PAD ='_';
     
-    public AbstractJCRScalingMapper(MailboxSessionJCRRepository repository, MailboxSession mSession, int scaling, Log logger) {
+    public AbstractJCRScalingMapper(MailboxSessionJCRRepository repository, MailboxSession mSession, int scaling, Logger logger) {
         super(repository, mSession, logger);
         this.scaling = scaling;
     }

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxManager.java Mon Feb 28 06:46:25 2011
@@ -18,8 +18,6 @@
  ****************************************************************/
 package org.apache.james.mailbox.jcr;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxPath;
 import org.apache.james.mailbox.MailboxPathLocker;
@@ -32,6 +30,8 @@ import org.apache.james.mailbox.store.St
 import org.apache.james.mailbox.store.mail.UidProvider;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 import org.apache.james.mailbox.util.MailboxEventDispatcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * JCR implementation of a MailboxManager
@@ -40,7 +40,7 @@ import org.apache.james.mailbox.util.Mai
 public class JCRMailboxManager extends StoreMailboxManager<String> implements JCRImapConstants {
 
     private final JCRMailboxSessionMapperFactory mapperFactory;
-    private final Log logger = LogFactory.getLog(JCRMailboxManager.class);
+    private final Logger logger = LoggerFactory.getLogger(JCRMailboxManager.class);
     
     public JCRMailboxManager(JCRMailboxSessionMapperFactory mapperFactory, final Authenticator authenticator, final UidProvider<String> uidProvider) {
 	    this(mapperFactory, authenticator, uidProvider, new JVMMailboxPathLocker());

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMailboxSessionMapperFactory.java Mon Feb 28 06:46:25 2011
@@ -18,9 +18,6 @@
  ****************************************************************/
 package org.apache.james.mailbox.jcr;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.SubscriptionException;
@@ -31,6 +28,8 @@ import org.apache.james.mailbox.store.Ma
 import org.apache.james.mailbox.store.mail.MailboxMapper;
 import org.apache.james.mailbox.store.mail.MessageMapper;
 import org.apache.james.mailbox.store.user.SubscriptionMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * JCR implementation of a {@link MailboxSessionMapperFactory}
@@ -40,7 +39,7 @@ import org.apache.james.mailbox.store.us
 public class JCRMailboxSessionMapperFactory extends MailboxSessionMapperFactory<String> {
 
     private final MailboxSessionJCRRepository repository;
-    private final Log logger;
+    private final Logger logger;
     private final static int DEFAULT_SCALING = 2;
     private final int scaling;
     private int messageScaling;
@@ -51,7 +50,7 @@ public class JCRMailboxSessionMapperFact
 
     public JCRMailboxSessionMapperFactory(final MailboxSessionJCRRepository repository, final int scaling, final int messageScaling) {
         this.repository = repository;
-        this.logger = LogFactory.getLog(JCRMailboxSessionMapperFactory.class);
+        this.logger = LoggerFactory.getLogger(JCRMailboxSessionMapperFactory.class);
         this.scaling = scaling;
         this.messageScaling = messageScaling;
     }

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRMessageManager.java Mon Feb 28 06:46:25 2011
@@ -25,7 +25,6 @@ import java.util.List;
 
 import javax.mail.Flags;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.jcr.mail.model.JCRHeader;
 import org.apache.james.mailbox.jcr.mail.model.JCRMailbox;
@@ -36,6 +35,7 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.mail.model.MailboxMembership;
 import org.apache.james.mailbox.store.mail.model.PropertyBuilder;
 import org.apache.james.mailbox.util.MailboxEventDispatcher;
+import org.slf4j.Logger;
 
 /**
  * JCR implementation of a {@link MapperStoreMessageManager}
@@ -43,10 +43,10 @@ import org.apache.james.mailbox.util.Mai
  */
 public class JCRMessageManager extends StoreMessageManager<String> {
 
-    private final Log log;
+    private final Logger log;
 
     public JCRMessageManager(JCRMailboxSessionMapperFactory mapperFactory, final UidProvider<String> uidProvider,
-            final MailboxEventDispatcher dispatcher, final JCRMailbox mailbox, final Log log, final char delimiter) throws MailboxException {
+            final MailboxEventDispatcher dispatcher, final JCRMailbox mailbox, final Logger log, final char delimiter) throws MailboxException {
         super(mapperFactory, uidProvider, dispatcher, mailbox);
         this.log = log;
     }

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRSubscriptionManager.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRSubscriptionManager.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRSubscriptionManager.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/JCRSubscriptionManager.java Mon Feb 28 06:46:25 2011
@@ -18,19 +18,19 @@
  ****************************************************************/
 package org.apache.james.mailbox.jcr;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.jcr.user.model.JCRSubscription;
 import org.apache.james.mailbox.store.StoreSubscriptionManager;
 import org.apache.james.mailbox.store.user.model.Subscription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * JCR implementation of a SubscriptionManager
  */
 public class JCRSubscriptionManager extends StoreSubscriptionManager implements JCRImapConstants {
     
-    private final Log logger = LogFactory.getLog(JCRSubscriptionManager.class);
+    private final Logger logger = LoggerFactory.getLogger(JCRSubscriptionManager.class);
 
     public JCRSubscriptionManager(JCRMailboxSessionMapperFactory mapperFactory) {
         super(mapperFactory);

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMailboxMapper.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMailboxMapper.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMailboxMapper.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMailboxMapper.java Mon Feb 28 06:46:25 2011
@@ -29,7 +29,6 @@ import javax.jcr.query.Query;
 import javax.jcr.query.QueryManager;
 import javax.jcr.query.QueryResult;
 
-import org.apache.commons.logging.Log;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.jackrabbit.util.ISO9075;
@@ -43,6 +42,7 @@ import org.apache.james.mailbox.jcr.Mail
 import org.apache.james.mailbox.jcr.mail.model.JCRMailbox;
 import org.apache.james.mailbox.store.mail.MailboxMapper;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
+import org.slf4j.Logger;
 
 /**
  * JCR implementation of a MailboxMapper
@@ -52,7 +52,7 @@ import org.apache.james.mailbox.store.ma
 public class JCRMailboxMapper extends AbstractJCRScalingMapper implements MailboxMapper<String> {
 
 
-	public JCRMailboxMapper(final MailboxSessionJCRRepository repos, MailboxSession session, final int scaling, final Log logger) {
+	public JCRMailboxMapper(final MailboxSessionJCRRepository repos, MailboxSession session, final int scaling, final Logger logger) {
         super(repos, session, scaling, logger);
     }
 

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/JCRMessageMapper.java Mon Feb 28 06:46:25 2011
@@ -34,7 +34,6 @@ import javax.jcr.query.QueryManager;
 import javax.jcr.query.QueryResult;
 import javax.mail.Flags;
 
-import org.apache.commons.logging.Log;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.jackrabbit.util.ISO9075;
 import org.apache.james.mailbox.MailboxException;
@@ -52,6 +51,7 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 import org.apache.james.mailbox.store.mail.model.MailboxMembership;
 import org.apache.james.mailbox.store.mail.model.UpdatedFlags;
+import org.slf4j.Logger;
 
 /**
  * JCR implementation of a {@link MessageMapper}. The implementation store each message as 
@@ -104,12 +104,12 @@ public class JCRMessageMapper extends Ab
      * @param session {@link MailboxSession} to which the mapper is bound
      * @param logger Log
      */
-    public JCRMessageMapper(final MailboxSessionJCRRepository repos, MailboxSession session, final Log logger, int scaleType) {
+    public JCRMessageMapper(final MailboxSessionJCRRepository repos, MailboxSession session, final Logger logger, int scaleType) {
         super(repos, session, logger);
         this.scaleType = scaleType;
     }
     
-    public JCRMessageMapper(final MailboxSessionJCRRepository repos, MailboxSession session, final Log logger) {
+    public JCRMessageMapper(final MailboxSessionJCRRepository repos, MailboxSession session, final Logger logger) {
         this(repos, session, logger, MESSAGE_SCALE_DAY);
     }
     

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRHeader.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRHeader.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRHeader.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRHeader.java Mon Feb 28 06:46:25 2011
@@ -21,11 +21,11 @@ package org.apache.james.mailbox.jcr.mai
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.mailbox.jcr.JCRImapConstants;
 import org.apache.james.mailbox.jcr.Persistent;
 import org.apache.james.mailbox.store.mail.model.AbstractComparableHeader;
 import org.apache.james.mailbox.store.mail.model.Header;
+import org.slf4j.Logger;
 
 /**
  * JCR implementation of a {@link Header}
@@ -42,25 +42,25 @@ public class JCRHeader extends AbstractC
     private String fieldName;
     private String value;
     private int lineNumber;
-    private Log logger;
+    private Logger logger;
     private Node node;
     
     /**
      * Copies the content of an existing header.
      * @param header
      */
-    public JCRHeader(Header header, Log logger) {
+    public JCRHeader(Header header, Logger logger) {
         this(header.getLineNumber(), header.getFieldName(), header.getValue(), logger);
     }
     
-    public JCRHeader(Node node, Log logger) {
+    public JCRHeader(Node node, Logger logger) {
         this.node = node;
         this.logger = logger;
     }
     
     
     
-    public JCRHeader(final int lineNumber, final String fieldName, final String value, Log logger) {
+    public JCRHeader(final int lineNumber, final String fieldName, final String value, Logger logger) {
         this.fieldName = fieldName;
         this.value = value;
         this.lineNumber = lineNumber;

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMailbox.java Mon Feb 28 06:46:25 2011
@@ -21,13 +21,13 @@ package org.apache.james.mailbox.jcr.mai
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.logging.Log;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.util.Text;
 import org.apache.james.mailbox.MailboxPath;
 import org.apache.james.mailbox.jcr.JCRImapConstants;
 import org.apache.james.mailbox.jcr.Persistent;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
+import org.slf4j.Logger;
 
 
 /**
@@ -45,7 +45,7 @@ public class JCRMailbox implements Mailb
 
     private String name;
     private long uidValidity;
-    private final Log logger;
+    private final Logger logger;
     private Node node;
 
 
@@ -53,7 +53,7 @@ public class JCRMailbox implements Mailb
     private String user;
     
     
-    public JCRMailbox( final MailboxPath path, final long uidValidity, Log logger) {
+    public JCRMailbox( final MailboxPath path, final long uidValidity, Logger logger) {
         this.name = path.getName();
         this.namespace = path.getNamespace();
         this.user = path.getUser();
@@ -61,12 +61,12 @@ public class JCRMailbox implements Mailb
         this.logger = logger;
     }
     
-    public JCRMailbox( final Node node, final Log logger) {
+    public JCRMailbox( final Node node, final Logger logger) {
         this.node = node;
         this.logger = logger;
     }
     
-    public Log getLog() {
+    public Logger getLog() {
         return logger;
     }
 

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMessage.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMessage.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMessage.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRMessage.java Mon Feb 28 06:46:25 2011
@@ -32,7 +32,6 @@ import javax.jcr.NodeIterator;
 import javax.jcr.RepositoryException;
 import javax.mail.Flags;
 
-import org.apache.commons.logging.Log;
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.james.mailbox.MailboxException;
@@ -46,6 +45,7 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.mail.model.PropertyBuilder;
 import org.apache.james.mailbox.store.streaming.LazySkippingInputStream;
 import org.apache.james.mailbox.store.streaming.StreamUtils;
+import org.slf4j.Logger;
 
 /**
  * JCR implementation of {@link Message}
@@ -54,7 +54,7 @@ import org.apache.james.mailbox.store.st
 public class JCRMessage extends AbstractMessage implements MailboxMembership<String>, JCRImapConstants, Persistent{
 
     private Node node;
-    private final Log logger;
+    private final Logger logger;
     private InputStream content;
     private List<JCRHeader> headers;
     private String mediaType;
@@ -94,14 +94,14 @@ public class JCRMessage extends Abstract
     public final static String TEXTUAL_LINE_COUNT_PROPERTY  = "jamesMailbox:messageTextualLineCount";
     public final static String SUBTYPE_PROPERTY  = "jamesMailbox:messageSubType";
 
-    public JCRMessage(Node node, Log logger) {
+    public JCRMessage(Node node, Logger logger) {
         this.logger= logger;
         this.node = node;
     }
     
     public JCRMessage(String mailboxUUID, long uid, Date internalDate, int size, Flags flags, InputStream content,
             int bodyStartOctet, final List<JCRHeader> headers,
-            final PropertyBuilder propertyBuilder, Log logger) {
+            final PropertyBuilder propertyBuilder, Logger logger) {
         super();
         this.mailboxUUID = mailboxUUID;
         this.internalDate = internalDate;
@@ -132,7 +132,7 @@ public class JCRMessage extends Abstract
      * @param message
      * @throws IOException 
      */
-    public JCRMessage(String mailboxUUID, long uid,  JCRMessage message, Log logger) throws MailboxException {
+    public JCRMessage(String mailboxUUID, long uid,  JCRMessage message, Logger logger) throws MailboxException {
         this.mailboxUUID = mailboxUUID;
         this.internalDate = message.getInternalDate();
         this.size = message.getFullContentOctets();

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/mail/model/JCRProperty.java Mon Feb 28 06:46:25 2011
@@ -21,12 +21,11 @@ package org.apache.james.mailbox.jcr.mai
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.logging.Log;
-
 import org.apache.james.mailbox.jcr.JCRImapConstants;
 import org.apache.james.mailbox.jcr.Persistent;
 import org.apache.james.mailbox.store.mail.model.AbstractComparableProperty;
 import org.apache.james.mailbox.store.mail.model.Property;
+import org.slf4j.Logger;
 
 /**
  * JCR implementation of {@link Property}
@@ -35,7 +34,7 @@ import org.apache.james.mailbox.store.ma
 public class JCRProperty extends AbstractComparableProperty<JCRProperty> implements JCRImapConstants, Persistent {
 
     private Node node;
-    private final Log logger;
+    private final Logger logger;
     private String namespace;
     private String localName;
     private String value;
@@ -46,12 +45,12 @@ public class JCRProperty extends Abstrac
     public final static String VALUE_PROPERTY =  "jamesMailbox:propertyValue";
     public final static String ORDER_PROPERTY =  "jamesMailbox:propertyOrder";
 
-    public JCRProperty(final Node node, final Log logger) {
+    public JCRProperty(final Node node, final Logger logger) {
         this.node = node;
         this.logger = logger;
     }
 
-    public JCRProperty(final String namespace, final String localName, final String value, final int order, Log logger) {
+    public JCRProperty(final String namespace, final String localName, final String value, final int order, Logger logger) {
         this.namespace = namespace;
         this.localName = localName;
         this.value = value;
@@ -59,7 +58,7 @@ public class JCRProperty extends Abstrac
         this.logger = logger;
     }
 
-    public JCRProperty(Property property, int order, Log logger) {
+    public JCRProperty(Property property, int order, Logger logger) {
         this(property.getNamespace(), property.getLocalName(), property.getValue(), order, logger);
     }
     /*

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/JCRSubscriptionMapper.java Mon Feb 28 06:46:25 2011
@@ -31,7 +31,6 @@ import javax.jcr.query.Query;
 import javax.jcr.query.QueryManager;
 import javax.jcr.query.QueryResult;
 
-import org.apache.commons.logging.Log;
 import org.apache.jackrabbit.commons.JcrUtils;
 import org.apache.jackrabbit.util.Text;
 import org.apache.james.mailbox.MailboxConstants;
@@ -42,6 +41,7 @@ import org.apache.james.mailbox.jcr.Mail
 import org.apache.james.mailbox.jcr.user.model.JCRSubscription;
 import org.apache.james.mailbox.store.user.SubscriptionMapper;
 import org.apache.james.mailbox.store.user.model.Subscription;
+import org.slf4j.Logger;
 
 /**
  * JCR implementation of a SubscriptionManager
@@ -49,7 +49,7 @@ import org.apache.james.mailbox.store.us
  */
 public class JCRSubscriptionMapper extends AbstractJCRScalingMapper implements SubscriptionMapper {
 
-    public JCRSubscriptionMapper(final MailboxSessionJCRRepository repos, MailboxSession session, final int scaling, final Log log) {
+    public JCRSubscriptionMapper(final MailboxSessionJCRRepository repos, MailboxSession session, final int scaling, final Logger log) {
         super(repos,session, scaling, log);
     }
 

Modified: james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java (original)
+++ james/mailbox/trunk/jcr/src/main/java/org/apache/james/mailbox/jcr/user/model/JCRSubscription.java Mon Feb 28 06:46:25 2011
@@ -27,10 +27,10 @@ import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.mailbox.jcr.JCRImapConstants;
 import org.apache.james.mailbox.jcr.Persistent;
 import org.apache.james.mailbox.store.user.model.Subscription;
+import org.slf4j.Logger;
 
 /**
  * JCR implementation of a {@link Subscription}.
@@ -42,18 +42,18 @@ public class JCRSubscription implements 
     public final static String MAILBOXES_PROPERTY =  "jamesMailbox:subscriptionMailboxes";
     
     private Node node;
-    private final Log log;
+    private final Logger log;
     private String mailbox;
     private String username;
 
     
-    public JCRSubscription(Node node, String mailbox, Log log) {
+    public JCRSubscription(Node node, String mailbox, Logger log) {
         this.node = node;
         this.log = log;
         this.mailbox = mailbox;
     }
 
-    public JCRSubscription(String username, String mailbox, Log log) {
+    public JCRSubscription(String username, String mailbox, Logger log) {
         this.username = username;
         this.mailbox = mailbox;
         this.log = log;

Modified: james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java (original)
+++ james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java Mon Feb 28 06:46:25 2011
@@ -24,7 +24,6 @@ import javax.jcr.RepositoryException;
 
 import junit.framework.Assert;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.jackrabbit.core.RepositoryImpl;
 import org.apache.jackrabbit.core.config.ConfigurationException;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
@@ -35,6 +34,7 @@ import org.apache.james.mailbox.MailboxS
 import org.apache.james.mailbox.jcr.mail.JCRCachingUidProvider;
 import org.junit.After;
 import org.junit.Before;
+import org.slf4j.LoggerFactory;
 import org.xml.sax.InputSource;
 
 /**
@@ -64,7 +64,7 @@ public class JCRMailboxManagerTest exten
      */
     @After
     public void tearDown() throws BadCredentialsException, MailboxException {
-        MailboxSession session = getMailboxManager().createSystemSession("test", new SimpleLog("Test"));
+        MailboxSession session = getMailboxManager().createSystemSession("test", LoggerFactory.getLogger("Test"));
         session.close();
         repository.shutdown();
         new File(JACKRABBIT_HOME).delete();

Modified: james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRStressTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRStressTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRStressTest.java (original)
+++ james/mailbox/trunk/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRStressTest.java Mon Feb 28 06:46:25 2011
@@ -22,7 +22,6 @@ import java.io.File;
 
 import javax.jcr.RepositoryException;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.jackrabbit.core.RepositoryImpl;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.apache.james.mailbox.AbstractStressTest;
@@ -32,6 +31,7 @@ import org.apache.james.mailbox.MailboxS
 import org.apache.james.mailbox.jcr.mail.JCRCachingUidProvider;
 import org.junit.After;
 import org.junit.Before;
+import org.slf4j.LoggerFactory;
 import org.xml.sax.InputSource;
 
 public class JCRStressTest extends AbstractStressTest {
@@ -65,7 +65,7 @@ public class JCRStressTest extends Abstr
     
     @After
     public void tearDown() {
-        MailboxSession session = mailboxManager.createSystemSession("test", new SimpleLog("Test"));
+        MailboxSession session = mailboxManager.createSystemSession("test", LoggerFactory.getLogger("Test"));
         session.close();
         repository.shutdown();
         new File(JACKRABBIT_HOME).delete();

Modified: james/mailbox/trunk/jpa/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jpa/pom.xml?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jpa/pom.xml (original)
+++ james/mailbox/trunk/jpa/pom.xml Mon Feb 28 06:46:25 2011
@@ -77,8 +77,13 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java (original)
+++ james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java Mon Feb 28 06:46:25 2011
@@ -22,7 +22,6 @@ import java.util.HashMap;
 
 import javax.persistence.EntityManagerFactory;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.BadCredentialsException;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxManagerTest;
@@ -40,6 +39,7 @@ import org.apache.james.mailbox.jpa.user
 import org.apache.openjpa.persistence.OpenJPAPersistence;
 import org.junit.After;
 import org.junit.Before;
+import org.slf4j.LoggerFactory;
 
 /**
  * JPAMailboxManagerTest that extends the StoreMailboxManagerTest.
@@ -70,7 +70,7 @@ public class JPAMailboxManagerTest exten
     @After
     public void tearDown() throws BadCredentialsException, MailboxException {
         deleteAllMailboxes();
-        MailboxSession session = getMailboxManager().createSystemSession("test", new SimpleLog("Test"));
+        MailboxSession session = getMailboxManager().createSystemSession("test", LoggerFactory.getLogger("Test"));
         session.close();
         entityManagerFactory.close();
     }
@@ -111,7 +111,7 @@ public class JPAMailboxManagerTest exten
     }
     
     private void deleteAllMailboxes() throws BadCredentialsException, MailboxException {
-        MailboxSession session = getMailboxManager().createSystemSession("test", new SimpleLog("Test"));
+        MailboxSession session = getMailboxManager().createSystemSession("test", LoggerFactory.getLogger("Test"));
         try {
             ((OpenJPAMailboxManager) mailboxManager).deleteEverything(session);
         } catch (MailboxException e) {

Modified: james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAStressTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAStressTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAStressTest.java (original)
+++ james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAStressTest.java Mon Feb 28 06:46:25 2011
@@ -23,7 +23,6 @@ import java.util.HashMap;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.AbstractStressTest;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxManager;
@@ -41,6 +40,7 @@ import org.apache.james.mailbox.jpa.user
 import org.apache.openjpa.persistence.OpenJPAPersistence;
 import org.junit.After;
 import org.junit.Before;
+import org.slf4j.LoggerFactory;
 
 /**
  * Proof of bug https://issues.apache.org/jira/browse/IMAP-137
@@ -95,7 +95,7 @@ public class JPAStressTest extends Abstr
     
     @After
     public void tearDown() {
-        MailboxSession session = mailboxManager.createSystemSession("test", new SimpleLog("Test"));
+        MailboxSession session = mailboxManager.createSystemSession("test", LoggerFactory.getLogger("Test"));
         try {
             mailboxManager.deleteEverything(session);
         } catch (MailboxException e) {

Modified: james/mailbox/trunk/maildir/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/maildir/pom.xml?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/maildir/pom.xml (original)
+++ james/mailbox/trunk/maildir/pom.xml Mon Feb 28 06:46:25 2011
@@ -62,6 +62,15 @@
       <artifactId>commons-io</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>${javax.mail.groupId}</groupId>
       <artifactId>${javax.mail.artifactId}</artifactId>
     </dependency>

Modified: james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java (original)
+++ james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/MaildirFolder.java Mon Feb 28 06:46:25 2011
@@ -38,15 +38,15 @@ import java.util.SortedMap;
 import java.util.TreeMap;
 
 import org.apache.commons.lang.ArrayUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class MaildirFolder {
 
     /**
      * The logger.
      */
-    private Log log = LogFactory.getLog(MaildirFolder.class.getName());
+    private Logger log = LoggerFactory.getLogger(MaildirFolder.class.getName());
 
     public static final String VALIDITY_FILE = "james-uidvalidity";
     public static final String UIDLIST_FILE = "james-uidlist";

Modified: james/mailbox/trunk/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxManagerTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxManagerTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxManagerTest.java (original)
+++ james/mailbox/trunk/maildir/src/test/java/org/apache/james/mailbox/maildir/MaildirMailboxManagerTest.java Mon Feb 28 06:46:25 2011
@@ -29,7 +29,6 @@ import java.util.Date;
 import javax.mail.Flags;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.MailboxConstants;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxExistsException;
@@ -39,6 +38,7 @@ import org.apache.james.mailbox.MailboxS
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.LoggerFactory;
 
 /**
  * MaildirMailboxManagerTest that extends the StoreMailboxManagerTest.
@@ -116,7 +116,7 @@ public class MaildirMailboxManagerTest e
             manager.init();
     
             String user = "test@localhost";
-            MailboxSession session = manager.createSystemSession(user, new SimpleLog("Test"));
+            MailboxSession session = manager.createSystemSession(user, LoggerFactory.getLogger("Test"));
             manager.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, user, "Trash"), session);
             manager.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, user, "INBOX.testfolder"), session);
             

Modified: james/mailbox/trunk/memory/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/memory/pom.xml?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/memory/pom.xml (original)
+++ james/mailbox/trunk/memory/pom.xml Mon Feb 28 06:46:25 2011
@@ -41,6 +41,16 @@
       <artifactId>apache-james-mailbox-store</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.james</groupId>
       <artifactId>apache-james-mailbox-api</artifactId>
       <scope>test</scope>

Modified: james/mailbox/trunk/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManagerTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManagerTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManagerTest.java (original)
+++ james/mailbox/trunk/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMailboxManagerTest.java Mon Feb 28 06:46:25 2011
@@ -18,7 +18,6 @@
  ****************************************************************/
 package org.apache.james.mailbox.inmemory;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.BadCredentialsException;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxManagerTest;
@@ -27,6 +26,7 @@ import org.apache.james.mailbox.inmemory
 import org.apache.james.mailbox.store.MockAuthenticator;
 import org.junit.After;
 import org.junit.Before;
+import org.slf4j.LoggerFactory;
 
 /**
  * InMemoryMailboxManagerTest that extends the MailboxManagerTest.
@@ -51,7 +51,7 @@ public class InMemoryMailboxManagerTest 
      */
     @After
     public void tearDown() throws BadCredentialsException, MailboxException {
-        MailboxSession session = getMailboxManager().createSystemSession("test", new SimpleLog("Test"));
+        MailboxSession session = getMailboxManager().createSystemSession("test", LoggerFactory.getLogger("Test"));
         session.close();
     }
 

Modified: james/mailbox/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/pom.xml?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/pom.xml (original)
+++ james/mailbox/trunk/pom.xml Mon Feb 28 06:46:25 2011
@@ -347,6 +347,24 @@
         </exclusions>
       </dependency>
 
+      <!-- 
+        START Logging
+      -->
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
+        <version>1.6.1</version>
+      </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-simple</artifactId>
+        <version>1.6.1</version>
+        <scope>test</scope>
+      </dependency>
+      <!-- 
+        START Logging
+      -->
+       
       <!--
         Start Commons
       -->
@@ -356,29 +374,6 @@
         <version>${version.commons-collections}</version>
       </dependency>
       <dependency>
-        <groupId>commons-logging</groupId>
-        <artifactId>commons-logging</artifactId>
-        <version>${version.commons-logging}</version>
-        <exclusions>
-          <exclusion>
-            <artifactId>logkit</artifactId>
-            <groupId>logkit</groupId>
-          </exclusion>
-          <exclusion>
-            <artifactId>avalon-framework</artifactId>
-            <groupId>avalon-framework</groupId>
-          </exclusion>
-          <exclusion>
-            <artifactId>log4j</artifactId>
-            <groupId>log4j</groupId>
-          </exclusion>
-          <exclusion>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
         <groupId>commons-lang</groupId>
         <artifactId>commons-lang</artifactId>
         <version>${version.commons-lang}</version>
@@ -531,12 +526,6 @@
         <version>${version.jackrabbit}</version>
         <scope>test</scope>
       </dependency>
-      <dependency>
-        <groupId>org.slf4j</groupId>
-        <artifactId>slf4j-log4j12</artifactId>
-        <version>1.5.7</version>
-        <scope>test</scope>
-      </dependency>
 
       <dependency>
         <groupId>xerces</groupId>
@@ -596,7 +585,6 @@
     <version.javax.persistence>1.0.2</version.javax.persistence>
     <version.commons-lang>2.4</version.commons-lang>
     <version.commons-collections>3.2.1</version.commons-collections>
-    <version.commons-logging>1.1.1</version.commons-logging>
     <version.apache-mime4j>0.6.1</version.apache-mime4j>
     <version.javax.mail>1.4.3</version.javax.mail>
     <version.activation>1.1.1</version.activation>

Modified: james/mailbox/trunk/store/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/pom.xml?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/store/pom.xml (original)
+++ james/mailbox/trunk/store/pom.xml Mon Feb 28 06:46:25 2011
@@ -37,8 +37,8 @@
       <artifactId>apache-mime4j</artifactId>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
     </dependency>
     <dependency>
       <groupId>${javax.mail.groupId}</groupId>

Modified: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearcher.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearcher.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearcher.java (original)
+++ james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearcher.java Mon Feb 28 06:46:25 2011
@@ -27,12 +27,12 @@ import java.nio.CharBuffer;
 import java.nio.charset.IllegalCharsetNameException;
 import java.nio.charset.UnsupportedCharsetException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.james.mailbox.store.streaming.ConfigurableMimeTokenStream;
 import org.apache.james.mime4j.MimeException;
 import org.apache.james.mime4j.parser.MimeEntityConfig;
 import org.apache.james.mime4j.parser.MimeTokenStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Searches an email for content. This class should be safe for use by
@@ -40,7 +40,7 @@ import org.apache.james.mime4j.parser.Mi
  */
 public class MessageSearcher {
 
-    private Log logger;
+    private Logger logger;
 
     private CharSequence searchContent = null;
 
@@ -138,7 +138,7 @@ public class MessageSearcher {
         }
         final boolean result;
         if (searchContent == null || "".equals(searchContent)) {
-            final Log logger = getLogger();
+            final Logger logger = getLogger();
             logger.debug("Nothing to search for. ");
             result = false;
         } else {
@@ -226,7 +226,7 @@ public class MessageSearcher {
     }
 
     protected void handle(Exception e) throws IOException, MimeException {
-        final Log logger = getLogger();
+        final Logger logger = getLogger();
         logger.warn("Cannot read MIME body.");
         logger.debug("Failed to read body.", e);
     }
@@ -264,14 +264,14 @@ public class MessageSearcher {
         return result;
     }
 
-    public final Log getLogger() {
+    public final Logger getLogger() {
         if (logger == null) {
-            logger = LogFactory.getLog(MessageSearcher.class);
+            logger = LoggerFactory.getLogger(MessageSearcher.class);
         }
         return logger;
     }
 
-    public final void setLogger(Log logger) {
+    public final void setLogger(Logger logger) {
         this.logger = logger;
     }
 }

Modified: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearches.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearches.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearches.java (original)
+++ james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/MessageSearches.java Mon Feb 28 06:46:25 2011
@@ -32,8 +32,6 @@ import java.util.TimeZone;
 
 import javax.mail.Flags;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.SearchQuery;
 import org.apache.james.mailbox.UnsupportedSearchException;
@@ -44,24 +42,26 @@ import org.apache.james.mime4j.MimeExcep
 import org.apache.james.mime4j.field.datetime.DateTime;
 import org.apache.james.mime4j.field.datetime.parser.DateTimeParser;
 import org.apache.james.mime4j.field.datetime.parser.ParseException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Uility methods to help perform search operations.
  */
 public class MessageSearches {
 
-    private Log log;
+    private Logger log;
 
     private boolean isCustomLog = false;
 
-    public final Log getLog() {
+    public final Logger getLog() {
         if (log == null) {
-            log = LogFactory.getLog(MessageSearches.class);
+            log = LoggerFactory.getLogger(MessageSearches.class);
         }
         return log;
     }
 
-    public final void setLog(Log log) {
+    public final void setLog(Logger log) {
         isCustomLog = true;
         this.log = log;
     }

Modified: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SearchQueryIterator.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SearchQueryIterator.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SearchQueryIterator.java (original)
+++ james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SearchQueryIterator.java Mon Feb 28 06:46:25 2011
@@ -21,10 +21,10 @@ package org.apache.james.mailbox.store;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.SearchQuery;
 import org.apache.james.mailbox.store.mail.model.MailboxMembership;
+import org.slf4j.Logger;
 
 /**
  * {@link Iterator} implementation which use a {@link MessageSearches} instance to lazy 
@@ -44,7 +44,7 @@ public final class SearchQueryIterator i
         this(it, query, null);
     }
 
-    public SearchQueryIterator(Iterator<MailboxMembership<?>> it, SearchQuery query, Log log) {
+    public SearchQueryIterator(Iterator<MailboxMembership<?>> it, SearchQuery query, Logger log) {
         this.it = it;
         this.query = query;
         if (log != null) {

Modified: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java (original)
+++ james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/SimpleMailboxSession.java Mon Feb 28 06:46:25 2011
@@ -26,9 +26,9 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.mailbox.MailboxConstants;
 import org.apache.james.mailbox.MailboxSession;
+import org.slf4j.Logger;
 
 /**
  * Describes a mailbox session.
@@ -43,7 +43,7 @@ public class SimpleMailboxSession implem
     
     private final long sessionId;
     
-    private final Log log;
+    private final Logger log;
 
     private final String userName;
     
@@ -58,12 +58,12 @@ public class SimpleMailboxSession implem
     private final char pathSeparator;
 
     public SimpleMailboxSession(final long sessionId, final String userName, final String password,
-            final Log log, final List<Locale> localePreferences, char pathSeparator) {
+            final Logger log, final List<Locale> localePreferences, char pathSeparator) {
         this(sessionId, userName, password, log, localePreferences, new ArrayList<String>(), null, pathSeparator);
     }
 
     public SimpleMailboxSession(final long sessionId, final String userName, final String password,
-            final Log log, final List<Locale> localePreferences, List<String> sharedSpaces, String otherUsersSpace, char pathSeparator) {
+            final Logger log, final List<Locale> localePreferences, List<String> sharedSpaces, String otherUsersSpace, char pathSeparator) {
         this.sessionId = sessionId;
         this.log = log;
         this.userName = userName;
@@ -86,7 +86,7 @@ public class SimpleMailboxSession implem
      * (non-Javadoc)
      * @see org.apache.james.mailbox.MailboxSession#getLog()
      */
-    public Log getLog() {
+    public Logger getLog() {
         return log;
     }
 

Modified: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java (original)
+++ james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java Mon Feb 28 06:46:25 2011
@@ -25,8 +25,6 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Random;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.james.mailbox.BadCredentialsException;
 import org.apache.james.mailbox.MailboxConstants;
 import org.apache.james.mailbox.MailboxException;
@@ -52,6 +50,8 @@ import org.apache.james.mailbox.store.tr
 import org.apache.james.mailbox.store.transaction.TransactionalMapper;
 import org.apache.james.mailbox.util.MailboxEventDispatcher;
 import org.apache.james.mailbox.util.SimpleMailboxMetaData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This abstract base class of an {@link MailboxManager} implementation provides a high-level api for writing your own
@@ -73,7 +73,7 @@ public abstract class StoreMailboxManage
     private final Authenticator authenticator;
     private final static Random RANDOM = new Random();
     
-    private Log log = LogFactory.getLog("org.apache.james.mailbox");
+    private Logger log = LoggerFactory.getLogger("org.apache.james.mailbox");
 
     private MailboxPathLocker locker;
 
@@ -118,11 +118,11 @@ public abstract class StoreMailboxManage
     }
     
     
-    protected Log getLog() {
+    protected Logger getLog() {
         return log;
     }
 
-    public void setLog(Log log) {
+    public void setLog(Logger log) {
         this.log = log;
     }
 
@@ -137,9 +137,9 @@ public abstract class StoreMailboxManage
     
     /*
      * (non-Javadoc)
-     * @see org.apache.james.mailbox.MailboxManager#createSystemSession(java.lang.String, org.apache.commons.logging.Log)
+     * @see org.apache.james.mailbox.MailboxManager#createSystemSession(java.lang.String, org.slf4j.Logger)
      */
-    public MailboxSession createSystemSession(String userName, Log log) {
+    public MailboxSession createSystemSession(String userName, Logger log) {
         return createSession(userName, null, log);
     }
 
@@ -150,7 +150,7 @@ public abstract class StoreMailboxManage
      * @param log
      * @return session
      */
-    private MailboxSession createSession(String userName, String password, Log log) {
+    private MailboxSession createSession(String userName, String password, Logger log) {
         return new SimpleMailboxSession(randomId(), userName, password, log, new ArrayList<Locale>(), getDelimiter());
     }
 
@@ -184,9 +184,9 @@ public abstract class StoreMailboxManage
     
     /*
      * (non-Javadoc)
-     * @see org.apache.james.mailbox.MailboxManager#login(java.lang.String, java.lang.String, org.apache.commons.logging.Log)
+     * @see org.apache.james.mailbox.MailboxManager#login(java.lang.String, java.lang.String, org.slf4j.Logger)
      */
-    public MailboxSession login(String userid, String passwd, Log log) throws BadCredentialsException, MailboxException {
+    public MailboxSession login(String userid, String passwd, Logger log) throws BadCredentialsException, MailboxException {
         if (login(userid, passwd)) {
             return createSession(userid, passwd, log);
         } else {
@@ -314,7 +314,7 @@ public abstract class StoreMailboxManage
      * @see org.apache.james.mailbox.MailboxManager#renameMailbox(org.apache.james.imap.api.MailboxPath, org.apache.james.imap.api.MailboxPath, org.apache.james.mailbox.MailboxSession)
      */
     public void renameMailbox(final MailboxPath from, final MailboxPath to, final MailboxSession session) throws MailboxException {
-        final Log log = getLog();
+        final Logger log = getLog();
         if (log.isDebugEnabled())
             log.debug("renameMailbox " + from + " to " + to);
         if (mailboxExists(to, session)) {

Modified: james/mailbox/trunk/tool/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/tool/pom.xml?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/tool/pom.xml (original)
+++ james/mailbox/trunk/tool/pom.xml Mon Feb 28 06:46:25 2011
@@ -41,8 +41,12 @@
       <artifactId>apache-james-mailbox-memory</artifactId>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.james</groupId>

Modified: james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/copier/MailboxCopierImpl.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/copier/MailboxCopierImpl.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/copier/MailboxCopierImpl.java (original)
+++ james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/copier/MailboxCopierImpl.java Mon Feb 28 06:46:25 2011
@@ -25,8 +25,6 @@ import java.util.List;
 
 import javax.mail.Flags.Flag;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxExistsException;
 import org.apache.james.mailbox.MailboxManager;
@@ -37,6 +35,8 @@ import org.apache.james.mailbox.MessageR
 import org.apache.james.mailbox.MessageResult;
 import org.apache.james.mailbox.store.streaming.InputStreamContent;
 import org.apache.james.mailbox.util.FetchGroupImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Implementation of the {@link MailboxCopier} interface.
@@ -47,7 +47,7 @@ public class MailboxCopierImpl implement
     /**
      * The logger.
      */
-    private Log log = LogFactory.getLog(MailboxCopierImpl.class.getName());
+    private Logger log = LoggerFactory.getLogger(MailboxCopierImpl.class.getName());
 
     /*
      * (non-Javadoc)
@@ -141,7 +141,7 @@ public class MailboxCopierImpl implement
      * 
      * @param log
      */
-    public void setLog(Log log) {
+    public void setLog(Logger log) {
         this.log = log;
     }
 

Modified: james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/jpa/migrator/JpaMigrator.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/jpa/migrator/JpaMigrator.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/jpa/migrator/JpaMigrator.java (original)
+++ james/mailbox/trunk/tool/src/main/java/org/apache/james/mailbox/jpa/migrator/JpaMigrator.java Mon Feb 28 06:46:25 2011
@@ -42,7 +42,7 @@ public class JpaMigrator {
      * You can also invoke with many JIRA at once. They will be all serially executed.</p>
      * 
      * TODO Extract the SQL in JAVA classes to XML file.
-     * TODO Log with log4j.
+     * TODO Log with slf4j.
      * 
      * @param the JIRAs numbers
      * @throws JpaMigrateException 

Modified: james/mailbox/trunk/tool/src/test/java/org/apache/james/mailbox/copier/MailboxCopierTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/tool/src/test/java/org/apache/james/mailbox/copier/MailboxCopierTest.java?rev=1075221&r1=1075220&r2=1075221&view=diff
==============================================================================
--- james/mailbox/trunk/tool/src/test/java/org/apache/james/mailbox/copier/MailboxCopierTest.java (original)
+++ james/mailbox/trunk/tool/src/test/java/org/apache/james/mailbox/copier/MailboxCopierTest.java Mon Feb 28 06:46:25 2011
@@ -28,7 +28,6 @@ import javax.mail.Flags;
 
 import junit.framework.Assert;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.james.mailbox.BadCredentialsException;
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxManager;
@@ -43,6 +42,7 @@ import org.apache.james.mailbox.mock.Moc
 import org.apache.james.mailbox.store.Authenticator;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.LoggerFactory;
 
 /**
  * Test class for the {@link MailboxCopierImpl} implementation.
@@ -81,7 +81,7 @@ public class MailboxCopierTest {
     public void setup() throws BadCredentialsException, MailboxException {
         
         mailboxCopier = new MailboxCopierImpl();
-        mailboxCopier.setLog(new SimpleLog(MailboxCopierTest.class.getName()));
+        mailboxCopier.setLog(LoggerFactory.getLogger(MailboxCopierTest.class.getName()));
         
         srcMemMailboxManager = newInMemoryMailboxManager();
         dstMemMailboxManager = newInMemoryMailboxManager();
@@ -123,7 +123,7 @@ public class MailboxCopierTest {
      */
     private void assertMailboxManagerSize(MailboxManager mailboxManager, int multiplicationFactor) throws BadCredentialsException, MailboxException {
         
-        MailboxSession mailboxSession = mailboxManager.createSystemSession("manager", new SimpleLog("src-mailbox-copier"));        
+        MailboxSession mailboxSession = mailboxManager.createSystemSession("manager", LoggerFactory.getLogger("src-mailbox-copier"));        
         mailboxManager.startProcessingRequest(mailboxSession);
 
         List<MailboxPath> mailboxPathList = mailboxManager.list(mailboxSession);



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