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/05 10:48:20 UTC
svn commit: r811607 -
/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerChain.java
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org