Author: norman
Date: Tue Mar  2 19:53:25 2010
New Revision: 918163

URL: http://svn.apache.org/viewvc?rev=918163&view=rev
Log:
only cleanup

Modified:
    james/server/trunk/spoolmanager/src/main/java/org/apache/james/James.java

Modified: 
james/server/trunk/spoolmanager/src/main/java/org/apache/james/James.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/spoolmanager/src/main/java/org/apache/james/James.java?rev=918163&r1=918162&r2=918163&view=diff
==============================================================================
--- james/server/trunk/spoolmanager/src/main/java/org/apache/james/James.java 
(original)
+++ james/server/trunk/spoolmanager/src/main/java/org/apache/james/James.java 
Tue Mar  2 19:53:25 2010
@@ -58,7 +58,6 @@
 import org.apache.james.lifecycle.LogEnabled;
 import org.apache.james.services.MailRepository;
 import org.apache.james.services.MailServer;
-import org.apache.james.services.SpoolRepository;
 import org.apache.james.services.store.Store;
 import org.apache.james.transport.camel.InMemoryMail;
 import org.apache.mailet.Mail;
@@ -128,13 +127,6 @@
      */
     private Map<String,MailRepository> mailboxes = new ReferenceMap();
 
-
-    /**
-     * A hash table of server attributes
-     * These are the MailetContext attributes
-     */
-    //private Hashtable<String,Object> attributes = new 
Hashtable<String,Object>();
-
     /**
      * Currently used by storeMail to avoid code duplication (we moved store 
logic to that mailet).
      * TODO We should remove this and its initialization when we remove 
storeMail method.
@@ -170,10 +162,41 @@
         this.producerTemplate = producerTemplate;
     }
     
+    
+
+    /**
+     * Set Store to use
+     * 
+     * @param store the Store to use
+     */
+    @Resource(name="mailstore")
+    public void setStore(Store store) {
+        this.store = store;
+    }
+
+
+    /**
+     * Set the UsersRepository to use
+     * 
+     * @param localusers the UserRepository to use
+     */
+    @Resource(name="localusersrepository")
+    public void setUsersRepository(UsersRepository localusers) {
+        this.localusers = localusers;
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see 
org.apache.james.lifecycle.LogEnabled#setLog(org.apache.commons.logging.Log)
+     */
     public final void setLog(Log logger) {
         this.logger = logger;
     }
     
+    /*
+     * (non-Javadoc)
+     * @see 
org.apache.james.lifecycle.Configurable#configure(org.apache.commons.configuration.HierarchicalConfiguration)
+     */
     public void configure(HierarchicalConfiguration config) throws 
ConfigurationException {
         this.conf = (HierarchicalConfiguration)config;
     }
@@ -259,8 +282,6 @@
     }
 
     private void initializeServices() throws Exception {
-        // TODO: This should retrieve a more specific named thread pool from
-        // Context that is set up in server.xml
         try {
             if (logger.isDebugEnabled()) {
                 logger.debug("Using Store: " + store.toString());
@@ -272,21 +293,7 @@
         }
 
 
-        /*
-        try {
-            // lookup the usersStore.
-            // This is not used by James itself, but we check we received it 
here
-            // because mailets will try to lookup this later.
-            UsersStore usersStore = (UsersStore) compMgr.lookup( 
UsersStore.ROLE );
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Using UsersStore: " + 
usersStore.toString());
-            }
-        } catch (Exception e) {
-            if (getLogger().isWarnEnabled()) {
-                getLogger().warn("Can't get Store: " + e);
-            }
-        }
-        */
+      
         if (logger.isDebugEnabled()) {
             logger.debug("Using LocalUsersRepository: " + 
localusers.toString());
         }    
@@ -310,28 +317,7 @@
        
     }
 
-    
-
-    /**
-     * Set Store to use
-     * 
-     * @param store the Store to use
-     */
-    @Resource(name="mailstore")
-    public void setStore(Store store) {
-        this.store = store;
-    }
-
-
-    /**
-     * Set the UsersRepository to use
-     * 
-     * @param localusers the UserRepository to use
-     */
-    @Resource(name="localusersrepository")
-    public void setUsersRepository(UsersRepository localusers) {
-        this.localusers = localusers;
-    }
+ 
 
     /**
      * Place a mail on the spool for processing
@@ -395,12 +381,6 @@
             
         } catch (Exception e) {
             logger.error("Error storing message: " + e.getMessage(),e);
-            
-            /*try {
-                spool.remove(mail);
-            } catch (Exception ignored) {
-                logger.error("Error removing message after an error storing 
it: " + e.getMessage(),e);
-            }*/
             throw new MessagingException("Exception spooling message: " + 
e.getMessage(), e);
         }
         if (logger.isDebugEnabled()) {
@@ -592,15 +572,6 @@
             return helloName;
         } else {
             return getDefaultDomain();
-            /*
-            String hello = (String) getAttribute(Constants.HELLO_NAME);   
-            
-            if (hello == null) {
-                return defaultDomain;
-            } else {
-                return hello;
-            }
-            */
         }
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to