tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r896831 - in /openejb/trunk/openejb3/server: openejb-http/src/main/java/org/apache/openejb/server/httpd/ openejb-server/src/main/java/org/apache/openejb/server/
Date Thu, 07 Jan 2010 10:14:12 GMT
Author: dblevins
Date: Thu Jan  7 10:13:11 2010
New Revision: 896831

URL: http://svn.apache.org/viewvc?rev=896831&view=rev
Log:
OPENEJB-1129: Reverse lookup for logging may cause poor client/server performance

Modified:
    openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/OpenEJBHttpServer.java
    openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceLogger.java
    openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceManager.java

Modified: openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/OpenEJBHttpServer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/OpenEJBHttpServer.java?rev=896831&r1=896830&r2=896831&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/OpenEJBHttpServer.java
(original)
+++ openejb/trunk/openejb3/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/OpenEJBHttpServer.java
Thu Jan  7 10:13:11 2010
@@ -74,7 +74,7 @@
 
         try {
             //TODO: if ssl change to https
-            URI socketURI = new URI("http://" + socket.getLocalAddress().getHostName() +
":" + socket.getLocalPort());
+            URI socketURI = new URI("http://" + socket.getLocalAddress().getHostAddress()
+ ":" + socket.getLocalPort());
             processRequest(socketURI, in, out);
         } catch (Throwable e) {
             log.error("Unexpected error", e);

Modified: openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceLogger.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceLogger.java?rev=896831&r1=896830&r2=896831&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceLogger.java
(original)
+++ openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceLogger.java
Thu Jan  7 10:13:11 2010
@@ -65,7 +65,7 @@
         InetAddress client = socket.getInetAddress();
 
         try {
-            org.apache.log4j.MDC.put("HOST", client.getHostName());
+            org.apache.log4j.MDC.put("HOST", client.getHostAddress());
             org.apache.log4j.MDC.put("SERVER", getName());
         } catch (Throwable e) {
         }
@@ -76,7 +76,7 @@
             next.service(socket);
 //            logSuccess();
         } catch (Exception e) {
-            logger.error("[failure] " + socket.getPort() + " - " + client.getHostName() +
": " + e.getMessage());
+            logger.error("[failure] " + socket.getPort() + " - " + client.getHostAddress()
+ ": " + e.getMessage());
 
             e.printStackTrace();
         }

Modified: openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceManager.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceManager.java?rev=896831&r1=896830&r2=896831&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceManager.java
(original)
+++ openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/ServiceManager.java
Thu Jan  7 10:13:11 2010
@@ -136,7 +136,7 @@
         try {
             org.apache.log4j.MDC.put("SERVER", "main");
             InetAddress localhost = InetAddress.getLocalHost();
-            org.apache.log4j.MDC.put("HOST", localhost.getHostName());
+            org.apache.log4j.MDC.put("HOST", localhost.getHostAddress());
         } catch (Throwable e) {
         }
 



Mime
View raw message