geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r125566 - /geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java /geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java
Date Tue, 18 Jan 2005 23:25:50 GMT
Author: chirino
Date: Tue Jan 18 15:25:48 2005
New Revision: 125566

URL: http://svn.apache.org/viewcvs?view=rev&rev=125566
Log:
Enabled TcpNoDelay... Should help with latencies noticed on OS X

Modified:
   geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
   geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java?view=diff&rev=125566&p1=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java&r1=125565&p2=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java&r2=125566
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
Tue Jan 18 15:25:48 2005
@@ -31,9 +31,11 @@
 import org.activeio.SynchChannel;
 import org.activeio.SynchChannelServer;
 import org.activeio.adapter.AsynchChannelToServerRequestChannel;
+import org.activeio.adapter.AsynchToSynchChannelAdapter;
 import org.activeio.adapter.SynchToAsynchChannelAdapter;
 import org.activeio.adapter.SynchToAsynchChannelServerAdapter;
 import org.activeio.filter.PacketAggregatingAsynchChannel;
+import org.activeio.net.SocketMetadata;
 import org.activeio.net.SocketSynchChannelFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -78,7 +80,11 @@
             public void onAccept(Channel channel) {
                 RequestChannel requestChannel=null;
                 try {
-                    requestChannel = createRequestChannel((SynchChannel) channel);     
+                    SynchChannel synchChannel = AsynchToSynchChannelAdapter.adapt(channel);
+                    SocketMetadata socket = (SocketMetadata) synchChannel.narrow(SocketMetadata.class);
+                    socket.setTcpNoDelay(true);
+                    
+                    requestChannel = createRequestChannel(synchChannel);     
                     
                     RequestChannelInterceptorInvoker invoker = new RequestChannelInterceptorInvoker(loginServiceInterceptor,
loginService.getClass().getClassLoader() ); 
                     requestChannel.setRequestListener(invoker);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java?view=diff&rev=125566&p1=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java&r1=125565&p2=geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java&r2=125566
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/RequestChannelInterceptor.java
Tue Jan 18 15:25:48 2005
@@ -30,6 +30,7 @@
 import org.activeio.adapter.AsynchChannelToClientRequestChannel;
 import org.activeio.adapter.PacketInputStream;
 import org.activeio.filter.PacketAggregatingSynchChannel;
+import org.activeio.net.SocketMetadata;
 import org.activeio.net.SocketSynchChannelFactory;
 import org.activeio.packet.ByteArrayPacket;
 import org.apache.geronimo.core.service.Interceptor;
@@ -88,6 +89,8 @@
     private static RequestChannel createRequestChannel(URI target) throws IOException, URISyntaxException
{
         SocketSynchChannelFactory factory = new SocketSynchChannelFactory();
         SynchChannel channel = factory.openSynchChannel(target);
+        SocketMetadata socket = (SocketMetadata) channel.narrow(SocketMetadata.class);
+        socket.setTcpNoDelay(true);
         return new AsynchChannelToClientRequestChannel(
 	               new PacketAggregatingSynchChannel(
                        channel));        

Mime
View raw message