Stefano Bagnara schrieb:
[EMAIL PROTECTED] wrote:
Author: norman
Date: Fri Nov 10 00:20:30 2006
New Revision: 473249
URL: http://svn.apache.org/viewvc?view=rev&rev=473249
Log:
Put the hostname and hostaddress in the mailetcontext to remove all
InetAddress usage from mailets. See JAMES-643
[...]
Modified: james/server/trunk/src/java/org/apache/james/Constants.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/Constants.java?view=diff&rev=473249&r1=473248&r2=473249
==============================================================================
--- james/server/trunk/src/java/org/apache/james/Constants.java
(original)
+++ james/server/trunk/src/java/org/apache/james/Constants.java Fri
Nov 10 00:20:30 2006
@@ -58,5 +58,15 @@
* Avalon aware Mailets.
*/
public static final String AVALON_COMPONENT_MANAGER =
"AVALON_COMP_MGR";
+ + /**
+ * Key used to store the hostaddress of the localhost
+ */
+ public static final String HOSTADDRESS = "127.0.0.1";
+ + /**
+ * Key used to store the hostname of localhost
+ */
+ public static final String HOSTNAME = "localhost";
The key you used are misleading, I would change it to:
public static final String HOSTADDRESS =
"org.apache.james.localhost_address";
public static final String HOSTNAME = "org.apache.james.localhost_name";
Otherwise people could think we hardcoded the hostname "localhost" and
the hostaddress "127.0.0.1" in the Constants, that is not the case:
they only are strings to be used as map keys.
Stefano
You are absolutly right..
I now changed it to:
public static final String HOSTADDRESS = "LOCAL_HOSTADDRESS";
public static final String HOSTNAME = "LOCAL_HOSTNAME";
bye
Norman
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]