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 15:42:17 GMT
donaldp     01/03/05 07:42:17

  Modified:    src/org/apache/james James.java
  Log:
  Removed some dead code and reordered dnsserver/smtpserver creation. This way smtp server
can do it's work in compose rather than in init()
  
  Revision  Changes    Path
  1.26      +10 -19    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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- James.java	2001/03/05 15:22:48	1.25
  +++ James.java	2001/03/05 15:42:15	1.26
  @@ -306,27 +306,26 @@
           SMTPServer smtpServer = null;
           DNSServer dnsServer = null;
           if (provideSMTP) {
  +            dnsServer = new DNSServer();
  +            try {
  +                setupLogger( dnsServer, "DnsServer" );
  +                dnsServer.configure( conf.getChild("dnsServer") );
  +            } catch (Exception e) {
  +                getLogger().error( "Exception in DNSServer init: " + e.getMessage(), e
);
  +                throw e;
  +            }
  +            compMgr.put("DNS_SERVER", dnsServer);
  +
               smtpServer = new SMTPServer();
               try {
                   setupLogger( smtpServer, "SMTPServer" );
                   smtpServer.contextualize( context );
                   smtpServer.compose( compMgr );
                   smtpServer.configure( conf.getChild("smtpServer") );
  -                smtpServer.init();
               } catch (Exception e) {
                   getLogger().error( "Exception in SMTPServer init: " + e.getMessage(), e
);
                   throw e;
               }
  -
  -            dnsServer = new DNSServer();
  -            try {
  -                setupLogger( dnsServer, "DnsServer" );
  -                dnsServer.configure( conf.getChild("dnsServer") );
  -            } catch (Exception e) {
  -                getLogger().error( "Exception in DNSServer init: " + e.getMessage(), e
);
  -                throw e;
  -            }
  -            compMgr.put("DNS_SERVER", dnsServer);
           }
   
           RemoteManager remoteAdmin = new RemoteManager();
  @@ -471,24 +470,16 @@
           }
       }
   
  -
       public String getId() {
           return "Mail" + System.currentTimeMillis() + "-" + count++;
       }
   
  -
       public static void main(String[] args) {
           System.out.println("ERROR!");
           System.out.println("Cannot execute James as a stand alone application.");
           System.out.println("To run James, you need to have the Avalon framework installed.");
           System.out.println("Please refer to the Readme file to know how to run James.");
       }
  -
  -
  -    public void destroy() {
  -        //Does nothing... is this even called?
  -    }
  -
   
       //Methods for MailetContext
   
  
  
  

Mime
View raw message