james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-james/src/org/apache/james James.java
Date Mon, 05 Mar 2001 11:48:34 GMT
donaldp     01/03/05 03:48:34

  Modified:    src/org/apache/james James.java
  Log:
  Unglobbed some imports and used un-deprecated interface to threadpools.
  
  Revision  Changes    Path
  1.24      +13 -4     jakarta-james/src/org/apache/james/James.java
  
  Index: James.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/James.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- James.java	2001/02/18 05:43:52	1.23
  +++ James.java	2001/03/05 11:48:30	1.24
  @@ -16,8 +16,8 @@
   import javax.mail.Session;
   import javax.mail.internet.*;
   import org.apache.avalon.*;
  +import org.apache.avalon.Contextualizable;
   import org.apache.avalon.AbstractLoggable;
  -import org.apache.avalon.util.lang.*;
   import org.apache.avalon.util.thread.ThreadPool;
   import org.apache.james.core.*;
   import org.apache.james.dnsserver.*;
  @@ -31,6 +31,7 @@
   import org.apache.log.Logger;
   import org.apache.mailet.*;
   import org.apache.phoenix.Block;
  +import org.apache.phoenix.BlockContext;
   
   /**
    * Core class for JAMES. Provides three primary services:
  @@ -46,7 +47,7 @@
    */
   public class James 
       extends AbstractLoggable 
  -    implements Block, Composer, Configurable, Initializable, MailServer, MailetContext
{
  +    implements Block, Contextualizable, Composer, Configurable, Initializable, MailServer,
MailetContext {
       
       public final static String VERSION = "James 1.2.2 Alpha";
   
  @@ -76,7 +77,13 @@
       private boolean provideIMAP = false;
       private IMAPSystem imapSystem;
       private Host imapHost;
  +    protected BlockContext           blockContext;
   
  +    public void contextualize( final Context context )
  +    {
  +        this.blockContext = (BlockContext)context;
  +    }
  +
       public void configure(Configuration conf) {
           this.conf = conf;
       }
  @@ -93,8 +100,10 @@
       public void init() throws Exception {
   
           getLogger().info("JAMES init...");
  -        //threadManager = (ThreadManager) comp.getComponent(Interfaces.THREAD_MANAGER);
  -        workerPool = ThreadManager.getWorkerPool("whateverNameYouFancy");
  +
  +        //TODO: This should retrieve a more specific named thread pool from BlockContext
  +        //that is set up in server.xml
  +        workerPool = blockContext.getThreadPool( "default" );
           try {
               mailstore = (MailStore) compMgr.lookup("org.apache.james.services.MailStore");
           } catch (Exception e) {
  
  
  

Mime
View raw message