You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rd...@apache.org on 2009/09/17 16:56:10 UTC

svn commit: r816224 - in /james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver: SMTPHandlerChain.java SMTPServer.java

Author: rdonkin
Date: Thu Sep 17 14:56:10 2009
New Revision: 816224

URL: http://svn.apache.org/viewvc?rev=816224&view=rev
Log:
JAMES-923 Call configure directly https://issues.apache.org/jira/browse/JAMES-923

Modified:
    james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerChain.java
    james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.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=816224&r1=816223&r2=816224&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 Thu Sep 17 14:56:10 2009
@@ -29,15 +29,10 @@
 
 import javax.annotation.Resource;
 
-import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.james.api.kernel.LoaderService;
@@ -48,9 +43,9 @@
 
 /**
   * The SMTPHandlerChain is per service object providing access
-  * ConnectHandlers, Commandhandlers and message handlers
+  * ConnectHandlers, Command handlers and message handlers
   */
-public class SMTPHandlerChain implements Configurable {
+public class SMTPHandlerChain {
 
     /** This log is the fall back shared by all instances */
     private static final Log FALLBACK_LOG = LogFactory.getLog(DataLineMessageHookHandler.class);

Modified: james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java?rev=816224&r1=816223&r2=816224&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java (original)
+++ james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java Thu Sep 17 14:56:10 2009
@@ -25,7 +25,6 @@
 
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.container.ContainerUtil;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.commons.logging.impl.AvalonLogger;
@@ -123,8 +122,6 @@
     private SMTPConfiguration theConfigData
     = new SMTPHandlerConfigurationDataImpl();
 
-    private ServiceManager serviceManager;
-
     private boolean addressBracketsEnforcement = true;
 
 
@@ -150,7 +147,6 @@
      */
     public void service( final ServiceManager manager ) throws ServiceException {
         super.service( manager );
-        serviceManager = manager;
         mailetcontext = (MailetContext) manager.lookup("org.apache.mailet.MailetContext");
         mailServer = (MailServer) manager.lookup(MailServer.ROLE);
         dnsServer = (DNSService) manager.lookup(DNSService.ROLE); 
@@ -248,11 +244,9 @@
         
         //set the logger
         handlerChain.setLog(new AvalonLogger(getLogger()));
-
-        ContainerUtil.service(handlerChain,serviceManager);
-
+        
         //read from the XML configuration and create and configure each of the handlers
-        ContainerUtil.configure(handlerChain,handlerConfiguration.getChild("handlerchain"));
+        handlerChain.configure(handlerConfiguration.getChild("handlerchain"));
         handlerChain.initialize();
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org