[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/servlet ...
Ron Sigal
ron_sigal at yahoo.com
Tue Nov 20 22:50:35 EST 2007
User: rsigal
Date: 07/11/20 22:50:35
Modified: src/main/org/jboss/remoting/transport/servlet Tag:
remoting_2_x ServletServerInvoker.java
Log:
JBREM-758: Puts client address in InvocationRequest requestPayload.
Revision Changes Path
No revision
No revision
1.8.4.7 +27 -0 JBossRemoting/src/main/org/jboss/remoting/transport/servlet/ServletServerInvoker.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ServletServerInvoker.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/servlet/ServletServerInvoker.java,v
retrieving revision 1.8.4.6
retrieving revision 1.8.4.7
diff -u -b -r1.8.4.6 -r1.8.4.7
--- ServletServerInvoker.java 1 Nov 2007 07:19:37 -0000 1.8.4.6
+++ ServletServerInvoker.java 21 Nov 2007 03:50:35 -0000 1.8.4.7
@@ -25,6 +25,7 @@
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.InvocationResponse;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.Remoting;
import org.jboss.remoting.Version;
import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.remoting.marshal.Marshaller;
@@ -46,6 +47,7 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.net.InetAddress;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
@@ -127,6 +129,18 @@
}
}
+ String remoteAddressString = request.getRemoteAddr();
+ InetAddress remoteAddress = InetAddress.getByName(remoteAddressString);
+ Map requestPayload = invocationRequest.getRequestPayload();
+
+ if (requestPayload == null)
+ {
+ requestPayload = new HashMap();
+ invocationRequest.setRequestPayload(requestPayload);
+ }
+
+ requestPayload.put(Remoting.CLIENT_ADDRESS, remoteAddress);
+
try
{
// call transport on the subclass, get the result to handback
@@ -239,6 +253,19 @@
}
}
+ String remoteAddressString = request.getRemoteAddr();
+ InetAddress remoteAddress = InetAddress.getByName(remoteAddressString);
+ Map requestPayload = invocationRequest.getRequestPayload();
+
+ if (requestPayload == null)
+ {
+ requestPayload = new HashMap();
+ invocationRequest.setRequestPayload(requestPayload);
+ }
+
+ requestPayload.put(Remoting.CLIENT_ADDRESS, remoteAddress);
+
+
try
{
// call transport on the subclass, get the result to handback
More information about the jboss-cvs-commits
mailing list