Index: James.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/James.java,v
retrieving revision 1.19
diff -u -r1.19 James.java
--- James.java	27 Feb 2002 05:05:53 -0000	1.19
+++ James.java	27 Feb 2002 15:43:26 -0000
@@ -42,6 +42,8 @@
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.*;
+import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.avalon.excalibur.i18n.ResourceManager;
 
 /**
  * Core class for JAMES. Provides three primary services:
@@ -63,6 +65,8 @@
     extends AbstractLogEnabled
     implements Block, Contextualizable, Composable, Configurable,
                Initializable, MailServer, MailetContext {
+    private static final Resources REZ =
+        ResourceManager.getPackageResources( James.class );
 
     private final static String VERSION = Constants.SOFTWARE_NAME + " " + Constants.SOFTWARE_VERSION;
     private final static boolean DEEP_DEBUG = true;
@@ -72,7 +76,7 @@
     private Configuration conf;
 
     private Logger mailetLogger = null;
-    private MailStore mailstore;
+    private MailStore mailStore;
     private UsersStore usersStore;
     private SpoolRepository spool;
     private MailRepository localInbox;
@@ -113,23 +117,23 @@
 
     public void initialize() throws Exception {
 
-        getLogger().info("JAMES init...");
+        getLogger().info( REZ.getString( "james.notice.init-start" ) );
 
         // 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( MailStore.ROLE );
+            mailStore = (MailStore) compMgr.lookup( MailStore.ROLE );
         } catch (Exception e) {
-            getLogger().warn("Can't get Store: " + e);
+            getLogger().warn( REZ.getString( "james.error.mailstore.lookup" ), e );
         }
-        getLogger().debug("Using MailStore: " + mailstore.toString());
+        getLogger().debug( REZ.getString( "james.notice.mailstore.lookup", mailStore.toString() ) );
         try {
             usersStore = (UsersStore) compMgr.lookup( UsersStore.ROLE );
         } catch (Exception e) {
-            getLogger().warn("Can't get Store: " + e);
+            getLogger().warn( REZ.getString( "james.error.usersstore.lookup" ), e );
         }
-        getLogger().debug("Using UsersStore: " + usersStore.toString());
+        getLogger().debug( REZ.getString( "james.notice.usersstore.lookup", usersStore.toString() ) );
         context = new DefaultContext();
 
         String hostName = null;
@@ -139,7 +143,7 @@
             hostName = "localhost";
         }
         context.put("HostName", hostName);
-        getLogger().info("Local host is: " + hostName);
+        getLogger().info( REZ.getString( "james.notice.hostname", hostName ) );
 
         // Get the domains and hosts served by this instance
         serverNames = new Vector();
@@ -154,11 +158,11 @@
             serverNames.add( serverNameConfs[i].getValue());
         }
         if (serverNames.isEmpty()) {
-            throw new ConfigurationException( "Fatal configuration error: no servernames specified!");
+            throw new ConfigurationException( REZ.getString( "james.error.servername" ) );
         }
 
         for (Iterator i = serverNames.iterator(); i.hasNext(); ) {
-            getLogger().info("Handling mail for: " + i.next());
+            getLogger().info( REZ.getString( "james.notice.servername" ) );
         }
         context.put(Constants.SERVER_NAMES, this.serverNames);
 
@@ -177,29 +181,28 @@
         try {
             localusers = (UsersRepository) usersStore.getRepository("LocalUsers");
         } catch (Exception e) {
-            getLogger().error("Cannot open private UserRepository");
+            getLogger().error( REZ.getString( "james.error.usersrepository.open" ) );
             throw e;
         }
         //}
         compMgr.put( UsersRepository.ROLE, (Component)localusers);
-        getLogger().info("Local users repository opened");
+        getLogger().info( REZ.getString( "james.notice.usersrepository.open" ) );
 
         Configuration inboxConf = conf.getChild("inboxRepository");
         Configuration inboxRepConf = inboxConf.getChild("repository");
         try {
-            localInbox = (MailRepository) mailstore.select(inboxRepConf);
+            localInbox = (MailRepository) mailStore.select(inboxRepConf);
         } catch (Exception e) {
-            getLogger().error("Cannot open private MailRepository");
+            getLogger().error( REZ.getString( "james.error.mailrepository.open" ) );
             throw e;
         }
         inboxRootURL = inboxRepConf.getAttribute("destinationURL");
-
-        getLogger().info("Private Repository LocalInbox opened");
+        getLogger().info( REZ.getString( "james.notice.mailrepository.open" ) );
 
         // Add this to comp
         compMgr.put( MailServer.ROLE, this);
 
-        spool = mailstore.getInboundSpool();
+        spool = mailStore.getInboundSpool();
         if (DEEP_DEBUG) getLogger().debug("Got spool");
 
         // For mailet engine provide MailetContext
@@ -209,7 +212,7 @@
         attributes.put(Constants.AVALON_COMPONENT_MANAGER, compMgr);
 
         System.out.println(VERSION);
-        getLogger().info("JAMES ...init end");
+        getLogger().info( REZ.getString( "james.notice.init-end" ) );
     }
 
     public void sendMail(MimeMessage message) throws MessagingException {
@@ -284,7 +287,7 @@
             mboxConf.setAttribute("destinationURL", destination);
             mboxConf.setAttribute("type", "MAIL");
             try {
-                userInbox = (MailRepository) mailstore.select(mboxConf);
+                userInbox = (MailRepository) mailStore.select(mboxConf);
                 mailboxes.put(userName, userInbox);
             } catch (Exception e) {
                 e.printStackTrace();
Index: BaseConnectionHandler.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/BaseConnectionHandler.java,v
retrieving revision 1.7
diff -u -r1.7 BaseConnectionHandler.java
--- BaseConnectionHandler.java	27 Feb 2002 05:05:53 -0000	1.7
+++ BaseConnectionHandler.java	27 Feb 2002 15:43:26 -0000
@@ -7,13 +7,14 @@
  */
 package org.apache.james;
 
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 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 java.net.InetAddress;
-import java.net.UnknownHostException;
+import org.apache.avalon.excalibur.i18n.ResourceManager;
+import org.apache.avalon.excalibur.i18n.Resources;
 
 /**
  * Different connection handlers extend this class
@@ -22,27 +23,41 @@
  *
  * @author Harmeet Bedi <harmeet@kodemuse.com>
  */
-public class BaseConnectionHandler extends AbstractLogEnabled implements Configurable {
+public class BaseConnectionHandler
+    extends AbstractLogEnabled
+    implements Configurable
+{
+    private static final Resources REZ =
+        ResourceManager.getPackageResources( BaseConnectionHandler.class );
+
     protected int timeout;
     protected String helloName;
 
     public void configure( final Configuration configuration )
-        throws ConfigurationException {
+        throws ConfigurationException
+    {
 
         timeout = configuration.getChild( "connectiontimeout" ).getValueAsInteger( 1800000 );
         String hostName = null;
-        try {
+        try
+        {
             hostName = InetAddress.getLocalHost().getHostName();
-        } catch  (UnknownHostException ue) {
+        }
+        catch ( UnknownHostException ue )
+        {
             hostName = "localhost";
         }
 
-        Configuration helloConf = configuration.getChild("helloName");
-        boolean autodetect = helloConf.getAttributeAsBoolean("autodetect", true);
-        if (autodetect)
+        Configuration helloConf = configuration.getChild( "helloName" );
+        boolean autodetect = helloConf.getAttributeAsBoolean( "autodetect", true );
+        if ( autodetect )
+        {
             helloName = hostName;
+        }
         else
-            helloName = helloConf.getValue("localhost");
-        getLogger().info("Hello Name is: " + helloName);
+        {
+            helloName = helloConf.getValue( "localhost" );
+        }
+        getLogger().info( REZ.getString( "connection.notice.helloname", helloName ) );
     }
 }
