james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/james/util/mordred PoolConnEntry.java
Date Mon, 06 Jan 2003 17:08:51 GMT
danny       2003/01/06 09:08:50

  Modified:    src/java/org/apache/james James.java
               src/java/org/apache/james/core AbstractJamesService.java
                        MailHeaders.java MailImpl.java
                        MimeMessageInputStreamSource.java
                        MimeMessageWrapper.java
               src/java/org/apache/james/dnsserver DNSServer.java
               src/java/org/apache/james/mailrepository
                        AvalonMailRepository.java JDBCMailRepository.java
               src/java/org/apache/james/nntpserver NNTPHandler.java
               src/java/org/apache/james/nntpserver/repository
                        NNTPArticleImpl.java
               src/java/org/apache/james/pop3server POP3Handler.java
               src/java/org/apache/james/remotemanager RemoteManager.java
                        RemoteManagerHandler.java
               src/java/org/apache/james/security DigestUtil.java
               src/java/org/apache/james/services JamesUser.java
                        MailServer.java
               src/java/org/apache/james/smtpserver SMTPHandler.java
               src/java/org/apache/james/transport JamesSpoolManager.java
                        LinearProcessor.java
               src/java/org/apache/james/transport/mailets JDBCAlias.java
                        JDBCListserv.java JDBCVirtualUserTable.java
                        RemoteDelivery.java
               src/java/org/apache/james/transport/matchers
                        NESSpamCheck.java
               src/java/org/apache/james/userrepository
                        AbstractJdbcUsersRepository.java
                        UsersLDAPRepository.java
               src/java/org/apache/james/util JDBCUtil.java
                        SqlResources.java
               src/java/org/apache/james/util/mordred PoolConnEntry.java
  Log:
  Formatting only: organising imports
  
  Revision  Changes    Path
  1.38      +38 -18    jakarta-james/src/java/org/apache/james/James.java
  
  Index: James.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/James.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- James.java	6 Jan 2003 15:54:14 -0000	1.37
  +++ James.java	6 Jan 2003 17:08:41 -0000	1.38
  @@ -7,8 +7,36 @@
    */
   package org.apache.james;
   
  +import java.io.ByteArrayInputStream;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.SequenceInputStream;
  +import java.net.InetAddress;
  +import java.net.UnknownHostException;
  +import java.util.Collection;
  +import java.util.Date;
  +import java.util.Enumeration;
  +import java.util.HashMap;
  +import java.util.HashSet;
  +import java.util.Hashtable;
  +import java.util.Iterator;
  +import java.util.Locale;
  +import java.util.Map;
  +import java.util.Vector;
  +
  +import javax.mail.Address;
  +import javax.mail.MessagingException;
  +import javax.mail.internet.InternetAddress;
  +import javax.mail.internet.MimeBodyPart;
  +import javax.mail.internet.MimeMessage;
  +import javax.mail.internet.MimeMultipart;
  +
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.component.*;
  +import org.apache.avalon.framework.component.Component;
  +import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
  +import org.apache.avalon.framework.component.DefaultComponentManager;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -20,28 +48,20 @@
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.james.core.MailHeaders;
   import org.apache.james.core.MailImpl;
  -import org.apache.james.services.*;
  +import org.apache.james.services.DNSServer;
  +import org.apache.james.services.JamesUser;
  +import org.apache.james.services.MailServer;
  +import org.apache.james.services.MailStore;
  +import org.apache.james.services.UsersStore;
   import org.apache.james.userrepository.DefaultJamesUser;
   import org.apache.james.util.RFC2822Headers;
   import org.apache.james.util.RFC822DateFormat;
  -import org.apache.mailet.*;
   import org.apache.mailet.Mail;
   import org.apache.mailet.MailAddress;
  +import org.apache.mailet.MailRepository;
   import org.apache.mailet.MailetContext;
  -
  -import javax.mail.Address;
  -import javax.mail.MessagingException;
  -import javax.mail.internet.InternetAddress;
  -import javax.mail.internet.MimeBodyPart;
  -import javax.mail.internet.MimeMessage;
  -import javax.mail.internet.MimeMultipart;
  -import java.io.ByteArrayInputStream;
  -import java.io.IOException;
  -import java.io.InputStream;
  -import java.io.SequenceInputStream;
  -import java.net.InetAddress;
  -import java.net.UnknownHostException;
  -import java.util.*;
  +import org.apache.mailet.SpoolRepository;
  +import org.apache.mailet.UsersRepository;
   
   /**
    * Core class for JAMES. Provides three primary services:
  
  
  
  1.5       +224 -221  jakarta-james/src/java/org/apache/james/core/AbstractJamesService.java
  
  Index: AbstractJamesService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/core/AbstractJamesService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractJamesService.java	2 Nov 2002 08:25:14 -0000	1.4
  +++ AbstractJamesService.java	6 Jan 2003 17:08:43 -0000	1.5
  @@ -7,16 +7,9 @@
    */
   package org.apache.james.core;
   
  -import java.io.*;
  -import java.net.*;
  -
  -import org.apache.avalon.framework.logger.*;
  -import org.apache.avalon.framework.component.*;
  -import org.apache.avalon.framework.configuration.*;
  -import org.apache.avalon.framework.activity.*;
  -
  -import org.apache.avalon.excalibur.thread.ThreadPool;
  -import org.apache.avalon.cornerstone.services.threads.ThreadManager;
  +import java.net.InetAddress;
  +import java.net.ServerSocket;
  +import java.net.UnknownHostException;
   
   import org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory;
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
  @@ -24,103 +17,112 @@
   import org.apache.avalon.cornerstone.services.connection.ConnectionManager;
   import org.apache.avalon.cornerstone.services.sockets.ServerSocketFactory;
   import org.apache.avalon.cornerstone.services.sockets.SocketManager;
  +import org.apache.avalon.cornerstone.services.threads.ThreadManager;
  +import org.apache.avalon.excalibur.thread.ThreadPool;
  +import org.apache.avalon.framework.activity.Disposable;
  +import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.component.Component;
  +import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
  +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.logger.LogEnabled;
   
   import org.apache.james.util.connection.SimpleConnectionManager;
   import org.apache.james.util.watchdog.ThreadPerWatchdogFactory;
  -import org.apache.james.util.watchdog.Watchdog;
   import org.apache.james.util.watchdog.WatchdogFactory;
   
   /**
  - * Server which creates connection handlers. All new James service must
  - * inherit from this abstract implementation.
  + * Server which creates connection handlers. All new James service must inherit
  + * from this abstract implementation.
    *
    * @author <a href="mailto:myfam@surfeu.fi">Andrei Ivanov</a>
    * @author <a href="farsight@alum.mit.edu">Peter M. Goldstein</a>
    */
   public abstract class AbstractJamesService extends AbstractHandlerFactory
  -    implements Component, Composable, Configurable,
  -               Disposable, Initializable, ConnectionHandlerFactory {
  -
  +    implements Component,Composable,Configurable,Disposable,Initializable,
  +        ConnectionHandlerFactory {
       /**
        * The default value for the connection timeout.
        */
  -    protected static final int DEFAULT_TIMEOUT = 5* 60 * 1000;
  +    protected final static int DEFAULT_TIMEOUT = 5*60*1000;
   
       /**
        * The name of the parameter defining the connection timeout.
        */
  -    protected static final String TIMEOUT_NAME = "connectiontimeout";
  +    protected final static String TIMEOUT_NAME = "connectiontimeout";
   
       /**
        * The name of the parameter defining the service hello name.
        */
  -    public static final String HELLO_NAME = "helloName";
  +    public final static String HELLO_NAME = "helloName";
   
       /**
  -     * The ConnectionManager that spawns and manages service connections.
  +     * Network interface to which the service will bind.  If not set, the
  +     * server binds to all available interfaces.
        */
  -    private ConnectionManager connectionManager;
  +    protected InetAddress bindTo = null;
   
       /**
  -     * The name of the thread group to be used by this service for 
  -     * generating connections
  +     * The maximum number of connections allowed for this service.
        */
  -    protected String threadGroup;
  -
  -    /**
  -     * The thread pool used by this service that holds the threads
  -     * that service the client connections.
  +    protected Integer connectionLimit;
  +    /*
  +     * The server socket associated with this service
        */
  -    protected ThreadPool threadPool = null;
  +    protected ServerSocket serverSocket;
   
       /**
  -     * The server socket type used to generate connections for this server.
  +     * The name of the connection used by this service.  We need to track this
  +     * so we can tell the ConnectionManager which service to disconnect upon
  +     * shutdown.
        */
  -    protected String serverSocketType = "plain";
  +    protected String connectionName;
   
       /**
  -     * The port on which this service will be made available.
  +     * The hello name for the service.
        */
  -    protected int port = -1;
  +    protected String helloName;
   
       /**
  -     * Network interface to which the service will bind.  If not set,
  -     * the server binds to all available interfaces.
  +     * The server socket type used to generate connections for this server.
        */
  -    protected InetAddress bindTo = null;
  +    protected String serverSocketType = "plain";
   
  -    /*
  -     * The server socket associated with this service
  +    /**
  +     * The name of the thread group to be used by this service for  generating
  +     * connections
        */
  -    protected ServerSocket serverSocket;
  +    protected String threadGroup;
   
       /**
  -     * The name of the connection used by this service.  We need to
  -     * track this so we can tell the ConnectionManager which service
  -     * to disconnect upon shutdown.
  +     * The thread pool used by this service that holds the threads that service
  +     * the client connections.
        */
  -    protected String connectionName;
  +    protected ThreadPool threadPool = null;
   
       /**
  -     * The maximum number of connections allowed for this service.
  +     * The port on which this service will be made available.
        */
  -    protected Integer connectionLimit;
  +    protected int port = -1;
   
       /**
  -     * The connection idle timeout.  Used primarily to prevent server
  -     * problems from hanging a connection.
  +     * The connection idle timeout.  Used primarily to prevent server problems
  +     * from hanging a connection.
        */
       protected int timeout;
   
       /**
  -     * The hello name for the service.
  +     * The component manager used by this service.
        */
  -    protected String helloName;
  +    private ComponentManager compMgr;
   
       /**
  -     * The component manager used by this service.
  +     * The ConnectionManager that spawns and manages service connections.
        */
  -    private ComponentManager compMgr;
  +    private ConnectionManager connectionManager;
   
       /**
        * Whether this service is enabled.
  @@ -128,22 +130,40 @@
       private volatile boolean enabled;
   
       /**
  +     * This method returns the type of service provided by this server. This
  +     * should be invariant over the life of the class. Subclasses may override
  +     * this implementation.  This implementation parses the complete class
  +     * name and returns the undecorated class name.
  +     *
  +     * @return description of this server
  +     */
  +    public String getServiceType() {
  +        String name = getClass().getName();
  +        int p       = name.lastIndexOf(".");
  +        if((p > 0)&&(p < (name.length()-2))) {
  +            name = name.substring(p+1);
  +        }
  +        return name;
  +    }
  +
  +    /**
        * @see org.apache.avalon.framework.component.Composable#compose(ComponentManager)
        */
       public void compose(ComponentManager comp) throws ComponentException {
           super.compose(comp);
  -        compMgr = comp;
  -        connectionManager = (ConnectionManager) compMgr.lookup(ConnectionManager.ROLE);
  +        compMgr               = comp;
  +        connectionManager =
  +            (ConnectionManager)compMgr.lookup(ConnectionManager.ROLE);
       }
   
       /**
        * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
        */
       public void configure(Configuration conf) throws ConfigurationException {
  -        enabled = conf.getAttributeAsBoolean("enabled", true);
  -        if (!enabled) {
  -          getLogger().info(getServiceType() + " disabled by configuration");
  -          return;
  +        enabled               = conf.getAttributeAsBoolean("enabled",true);
  +        if(!enabled) {
  +            getLogger().info(getServiceType()+" disabled by configuration");
  +            return;
           }
   
           Configuration handlerConfiguration = conf.getChild("handler");
  @@ -159,20 +179,23 @@
   
           port = conf.getChild("port").getValueAsInteger(getDefaultPort());
   
  -        Configuration serverSocketTypeConf = conf.getChild("serverSocketType", false);
  +        Configuration serverSocketTypeConf =
  +            conf.getChild("serverSocketType",false);
           String confSocketType = null;
  -        if (serverSocketTypeConf != null ) {
  +        if(serverSocketTypeConf != null) {
               confSocketType = serverSocketTypeConf.getValue();
           }
   
  -        if (confSocketType == null) {
  +        if(confSocketType == null) {
               // Only load the useTLS parameter if a specific socket type has not
               // been specified.  This maintains backwards compatibility while
               // allowing us to have more complex (i.e. multiple SSL configuration)
               // deployments
  -            final boolean useTLS = conf.getChild("useTLS").getValueAsBoolean(isDefaultTLSEnabled());
  -            if (useTLS) {
  -              serverSocketType = "ssl";
  +            final boolean useTLS =
  +                conf.getChild("useTLS").getValueAsBoolean(
  +                    isDefaultTLSEnabled());
  +            if(useTLS) {
  +                serverSocketType = "ssl";
               }
           } else {
               serverSocketType = confSocketType;
  @@ -180,274 +203,254 @@
   
           StringBuffer infoBuffer;
           threadGroup = conf.getChild("threadGroup").getValue(null);
  -        if (threadGroup != null) {
  +        if(threadGroup != null) {
               infoBuffer =
  -                new StringBuffer(64)
  -                        .append(getServiceType())
  -                        .append(" uses thread group: ")
  -                        .append(threadGroup);
  +                new StringBuffer(64).append(getServiceType())
  +                                    .append(" uses thread group: ").append(
  +                    threadGroup);
               getLogger().info(infoBuffer.toString());
  -        }
  -        else {
  -            getLogger().info(getServiceType() + " uses default thread group.");
  +        } else {
  +            getLogger().info(getServiceType()+" uses default thread group.");
           }
   
           try {
               final String bindAddress = conf.getChild("bind").getValue(null);
  -            if( null != bindAddress ) {
  -                bindTo = InetAddress.getByName(bindAddress);
  +            if(null != bindAddress) {
  +                bindTo         = InetAddress.getByName(bindAddress);
                   infoBuffer =
  -                    new StringBuffer(64)
  -                            .append(getServiceType())
  -                            .append(" bound to: ")
  -                            .append(bindTo);
  +                    new StringBuffer(64).append(getServiceType())
  +                                        .append(" bound to: ").append(bindTo);
                   getLogger().info(infoBuffer.toString());
               }
  -        }
  -        catch( final UnknownHostException unhe ) {
  -            throw new ConfigurationException( "Malformed bind parameter in configuration of service " + getServiceType(), unhe );
  +        } catch(final UnknownHostException unhe) {
  +            throw new ConfigurationException(
  +                "Malformed bind parameter in configuration of service "
  +                +getServiceType(),unhe);
           }
   
  -        String hostName = null;
  +        String hostName        = null;
           try {
               hostName = InetAddress.getLocalHost().getHostName();
  -        } catch (UnknownHostException ue) {
  +        } catch(UnknownHostException ue) {
               hostName = "localhost";
           }
   
           infoBuffer =
  -            new StringBuffer(64)
  -                    .append(getServiceType())
  -                    .append(" is running on: ")
  -                    .append(hostName);
  +            new StringBuffer(64).append(getServiceType())
  +                                .append(" is running on: ").append(hostName);
           getLogger().info(infoBuffer.toString());
   
           Configuration helloConf = handlerConfiguration.getChild(HELLO_NAME);
  -        boolean autodetect = helloConf.getAttributeAsBoolean("autodetect", true);
  -        if (autodetect) {
  +        boolean autodetect      =
  +            helloConf.getAttributeAsBoolean("autodetect",true);
  +        if(autodetect) {
               helloName = hostName;
           } else {
               helloName = helloConf.getValue("localhost");
           }
           infoBuffer =
  -            new StringBuffer(64)
  -                    .append(getServiceType())
  -                    .append(" handler hello name is: ")
  -                    .append(helloName);
  +            new StringBuffer(64).append(getServiceType())
  +                                .append(" handler hello name is: ").append(
  +                helloName);
           getLogger().info(infoBuffer.toString());
   
  -        timeout = handlerConfiguration.getChild(TIMEOUT_NAME).getValueAsInteger(DEFAULT_TIMEOUT);
  +        timeout =
  +            handlerConfiguration.getChild(TIMEOUT_NAME).getValueAsInteger(
  +                DEFAULT_TIMEOUT);
   
           infoBuffer =
  -            new StringBuffer(64)
  -                    .append(getServiceType())
  -                    .append(" handler connection timeout is: ")
  -                    .append(timeout);
  +            new StringBuffer(64).append(getServiceType())
  +                                .append(" handler connection timeout is: ")
  +                                .append(timeout);
           getLogger().info(infoBuffer.toString());
   
  -        final String location = "generated:" + getServiceType();
  +        final String location = "generated:"+getServiceType();
   
  -        if (connectionManager instanceof SimpleConnectionManager) {
  -            String connectionLimitString = conf.getChild("connectionLimit").getValue(null);
  -            if (connectionLimitString != null) {
  +        if(connectionManager instanceof SimpleConnectionManager) {
  +            String connectionLimitString =
  +                conf.getChild("connectionLimit").getValue(null);
  +            if(connectionLimitString != null) {
                   try {
                       connectionLimit = new Integer(connectionLimitString);
  -                } catch (NumberFormatException nfe) {
  -                    getLogger().error("Connection limit value is not properly formatted.", nfe);
  +                } catch(NumberFormatException nfe) {
  +                    getLogger().error(
  +                        "Connection limit value is not properly formatted.",nfe);
                   }
  -                if (connectionLimit.intValue() < 0) {
  -                    getLogger().error("Connection limit value cannot be less than zero.");
  -                    throw new ConfigurationException("Connection limit value cannot be less than zero.");
  +                if(connectionLimit.intValue() < 0) {
  +                    getLogger().error(
  +                        "Connection limit value cannot be less than zero.");
  +                    throw new ConfigurationException(
  +                        "Connection limit value cannot be less than zero.");
                   }
               } else {
  -                connectionLimit = new Integer(((SimpleConnectionManager)connectionManager).getMaximumNumberOfOpenConnections());
  +                connectionLimit =
  +                    new Integer(
  +                        ((SimpleConnectionManager)connectionManager)
  +                        .getMaximumNumberOfOpenConnections());
               }
  -            infoBuffer = new StringBuffer(128)
  -                .append(getServiceType())
  -                .append(" will allow a maximum of ")
  -                .append(connectionLimit.intValue())
  -                .append(" connections.");
  +            infoBuffer =
  +                new StringBuffer(128).append(getServiceType())
  +                                     .append(" will allow a maximum of ")
  +                                     .append(connectionLimit.intValue()).append(
  +                    " connections.");
               getLogger().info(infoBuffer.toString());
           }
       }
   
       /**
  +     * @see org.apache.avalon.framework.activity.Disposable#dispose()
  +     */
  +    public void dispose() {
  +        if(!isEnabled()) {
  +            return;
  +        }
  +        StringBuffer infoBuffer =
  +            new StringBuffer(64).append(getServiceType()).append(
  +                " dispose... ").append(connectionName);
  +        getLogger().debug(infoBuffer.toString());
  +
  +        try {
  +            connectionManager.disconnect(connectionName,true);
  +        } catch(final Exception e) {
  +            StringBuffer warnBuffer =
  +                new StringBuffer(64).append("Error disconnecting ")
  +                                    .append(getServiceType()).append(": ");
  +            getLogger().warn(warnBuffer.toString(),e);
  +        }
  +
  +        compMgr     = null;
  +
  +        connectionManager     = null;
  +        threadPool            = null;
  +
  +        // This is needed to make sure sockets are promptly closed on Windows 2000
  +        // TODO: Check this - shouldn't need to explicitly gc to force socket closure
  +        System.gc();
  +
  +        getLogger().debug(getServiceType()+" ...dispose end");
  +    }
  +
  +    /**
        * @see org.apache.avalon.framework.activity.Initializable#initialize()
        */
       public void initialize() throws Exception {
  -        if (!isEnabled()) {
  -            getLogger().info(getServiceType() + " Disabled");
  -            System.out.println(getServiceType() + " Disabled");
  +        if(!isEnabled()) {
  +            getLogger().info(getServiceType()+" Disabled");
  +            System.out.println(getServiceType()+" Disabled");
               return;
           }
  -        getLogger().debug(getServiceType() + " init...");
  +        getLogger().debug(getServiceType()+" init...");
   
  -        SocketManager socketManager = (SocketManager) compMgr.lookup(SocketManager.ROLE);
  +        SocketManager socketManager =
  +            (SocketManager)compMgr.lookup(SocketManager.ROLE);
   
  -        ThreadManager threadManager = (ThreadManager) compMgr.lookup(ThreadManager.ROLE);
  +        ThreadManager threadManager =
  +            (ThreadManager)compMgr.lookup(ThreadManager.ROLE);
   
  -        if (threadGroup != null) {
  +        if(threadGroup != null) {
               threadPool = threadManager.getThreadPool(threadGroup);
           } else {
               threadPool = threadManager.getDefaultThreadPool();
           }
   
  -        ServerSocketFactory factory = socketManager.getServerSocketFactory(serverSocketType);
  -        ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);
  -    
  -        if (null == connectionName) {
  +        ServerSocketFactory factory =
  +            socketManager.getServerSocketFactory(serverSocketType);
  +        ServerSocket serverSocket = factory.createServerSocket(port,5,bindTo);
  +
  +        if(null == connectionName) {
               final StringBuffer sb = new StringBuffer();
               sb.append(serverSocketType);
               sb.append(':');
               sb.append(port);
  -    
  -            if (null != bindTo) {
  +
  +            if(null != bindTo) {
                   sb.append('/');
                   sb.append(bindTo);
               }
               connectionName = sb.toString();
           }
   
  -        if ((connectionLimit != null) &&
  -            (connectionManager instanceof SimpleConnectionManager)) {
  -            if (null != threadPool) {
  -                ((SimpleConnectionManager)connectionManager).connect(connectionName, serverSocket, this, threadPool, connectionLimit.intValue());
  -            }
  -            else {
  -                ((SimpleConnectionManager)connectionManager).connect(connectionName, serverSocket, this, connectionLimit.intValue()); // default pool
  +        if(
  +            (connectionLimit != null)
  +                &&(connectionManager instanceof SimpleConnectionManager)) {
  +            if(null != threadPool) {
  +                ((SimpleConnectionManager)connectionManager).connect(
  +                    connectionName,serverSocket,this,threadPool,
  +                    connectionLimit.intValue());
  +            } else {
  +                ((SimpleConnectionManager)connectionManager).connect(
  +                    connectionName,serverSocket,this,connectionLimit.intValue()); // default pool
               }
           } else {
  -            if (null != threadPool) {
  -                connectionManager.connect(connectionName, serverSocket, this, threadPool);
  -            }
  -            else {
  -                connectionManager.connect(connectionName, serverSocket, this); // default pool
  +            if(null != threadPool) {
  +                connectionManager.connect(
  +                    connectionName,serverSocket,this,threadPool);
  +            } else {
  +                connectionManager.connect(connectionName,serverSocket,this); // default pool
               }
           }
   
  -        getLogger().debug(getServiceType() + " ...init end");
  +        getLogger().debug(getServiceType()+" ...init end");
   
           StringBuffer logBuffer =
  -            new StringBuffer(64)
  -                .append(getServiceType())
  -                .append(" started ")
  -                .append(connectionName);
  +            new StringBuffer(64).append(getServiceType()).append(" started ")
  +                                .append(connectionName);
           String logString = logBuffer.toString();
           System.out.println(logString);
           getLogger().info(logString);
       }
   
       /**
  -     * @see org.apache.avalon.framework.activity.Disposable#dispose()
  +     * Describes whether this service is enabled by configuration.
  +     *
  +     * @return is the service enabled.
        */
  -    public void dispose() {
  -
  -        if (!isEnabled()) {
  -            return;
  -        }
  -        StringBuffer infoBuffer =
  -            new StringBuffer(64)
  -                    .append(getServiceType())
  -                    .append(" dispose... ")
  -                    .append(connectionName);
  -        getLogger().debug(infoBuffer.toString());
  -
  -        try {
  -            connectionManager.disconnect(connectionName, true);
  -        } catch (final Exception e) {
  -            StringBuffer warnBuffer =
  -                new StringBuffer(64)
  -                        .append("Error disconnecting ")
  -                        .append(getServiceType())
  -                        .append(": ");
  -            getLogger().warn(warnBuffer.toString(), e);
  -        }
  -
  -        compMgr = null;
  -
  -        connectionManager = null;
  -        threadPool = null;
  -
  -        // This is needed to make sure sockets are promptly closed on Windows 2000
  -        // TODO: Check this - shouldn't need to explicitly gc to force socket closure
  -        System.gc();
  -    
  -        getLogger().debug(getServiceType() + " ...dispose end");
  +    protected final boolean isEnabled() {
  +        return enabled;
       }
   
       /**
  -     * This constructs the WatchdogFactory that will be used to guard
  -     * against runaway or stuck behavior.  Should only be called once
  -     * by a subclass in its initialize() method.
  +     * This constructs the WatchdogFactory that will be used to guard against
  +     * runaway or stuck behavior.  Should only be called once by a subclass in
  +     * its initialize() method.
        *
        * @return the WatchdogFactory to be employed by subclasses.
        */
       protected WatchdogFactory getWatchdogFactory() {
           WatchdogFactory theWatchdogFactory = null;
  -        theWatchdogFactory = new ThreadPerWatchdogFactory(threadPool, timeout);
  -        if (theWatchdogFactory instanceof LogEnabled) {
  +        theWatchdogFactory = new ThreadPerWatchdogFactory(threadPool,timeout);
  +        if(theWatchdogFactory instanceof LogEnabled) {
               ((LogEnabled)theWatchdogFactory).enableLogging(getLogger());
           }
           return theWatchdogFactory;
  -     }
  -
  -
  -    /**
  -     * Describes whether this service is enabled by configuration.
  -     *
  -     * @return is the service enabled.
  -     */
  -    protected final boolean isEnabled() {
  -        return enabled;
       }
  +
       /**
        * Overide this method to create actual instance of connection handler.
        *
        * @return the new ConnectionHandler
  +     *
        * @exception Exception if an error occurs
        */
  -    protected abstract ConnectionHandler newHandler()
  -        throws Exception;
  +    protected abstract ConnectionHandler newHandler() throws Exception;
   
       /**
  -     * Get the default port for this server type.
  -     *
  -     * It is strongly recommended that subclasses of this class
  -     * override this method to specify the default port for their
  -     * specific server type.
  +     * Get the default port for this server type. It is strongly recommended
  +     * that subclasses of this class override this method to specify the
  +     * default port for their specific server type.
        *
        * @return the default port
        */
  -     protected int getDefaultPort() {
  +    protected int getDefaultPort() {
           return 0;
  -     }
  +    }
   
       /**
        * Get whether TLS is enabled for this server's socket by default.
        *
        * @return the default port
        */
  -     protected boolean isDefaultTLSEnabled() {
  +    protected boolean isDefaultTLSEnabled() {
           return false;
  -     }
  -
  -    /**
  -     * This method returns the type of service provided by this server.
  -     * This should be invariant over the life of the class.
  -     *
  -     * Subclasses may override this implementation.  This implementation
  -     * parses the complete class name and returns the undecorated class
  -     * name.
  -     *
  -     * @return description of this server
  -     */
  -    public String getServiceType() {
  -        String name = getClass().getName();
  -        int p = name.lastIndexOf(".");
  -        if (p > 0 && p < name.length() - 2) {
  -            name = name.substring(p + 1);
  -        }
  -        return name;
       }
   }
  -
  
  
  
  1.5       +7 -2      jakarta-james/src/java/org/apache/james/core/MailHeaders.java
  
  Index: MailHeaders.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/core/MailHeaders.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MailHeaders.java	14 Sep 2002 06:22:36 -0000	1.4
  +++ MailHeaders.java	6 Jan 2003 17:08:43 -0000	1.5
  @@ -7,10 +7,15 @@
    */
   package org.apache.james.core;
   
  +import java.io.ByteArrayOutputStream;
  +import java.io.InputStream;
  +import java.io.OutputStream;
  +import java.io.PrintStream;
  +import java.io.Serializable;
  +import java.util.Enumeration;
  +
   import javax.mail.MessagingException;
   import javax.mail.internet.InternetHeaders;
  -import java.io.*;
  -import java.util.Enumeration;
   
   import org.apache.james.util.RFC2822Headers;
   
  
  
  
  1.18      +16 -12    jakarta-james/src/java/org/apache/james/core/MailImpl.java
  
  Index: MailImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/core/MailImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- MailImpl.java	26 Oct 2002 04:15:30 -0000	1.17
  +++ MailImpl.java	6 Jan 2003 17:08:43 -0000	1.18
  @@ -7,11 +7,17 @@
    */
   package org.apache.james.core;
   
  -import org.apache.avalon.framework.activity.Disposable;
  -
  -import org.apache.james.util.RFC2822Headers;
  -import org.apache.mailet.Mail;
  -import org.apache.mailet.MailAddress;
  +import java.io.BufferedReader;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.InputStreamReader;
  +import java.io.OutputStream;
  +import java.util.ArrayList;
  +import java.util.Collection;
  +import java.util.Date;
  +import java.util.Enumeration;
  +import java.util.HashSet;
  +import java.util.Iterator;
   
   import javax.mail.Address;
   import javax.mail.Message;
  @@ -19,13 +25,11 @@
   import javax.mail.internet.InternetAddress;
   import javax.mail.internet.MimeMessage;
   import javax.mail.internet.ParseException;
  -import java.io.*;
  -import java.util.ArrayList;
  -import java.util.Collection;
  -import java.util.Date;
  -import java.util.Enumeration;
  -import java.util.HashSet;
  -import java.util.Iterator;
  +
  +import org.apache.avalon.framework.activity.Disposable;
  +import org.apache.james.util.RFC2822Headers;
  +import org.apache.mailet.Mail;
  +import org.apache.mailet.MailAddress;
   
   /**
    * Wraps a MimeMessage adding routing information (from SMTP) and some simple
  
  
  
  1.10      +9 -1      jakarta-james/src/java/org/apache/james/core/MimeMessageInputStreamSource.java
  
  Index: MimeMessageInputStreamSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/core/MimeMessageInputStreamSource.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MimeMessageInputStreamSource.java	26 Oct 2002 04:15:30 -0000	1.9
  +++ MimeMessageInputStreamSource.java	6 Jan 2003 17:08:43 -0000	1.10
  @@ -7,7 +7,15 @@
    */
   package org.apache.james.core;
   
  -import java.io.*;
  +import java.io.BufferedInputStream;
  +import java.io.BufferedOutputStream;
  +import java.io.File;
  +import java.io.FileInputStream;
  +import java.io.FileOutputStream;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.OutputStream;
  +
   import javax.mail.MessagingException;
   
   import org.apache.avalon.framework.activity.Disposable;
  
  
  
  1.18      +25 -6     jakarta-james/src/java/org/apache/james/core/MimeMessageWrapper.java
  
  Index: MimeMessageWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/core/MimeMessageWrapper.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- MimeMessageWrapper.java	26 Oct 2002 04:15:30 -0000	1.17
  +++ MimeMessageWrapper.java	6 Jan 2003 17:08:43 -0000	1.18
  @@ -7,20 +7,39 @@
    */
   package org.apache.james.core;
   
  -import javax.activation.DataHandler;
  -import javax.mail.*;
  -import javax.mail.internet.*;
  -import java.io.*;
  +import java.io.BufferedWriter;
  +import java.io.ByteArrayInputStream;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.InputStreamReader;
  +import java.io.LineNumberReader;
  +import java.io.OutputStream;
  +import java.io.OutputStreamWriter;
  +import java.io.PrintWriter;
  +import java.io.SequenceInputStream;
  +import java.io.UnsupportedEncodingException;
   import java.text.ParseException;
   import java.util.Date;
   import java.util.Enumeration;
   import java.util.Vector;
   
  +import javax.activation.DataHandler;
  +import javax.mail.Address;
  +import javax.mail.Flags;
  +import javax.mail.Header;
  +import javax.mail.Message;
  +import javax.mail.MessagingException;
  +import javax.mail.Multipart;
  +import javax.mail.internet.InternetAddress;
  +import javax.mail.internet.InternetHeaders;
  +import javax.mail.internet.MimeMessage;
  +import javax.mail.internet.MimeUtility;
  +import javax.mail.internet.NewsAddress;
  +
  +import org.apache.avalon.framework.activity.Disposable;
   import org.apache.james.util.InternetPrintWriter;
   import org.apache.james.util.RFC2822Headers;
   import org.apache.james.util.RFC822DateFormat;
  -
  -import org.apache.avalon.framework.activity.Disposable;
   
   
   /**
  
  
  
  1.10      +21 -5     jakarta-james/src/java/org/apache/james/dnsserver/DNSServer.java
  
  Index: DNSServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/dnsserver/DNSServer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DNSServer.java	2 Oct 2002 06:12:02 -0000	1.9
  +++ DNSServer.java	6 Jan 2003 17:08:43 -0000	1.10
  @@ -7,16 +7,32 @@
    */
   package org.apache.james.dnsserver;
   
  +import java.net.InetAddress;
  +import java.net.UnknownHostException;
  +import java.util.Arrays;
  +import java.util.Collection;
  +import java.util.Comparator;
  +import java.util.Enumeration;
  +import java.util.Iterator;
  +import java.util.Vector;
  +
   import org.apache.avalon.framework.activity.Initializable;
   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.logger.AbstractLogEnabled;
  -import org.xbill.DNS.*;
  -
  -import java.net.InetAddress;
  -import java.net.UnknownHostException;
  -import java.util.*;
  +import org.xbill.DNS.Cache;
  +import org.xbill.DNS.Credibility;
  +import org.xbill.DNS.DClass;
  +import org.xbill.DNS.ExtendedResolver;
  +import org.xbill.DNS.MXRecord;
  +import org.xbill.DNS.Name;
  +import org.xbill.DNS.RRset;
  +import org.xbill.DNS.Rcode;
  +import org.xbill.DNS.Record;
  +import org.xbill.DNS.Resolver;
  +import org.xbill.DNS.SetResponse;
  +import org.xbill.DNS.Type;
   
   /**
    * Provides DNS client functionality to components running
  
  
  
  1.22      +7 -3      jakarta-james/src/java/org/apache/james/mailrepository/AvalonMailRepository.java
  
  Index: AvalonMailRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/AvalonMailRepository.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- AvalonMailRepository.java	6 Jan 2003 12:38:04 -0000	1.21
  +++ AvalonMailRepository.java	6 Jan 2003 17:08:43 -0000	1.22
  @@ -7,6 +7,13 @@
    */
   package org.apache.james.mailrepository;
   
  +import java.io.OutputStream;
  +import java.util.Collection;
  +import java.util.Collections;
  +import java.util.HashSet;
  +import java.util.Iterator;
  +import java.util.Set;
  +
   import org.apache.avalon.cornerstone.services.store.ObjectRepository;
   import org.apache.avalon.cornerstone.services.store.Store;
   import org.apache.avalon.cornerstone.services.store.StreamRepository;
  @@ -25,9 +32,6 @@
   import org.apache.james.services.MailStore;
   import org.apache.james.util.Lock;
   import org.apache.mailet.MailRepository;
  -
  -import java.io.OutputStream;
  -import java.util.*;
   
   /**
    * Implementation of a MailRepository on a FileSystem.
  
  
  
  1.32      +22 -9     jakarta-james/src/java/org/apache/james/mailrepository/JDBCMailRepository.java
  
  Index: JDBCMailRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/JDBCMailRepository.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- JDBCMailRepository.java	6 Jan 2003 12:38:04 -0000	1.31
  +++ JDBCMailRepository.java	6 Jan 2003 17:08:44 -0000	1.32
  @@ -7,6 +7,28 @@
    */
   package org.apache.james.mailrepository;
   
  +import java.io.ByteArrayInputStream;
  +import java.io.ByteArrayOutputStream;
  +import java.io.File;
  +import java.io.IOException;
  +import java.io.OutputStream;
  +import java.sql.Connection;
  +import java.sql.DatabaseMetaData;
  +import java.sql.PreparedStatement;
  +import java.sql.ResultSet;
  +import java.sql.SQLException;
  +import java.sql.Statement;
  +import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.HashSet;
  +import java.util.Iterator;
  +import java.util.List;
  +import java.util.Map;
  +import java.util.Set;
  +import java.util.StringTokenizer;
  +
  +import javax.mail.internet.MimeMessage;
  +
   import org.apache.avalon.cornerstone.services.datasource.DataSourceSelector;
   import org.apache.avalon.cornerstone.services.store.Store;
   import org.apache.avalon.cornerstone.services.store.StreamRepository;
  @@ -32,15 +54,6 @@
   import org.apache.james.util.SqlResources;
   import org.apache.mailet.MailAddress;
   import org.apache.mailet.MailRepository;
  -
  -import javax.mail.internet.MimeMessage;
  -import java.io.ByteArrayInputStream;
  -import java.io.ByteArrayOutputStream;
  -import java.io.File;
  -import java.io.IOException;
  -import java.io.OutputStream;
  -import java.sql.*;
  -import java.util.*;
   
   /**
    * Implementation of a MailRepository on a database.
  
  
  
  1.27      +17 -22    jakarta-james/src/java/org/apache/james/nntpserver/NNTPHandler.java
  
  Index: NNTPHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/nntpserver/NNTPHandler.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- NNTPHandler.java	6 Jan 2003 15:53:00 -0000	1.26
  +++ NNTPHandler.java	6 Jan 2003 17:08:44 -0000	1.27
  @@ -7,40 +7,35 @@
    */
   package org.apache.james.nntpserver;
   
  +import java.io.BufferedReader;
  +import java.io.BufferedWriter;
  +import java.io.IOException;
  +import java.io.InputStreamReader;
  +import java.io.OutputStreamWriter;
  +import java.io.PrintWriter;
  +import java.net.Socket;
  +import java.text.ParseException;
  +import java.util.ArrayList;
  +import java.util.Calendar;
  +import java.util.Date;
  +import java.util.Iterator;
  +import java.util.List;
  +import java.util.Locale;
  +import java.util.StringTokenizer;
  +
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
   import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
  -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.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.Logger;
   import org.apache.james.nntpserver.repository.NNTPArticle;
   import org.apache.james.nntpserver.repository.NNTPGroup;
   import org.apache.james.nntpserver.repository.NNTPLineReaderImpl;
  -import org.apache.james.nntpserver.repository.NNTPRepository;
  -import org.apache.james.services.UsersStore;
   import org.apache.james.util.InternetPrintWriter;
  -import org.apache.james.util.RFC977DateFormat;
   import org.apache.james.util.RFC2980DateFormat;
  +import org.apache.james.util.RFC977DateFormat;
   import org.apache.james.util.SimplifiedDateFormat;
   import org.apache.james.util.watchdog.Watchdog;
   import org.apache.james.util.watchdog.WatchdogTarget;
  -import org.apache.mailet.UsersRepository;
  -
  -import java.io.BufferedReader;
  -import java.io.BufferedWriter;
  -import java.io.IOException;
  -import java.io.InputStreamReader;
  -import java.io.OutputStreamWriter;
  -import java.io.PrintWriter;
  -import java.net.Socket;
  -import java.text.DateFormat;
  -import java.text.ParseException;
  -import java.util.*;
   
   /**
    * The NNTP protocol is defined by RFC 977.
  
  
  
  1.11      +8 -2      jakarta-james/src/java/org/apache/james/nntpserver/repository/NNTPArticleImpl.java
  
  Index: NNTPArticleImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/nntpserver/repository/NNTPArticleImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- NNTPArticleImpl.java	26 Oct 2002 04:15:29 -0000	1.10
  +++ NNTPArticleImpl.java	6 Jan 2003 17:08:45 -0000	1.11
  @@ -7,10 +7,16 @@
    */
   package org.apache.james.nntpserver.repository;
   
  -import org.apache.james.nntpserver.NNTPException;
  +import java.io.BufferedReader;
  +import java.io.File;
  +import java.io.FileInputStream;
  +import java.io.FileReader;
  +import java.io.IOException;
  +import java.io.PrintWriter;
   
   import javax.mail.internet.InternetHeaders;
  -import java.io.*;
  +
  +import org.apache.james.nntpserver.NNTPException;
   
   /** 
    * Please see NNTPArticle for comments
  
  
  
  1.21      +16 -9     jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java
  
  Index: POP3Handler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- POP3Handler.java	6 Jan 2003 15:53:00 -0000	1.20
  +++ POP3Handler.java	6 Jan 2003 17:08:45 -0000	1.21
  @@ -7,16 +7,29 @@
    */
   package org.apache.james.pop3server;
   
  +import java.io.BufferedOutputStream;
  +import java.io.BufferedReader;
  +import java.io.IOException;
  +import java.io.InputStreamReader;
  +import java.io.OutputStream;
  +import java.io.PrintWriter;
  +import java.net.Socket;
  +import java.util.Enumeration;
  +import java.util.Iterator;
  +import java.util.List;
  +import java.util.Locale;
  +import java.util.StringTokenizer;
  +import java.util.Vector;
  +
  +import javax.mail.MessagingException;
  +
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
   import org.apache.avalon.excalibur.collections.ListUtils;
   import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -
   import org.apache.james.Constants;
   import org.apache.james.core.MailImpl;
  -import org.apache.james.services.MailServer;
  -import org.apache.james.services.UsersStore;
   import org.apache.james.util.ExtraDotOutputStream;
   import org.apache.james.util.InternetPrintWriter;
   import org.apache.james.util.watchdog.BytesWrittenResetOutputStream;
  @@ -24,12 +37,6 @@
   import org.apache.james.util.watchdog.WatchdogTarget;
   import org.apache.mailet.Mail;
   import org.apache.mailet.MailRepository;
  -import org.apache.mailet.UsersRepository;
  -
  -import javax.mail.MessagingException;
  -import java.io.*;
  -import java.net.Socket;
  -import java.util.*;
   
   /**
    * The handler class for POP3 connections.
  
  
  
  1.14      +7 -12     jakarta-james/src/java/org/apache/james/remotemanager/RemoteManager.java
  
  Index: RemoteManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/remotemanager/RemoteManager.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- RemoteManager.java	6 Jan 2003 15:53:00 -0000	1.13
  +++ RemoteManager.java	6 Jan 2003 17:08:45 -0000	1.14
  @@ -7,32 +7,27 @@
    */
   package org.apache.james.remotemanager;
   
  +import java.util.HashMap;
  +
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
   import org.apache.avalon.excalibur.pool.DefaultPool;
   import org.apache.avalon.excalibur.pool.HardResourceLimitingPool;
   import org.apache.avalon.excalibur.pool.ObjectFactory;
   import org.apache.avalon.excalibur.pool.Pool;
   import org.apache.avalon.excalibur.pool.Poolable;
  -import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
  +import org.apache.avalon.framework.configuration.Configuration;
  +import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.LogEnabled;
  -
   import org.apache.james.core.AbstractJamesService;
  -import org.apache.james.services.*;
  +import org.apache.james.services.MailServer;
  +import org.apache.james.services.UsersStore;
   import org.apache.james.util.watchdog.Watchdog;
   import org.apache.james.util.watchdog.WatchdogFactory;
  -import org.apache.james.util.watchdog.WatchdogTarget;
  -import org.apache.mailet.*;
  -
  -import java.net.InetAddress;
  -import java.net.UnknownHostException;
  -import java.util.HashMap;
  +import org.apache.mailet.UsersRepository;
   
   /**
    * Provides a really rude network interface to administer James.
  
  
  
  1.23      +16 -19    jakarta-james/src/java/org/apache/james/remotemanager/RemoteManagerHandler.java
  
  Index: RemoteManagerHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/remotemanager/RemoteManagerHandler.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- RemoteManagerHandler.java	6 Jan 2003 15:53:00 -0000	1.22
  +++ RemoteManagerHandler.java	6 Jan 2003 17:08:46 -0000	1.23
  @@ -7,22 +7,6 @@
    */
   package org.apache.james.remotemanager;
   
  -import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
  -import org.apache.avalon.excalibur.pool.Poolable;
  -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.activity.Disposable;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.james.Constants;
  -import org.apache.james.services.*;
  -import org.apache.james.userrepository.DefaultUser;
  -import org.apache.james.util.watchdog.Watchdog;
  -import org.apache.james.util.watchdog.WatchdogTarget;
  -import org.apache.mailet.*;
  -import org.apache.mailet.MailAddress;
  -
  -import javax.mail.internet.ParseException;
   import java.io.BufferedReader;
   import java.io.BufferedWriter;
   import java.io.IOException;
  @@ -30,10 +14,23 @@
   import java.io.OutputStreamWriter;
   import java.io.PrintWriter;
   import java.net.Socket;
  -import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Locale;
  -import java.util.StringTokenizer;
  +
  +import javax.mail.internet.ParseException;
  +
  +import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
  +import org.apache.avalon.excalibur.pool.Poolable;
  +import org.apache.avalon.framework.activity.Disposable;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.james.Constants;
  +import org.apache.james.services.JamesUser;
  +import org.apache.james.userrepository.DefaultUser;
  +import org.apache.james.util.watchdog.Watchdog;
  +import org.apache.james.util.watchdog.WatchdogTarget;
  +import org.apache.mailet.MailAddress;
  +import org.apache.mailet.User;
  +import org.apache.mailet.UsersRepository;
   
   /**
    * Provides a really rude network interface to administer James.
  
  
  
  1.7       +9 -4      jakarta-james/src/java/org/apache/james/security/DigestUtil.java
  
  Index: DigestUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/security/DigestUtil.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DigestUtil.java	14 Sep 2002 09:00:57 -0000	1.6
  +++ DigestUtil.java	6 Jan 2003 17:08:46 -0000	1.7
  @@ -7,12 +7,17 @@
    */
   package org.apache.james.security;
   
  -import javax.mail.MessagingException;
  -import javax.mail.internet.MimeUtility;
  -import java.io.*;
  +import java.io.ByteArrayOutputStream;
  +import java.io.FileInputStream;
  +import java.io.FileOutputStream;
  +import java.io.IOException;
  +import java.io.OutputStream;
   import java.security.MessageDigest;
   import java.security.NoSuchAlgorithmException;
   import java.util.Locale;
  +
  +import javax.mail.MessagingException;
  +import javax.mail.internet.MimeUtility;
   
   
   /**
  
  
  
  1.6       +2 -2      jakarta-james/src/java/org/apache/james/services/JamesUser.java
  
  Index: JamesUser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/services/JamesUser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JamesUser.java	6 Jan 2003 15:53:01 -0000	1.5
  +++ JamesUser.java	6 Jan 2003 17:08:46 -0000	1.6
  @@ -7,8 +7,8 @@
    */
   package org.apache.james.services;
   
  -import org.apache.mailet.*;
   import org.apache.mailet.MailAddress;
  +import org.apache.mailet.User;
   
   /**
    * Interface for objects representing users of an email/ messaging system.
  
  
  
  1.13      +7 -6      jakarta-james/src/java/org/apache/james/services/MailServer.java
  
  Index: MailServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/services/MailServer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- MailServer.java	6 Jan 2003 12:38:05 -0000	1.12
  +++ MailServer.java	6 Jan 2003 17:08:46 -0000	1.13
  @@ -7,14 +7,15 @@
    */
   package org.apache.james.services;
   
  -import org.apache.mailet.*;
  -import org.apache.mailet.Mail;
  -import org.apache.mailet.MailAddress;
  +import java.io.InputStream;
  +import java.util.Collection;
   
   import javax.mail.MessagingException;
   import javax.mail.internet.MimeMessage;
  -import java.io.InputStream;
  -import java.util.Collection;
  +
  +import org.apache.mailet.Mail;
  +import org.apache.mailet.MailAddress;
  +import org.apache.mailet.MailRepository;
   
   /**
    * The interface for Phoenix blocks to the James MailServer
  
  
  
  1.37      +31 -10    jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java
  
  Index: SMTPHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- SMTPHandler.java	6 Jan 2003 15:53:01 -0000	1.36
  +++ SMTPHandler.java	6 Jan 2003 17:08:47 -0000	1.37
  @@ -7,6 +7,31 @@
    */
   package org.apache.james.smtpserver;
   
  +import java.io.BufferedInputStream;
  +import java.io.BufferedReader;
  +import java.io.BufferedWriter;
  +import java.io.ByteArrayInputStream;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.InputStreamReader;
  +import java.io.InterruptedIOException;
  +import java.io.OutputStreamWriter;
  +import java.io.PrintWriter;
  +import java.io.SequenceInputStream;
  +import java.net.Socket;
  +import java.net.SocketException;
  +import java.util.ArrayList;
  +import java.util.Collection;
  +import java.util.Date;
  +import java.util.Enumeration;
  +import java.util.HashMap;
  +import java.util.List;
  +import java.util.Locale;
  +import java.util.Random;
  +import java.util.StringTokenizer;
  +
  +import javax.mail.MessagingException;
  +
   import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
   import org.apache.avalon.excalibur.pool.Poolable;
   import org.apache.avalon.framework.activity.Disposable;
  @@ -14,19 +39,15 @@
   import org.apache.james.Constants;
   import org.apache.james.core.MailHeaders;
   import org.apache.james.core.MailImpl;
  -import org.apache.james.services.MailServer;
  -import org.apache.james.util.*;
  +import org.apache.james.util.Base64;
  +import org.apache.james.util.CharTerminatedInputStream;
  +import org.apache.james.util.InternetPrintWriter;
  +import org.apache.james.util.RFC2822Headers;
  +import org.apache.james.util.RFC822DateFormat;
   import org.apache.james.util.watchdog.BytesReadResetInputStream;
   import org.apache.james.util.watchdog.Watchdog;
   import org.apache.james.util.watchdog.WatchdogTarget;
   import org.apache.mailet.MailAddress;
  -import org.apache.mailet.UsersRepository;
  -
  -import javax.mail.MessagingException;
  -import java.io.*;
  -import java.net.Socket;
  -import java.net.SocketException;
  -import java.util.*;
   /**
    * Provides SMTP functionality by carrying out the server side of the SMTP
    * interaction.
  
  
  
  1.22      +13 -7     jakarta-james/src/java/org/apache/james/transport/JamesSpoolManager.java
  
  Index: JamesSpoolManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/JamesSpoolManager.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- JamesSpoolManager.java	6 Jan 2003 12:38:05 -0000	1.21
  +++ JamesSpoolManager.java	6 Jan 2003 17:08:47 -0000	1.22
  @@ -7,26 +7,32 @@
    */
   package org.apache.james.transport;
   
  +import java.util.HashMap;
  +import java.util.Iterator;
  +
  +import javax.mail.MessagingException;
  +
   import org.apache.avalon.cornerstone.services.threads.ThreadManager;
   import org.apache.avalon.excalibur.thread.ThreadPool;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.component.DefaultComponentManager;
  -import org.apache.avalon.framework.component.Component;
   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.logger.AbstractLogEnabled;
   import org.apache.james.core.MailImpl;
   import org.apache.james.services.MailStore;
  -import org.apache.mailet.*;
  -
  -import javax.mail.MessagingException;
  -import java.util.HashMap;
  -import java.util.Iterator;
  +import org.apache.mailet.Mail;
  +import org.apache.mailet.Mailet;
  +import org.apache.mailet.MailetContext;
  +import org.apache.mailet.MailetException;
  +import org.apache.mailet.Matcher;
  +import org.apache.mailet.SpoolRepository;
   
   /**
    * Manages the mail spool.  This class is responsible for retrieving
  
  
  
  1.12      +16 -9     jakarta-james/src/java/org/apache/james/transport/LinearProcessor.java
  
  Index: LinearProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/LinearProcessor.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- LinearProcessor.java	6 Jan 2003 12:38:05 -0000	1.11
  +++ LinearProcessor.java	6 Jan 2003 17:08:47 -0000	1.12
  @@ -7,22 +7,29 @@
    */
   package org.apache.james.transport;
   
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.james.core.MailImpl;
  -import org.apache.mailet.*;
  -
  -import javax.mail.MessagingException;
   import java.io.PrintWriter;
   import java.io.StringWriter;
   import java.util.ArrayList;
   import java.util.Collection;
  +import java.util.Iterator;
   import java.util.List;
   import java.util.Random;
   import java.util.Vector;
  -import java.util.Iterator;
  +
  +import javax.mail.MessagingException;
  +
  +import org.apache.avalon.framework.activity.Disposable;
  +import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.james.core.MailImpl;
  +import org.apache.mailet.GenericMailet;
  +import org.apache.mailet.GenericMatcher;
  +import org.apache.mailet.Mail;
  +import org.apache.mailet.MailAddress;
  +import org.apache.mailet.Mailet;
  +import org.apache.mailet.MailetException;
  +import org.apache.mailet.Matcher;
  +import org.apache.mailet.SpoolRepository;
   
   /**
    * Implements a processor for mails, directing the mail down
  
  
  
  1.11      +12 -8     jakarta-james/src/java/org/apache/james/transport/mailets/JDBCAlias.java
  
  Index: JDBCAlias.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/JDBCAlias.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JDBCAlias.java	23 Aug 2002 08:00:29 -0000	1.10
  +++ JDBCAlias.java	6 Jan 2003 17:08:47 -0000	1.11
  @@ -7,6 +7,18 @@
    */
   package org.apache.james.transport.mailets;
   
  +import java.sql.Connection;
  +import java.sql.DatabaseMetaData;
  +import java.sql.PreparedStatement;
  +import java.sql.ResultSet;
  +import java.sql.SQLException;
  +import java.util.Collection;
  +import java.util.Iterator;
  +import java.util.Vector;
  +
  +import javax.mail.MessagingException;
  +import javax.mail.internet.ParseException;
  +
   import org.apache.avalon.cornerstone.services.datasource.DataSourceSelector;
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.framework.component.ComponentManager;
  @@ -16,14 +28,6 @@
   import org.apache.mailet.Mail;
   import org.apache.mailet.MailAddress;
   import org.apache.mailet.MailetException;
  -
  -import javax.mail.MessagingException;
  -import javax.mail.internet.ParseException;
  -import java.sql.*;
  -import java.util.Collection;
  -import java.util.Iterator;
  -import java.util.Locale;
  -import java.util.Vector;
   
   /**
    * Rewrites recipient addresses based on a database table.  The connection
  
  
  
  1.11      +12 -7     jakarta-james/src/java/org/apache/james/transport/mailets/JDBCListserv.java
  
  Index: JDBCListserv.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/JDBCListserv.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JDBCListserv.java	23 Aug 2002 08:00:29 -0000	1.10
  +++ JDBCListserv.java	6 Jan 2003 17:08:48 -0000	1.11
  @@ -7,6 +7,18 @@
    */
   package org.apache.james.transport.mailets;
   
  +import java.sql.Connection;
  +import java.sql.DatabaseMetaData;
  +import java.sql.PreparedStatement;
  +import java.sql.ResultSet;
  +import java.sql.SQLException;
  +import java.sql.Statement;
  +import java.util.Collection;
  +import java.util.Vector;
  +
  +import javax.mail.MessagingException;
  +import javax.mail.internet.ParseException;
  +
   import org.apache.avalon.cornerstone.services.datasource.DataSourceSelector;
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.framework.component.ComponentManager;
  @@ -14,13 +26,6 @@
   import org.apache.james.util.JDBCUtil;
   import org.apache.mailet.MailAddress;
   import org.apache.mailet.MailetException;
  -
  -import javax.mail.MessagingException;
  -import javax.mail.internet.ParseException;
  -import java.sql.*;
  -import java.util.Collection;
  -import java.util.Locale;
  -import java.util.Vector;
   
   /**
    * Rewrites recipient addresses based on a database table.  The connection
  
  
  
  1.2       +12 -8     jakarta-james/src/java/org/apache/james/transport/mailets/JDBCVirtualUserTable.java
  
  Index: JDBCVirtualUserTable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/JDBCVirtualUserTable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JDBCVirtualUserTable.java	4 Oct 2002 04:55:19 -0000	1.1
  +++ JDBCVirtualUserTable.java	6 Jan 2003 17:08:48 -0000	1.2
  @@ -7,6 +7,18 @@
    */
   package org.apache.james.transport.mailets;
   
  +import java.sql.Connection;
  +import java.sql.DatabaseMetaData;
  +import java.sql.PreparedStatement;
  +import java.sql.ResultSet;
  +import java.sql.SQLException;
  +import java.util.Collection;
  +import java.util.Iterator;
  +import java.util.Vector;
  +
  +import javax.mail.MessagingException;
  +import javax.mail.internet.ParseException;
  +
   import org.apache.avalon.cornerstone.services.datasource.DataSourceSelector;
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.framework.component.ComponentManager;
  @@ -16,14 +28,6 @@
   import org.apache.mailet.Mail;
   import org.apache.mailet.MailAddress;
   import org.apache.mailet.MailetException;
  -
  -import javax.mail.MessagingException;
  -import javax.mail.internet.ParseException;
  -import java.sql.*;
  -import java.util.Collection;
  -import java.util.Iterator;
  -import java.util.Locale;
  -import java.util.Vector;
   
   /**
    * Implements a Virtual User Table for JAMES.  Derived from the
  
  
  
  1.35      +27 -12    jakarta-james/src/java/org/apache/james/transport/mailets/RemoteDelivery.java
  
  Index: RemoteDelivery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/RemoteDelivery.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- RemoteDelivery.java	6 Jan 2003 12:41:01 -0000	1.34
  +++ RemoteDelivery.java	6 Jan 2003 17:08:48 -0000	1.35
  @@ -10,24 +10,39 @@
   //import org.apache.avalon.framework.component.ComponentException;
   //import org.apache.avalon.framework.component.ComponentManager;
   //import org.apache.avalon.framework.configuration.DefaultConfiguration;
  +import java.io.PrintWriter;
  +import java.io.StringWriter;
  +import java.net.ConnectException;
  +import java.net.InetAddress;
  +import java.net.SocketException;
  +import java.net.UnknownHostException;
  +import java.util.Arrays;
  +import java.util.Collection;
  +import java.util.Date;
  +import java.util.Hashtable;
  +import java.util.Iterator;
  +import java.util.Locale;
  +import java.util.Properties;
  +import java.util.Vector;
  +
  +import javax.mail.Address;
  +import javax.mail.MessagingException;
  +import javax.mail.SendFailedException;
  +import javax.mail.Session;
  +import javax.mail.Transport;
  +import javax.mail.URLName;
  +import javax.mail.internet.AddressException;
  +import javax.mail.internet.InternetAddress;
  +import javax.mail.internet.MimeMessage;
  +import javax.mail.internet.ParseException;
  +
   import org.apache.james.Constants;
   import org.apache.james.core.MailImpl;
   import org.apache.james.services.MailServer;
  -import org.apache.james.services.MailStore;
   import org.apache.mailet.GenericMailet;
   import org.apache.mailet.Mail;
   import org.apache.mailet.MailAddress;
   import org.apache.mailet.SpoolRepository;
  -
  -import javax.mail.*;
  -import javax.mail.internet.AddressException;
  -import javax.mail.internet.InternetAddress;
  -import javax.mail.internet.MimeMessage;
  -import javax.mail.internet.ParseException;
  -import java.io.PrintWriter;
  -import java.io.StringWriter;
  -import java.net.*;
  -import java.util.*;
   
   /**
    * Receives a MessageContainer from JamesSpoolManager and takes care of delivery
  
  
  
  1.4       +5 -4      jakarta-james/src/java/org/apache/james/transport/matchers/NESSpamCheck.java
  
  Index: NESSpamCheck.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/matchers/NESSpamCheck.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NESSpamCheck.java	14 Sep 2002 06:22:37 -0000	1.3
  +++ NESSpamCheck.java	6 Jan 2003 17:08:48 -0000	1.4
  @@ -7,6 +7,11 @@
    */
   package org.apache.james.transport.matchers;
   
  +import java.util.Collection;
  +
  +import javax.mail.MessagingException;
  +import javax.mail.internet.MimeMessage;
  +
   import org.apache.james.util.RFC2822Headers;
   import org.apache.mailet.GenericMatcher;
   import org.apache.mailet.Mail;
  @@ -14,10 +19,6 @@
   import org.apache.oro.text.regex.Pattern;
   import org.apache.oro.text.regex.Perl5Compiler;
   import org.apache.oro.text.regex.Perl5Matcher;
  -
  -import javax.mail.MessagingException;
  -import javax.mail.internet.MimeMessage;
  -import java.util.Collection;
   
   /**
    * This is based on a sample filter.cfg for a Netscape Mail Server to stop
  
  
  
  1.16      +13 -5     jakarta-james/src/java/org/apache/james/userrepository/AbstractJdbcUsersRepository.java
  
  Index: AbstractJdbcUsersRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/userrepository/AbstractJdbcUsersRepository.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- AbstractJdbcUsersRepository.java	6 Jan 2003 15:53:01 -0000	1.15
  +++ AbstractJdbcUsersRepository.java	6 Jan 2003 17:08:48 -0000	1.16
  @@ -7,11 +7,23 @@
    */
   package org.apache.james.userrepository;
   
  +import java.io.File;
  +import java.sql.Connection;
  +import java.sql.DatabaseMetaData;
  +import java.sql.PreparedStatement;
  +import java.sql.ResultSet;
  +import java.sql.SQLException;
  +import java.util.HashMap;
  +import java.util.Iterator;
  +import java.util.LinkedList;
  +import java.util.List;
  +import java.util.Locale;
  +import java.util.Map;
  +
   import org.apache.avalon.cornerstone.services.datasource.DataSourceSelector;
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.framework.CascadingRuntimeException;
   import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  @@ -25,10 +37,6 @@
   import org.apache.james.util.JDBCUtil;
   import org.apache.james.util.SqlResources;
   import org.apache.mailet.User;
  -
  -import java.io.File;
  -import java.sql.*;
  -import java.util.*;
   
   /**
    * An abstract base class for creating UserRepository implementations
  
  
  
  1.11      +19 -7     jakarta-james/src/java/org/apache/james/userrepository/UsersLDAPRepository.java
  
  Index: UsersLDAPRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/userrepository/UsersLDAPRepository.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UsersLDAPRepository.java	6 Jan 2003 15:53:02 -0000	1.10
  +++ UsersLDAPRepository.java	6 Jan 2003 17:08:49 -0000	1.11
  @@ -7,6 +7,25 @@
    */
   package org.apache.james.userrepository;
   
  +import java.util.ArrayList;
  +import java.util.Collection;
  +import java.util.Hashtable;
  +import java.util.Iterator;
  +import java.util.List;
  +
  +import javax.naming.AuthenticationException;
  +import javax.naming.NamingEnumeration;
  +import javax.naming.NamingException;
  +import javax.naming.directory.Attribute;
  +import javax.naming.directory.Attributes;
  +import javax.naming.directory.BasicAttribute;
  +import javax.naming.directory.BasicAttributes;
  +import javax.naming.directory.DirContext;
  +import javax.naming.directory.InitialDirContext;
  +import javax.naming.directory.ModificationItem;
  +import javax.naming.directory.SearchControls;
  +import javax.naming.directory.SearchResult;
  +
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.configuration.Configurable;
  @@ -16,17 +35,10 @@
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.james.Constants;
   import org.apache.mailet.User;
   import org.apache.mailet.UsersRepository;
  -
  -import javax.naming.AuthenticationException;
  -import javax.naming.NamingEnumeration;
  -import javax.naming.NamingException;
  -import javax.naming.directory.*;
  -import java.util.*;
   
   /**
    * Implementation of a Repository to store users.
  
  
  
  1.3       +5 -1      jakarta-james/src/java/org/apache/james/util/JDBCUtil.java
  
  Index: JDBCUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/util/JDBCUtil.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JDBCUtil.java	16 Aug 2002 21:06:32 -0000	1.2
  +++ JDBCUtil.java	6 Jan 2003 17:08:49 -0000	1.3
  @@ -7,7 +7,11 @@
    */
   package org.apache.james.util;
   
  -import java.sql.*;
  +import java.sql.Connection;
  +import java.sql.DatabaseMetaData;
  +import java.sql.ResultSet;
  +import java.sql.SQLException;
  +import java.sql.Statement;
   import java.util.Locale;
   
   /**
  
  
  
  1.6       +11 -6     jakarta-james/src/java/org/apache/james/util/SqlResources.java
  
  Index: SqlResources.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/util/SqlResources.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SqlResources.java	26 Sep 2002 01:44:35 -0000	1.5
  +++ SqlResources.java	6 Jan 2003 17:08:49 -0000	1.6
  @@ -7,18 +7,23 @@
    */
   package org.apache.james.util;
   
  -import org.apache.oro.text.perl.MalformedPerl5PatternException;
  -import org.apache.oro.text.perl.Perl5Util;
  -import org.w3c.dom.*;
  -
  -import javax.xml.parsers.DocumentBuilder;
  -import javax.xml.parsers.DocumentBuilderFactory;
   import java.io.File;
   import java.sql.Connection;
   import java.sql.SQLException;
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
  +
  +import javax.xml.parsers.DocumentBuilder;
  +import javax.xml.parsers.DocumentBuilderFactory;
  +
  +import org.apache.oro.text.perl.MalformedPerl5PatternException;
  +import org.apache.oro.text.perl.Perl5Util;
  +import org.w3c.dom.Attr;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Element;
  +import org.w3c.dom.NamedNodeMap;
  +import org.w3c.dom.NodeList;
   
   
   /**
  
  
  
  1.7       +7 -1      jakarta-james/src/java/org/apache/james/util/mordred/PoolConnEntry.java
  
  Index: PoolConnEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/util/mordred/PoolConnEntry.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PoolConnEntry.java	16 Aug 2002 21:06:32 -0000	1.6
  +++ PoolConnEntry.java	6 Jan 2003 17:08:50 -0000	1.7
  @@ -9,7 +9,13 @@
   
   import java.io.PrintWriter;
   import java.io.StringWriter;
  -import java.sql.*;
  +import java.sql.CallableStatement;
  +import java.sql.Connection;
  +import java.sql.DatabaseMetaData;
  +import java.sql.PreparedStatement;
  +import java.sql.SQLException;
  +import java.sql.SQLWarning;
  +import java.sql.Statement;
   import java.util.Map;
   
   /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message