Author: rdonkin
Date: Sat Sep  5 08:48:20 2009
New Revision: 811607

URL: http://svn.apache.org/viewvc?rev=811607&view=rev
Log:
Move loading of handlers to init so that LoaderService will be available.

Modified:
    
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerChain.java

Modified: 
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerChain.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerChain.java?rev=811607&r1=811606&r2=811607&view=diff
==============================================================================
--- 
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerChain.java
 (original)
+++ 
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerChain.java
 Sat Sep  5 08:48:20 2009
@@ -45,6 +45,9 @@
   */
 public class SMTPHandlerChain extends AbstractLogEnabled implements 
Configurable, Serviceable {
 
+    /** Configuration for this chain */
+    private Configuration configuration;
+    
     private List<Object> handlers = new LinkedList<Object>();
 
     private ServiceManager serviceManager;
@@ -99,11 +102,14 @@
                         cmdName, className));
             }
         }
+        this.configuration = configuration;
+    }
+
+    private void loadHandlers() throws Exception {
         if (configuration != null) {
             Configuration[] children = configuration.getChildren("handler");
             ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();
 
-
             // load the configured handlers
             if (children != null) {
 
@@ -140,6 +146,8 @@
 //        commandDispatcherLineHandler.enableLogging(getLogger());
 //        handlers.add(commandDispatcherLineHandler);
         
+        loadHandlers();
+        
         Iterator<Object> h = handlers.iterator();
     
         while(h.hasNext()) {



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

Reply via email to