Merge

Thu, 03 Oct 2013 19:11:30 +0100

author
chegar
date
Thu, 03 Oct 2013 19:11:30 +0100
changeset 525
396854c032bb
parent 524
cc52d582df09
parent 507
85c1c94e7235
child 526
47513cdce4ed

Merge

     1.1 --- a/.hgtags	Sat Sep 14 19:40:07 2013 +0100
     1.2 +++ b/.hgtags	Thu Oct 03 19:11:30 2013 +0100
     1.3 @@ -229,3 +229,6 @@
     1.4  4e38de7c767e34104fa147b5b346d9fe6b731279 jdk8-b105
     1.5  2e3a056c84a71eba78945c18b05397858ffd7ad0 jdk8-b106
     1.6  23fc34133152692b725db4bd617b4c8dfd6ccb05 jdk8-b107
     1.7 +a4bb3b4500164748a9c33b2283cfda76d89f25ab jdk8-b108
     1.8 +428428cf5e06163322144cfb5367e1faa86acf20 jdk8-b109
     1.9 +3d2b7ce93c5c2e3db748f29c3d29620a8b3b748a jdk8-b110
     2.1 --- a/make/jprt.properties	Sat Sep 14 19:40:07 2013 +0100
     2.2 +++ b/make/jprt.properties	Thu Oct 03 19:11:30 2013 +0100
     2.3 @@ -1,5 +1,5 @@
     2.4  #
     2.5 -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
     2.6 +# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
     2.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8  #
     2.9  # This code is free software; you can redistribute it and/or modify it
    2.10 @@ -39,8 +39,8 @@
    2.11      solaris_x64_5.10-{product|fastdebug},                       \
    2.12      linux_i586_2.6-{product|fastdebug},                         \
    2.13      linux_x64_2.6-{product|fastdebug},                          \
    2.14 -    windows_i586_5.1-{product|fastdebug},                       \
    2.15 -    windows_x64_5.2-{product|fastdebug}
    2.16 +    windows_i586_6.1-{product|fastdebug},                       \
    2.17 +    windows_x64_6.1-{product|fastdebug}
    2.18  
    2.19  # Directories to be excluded from the source bundles
    2.20  jprt.bundle.exclude.src.dirs=build dist webrev
     3.1 --- a/src/share/classes/com/sun/corba/se/impl/transport/DefaultSocketFactoryImpl.java	Sat Sep 14 19:40:07 2013 +0100
     3.2 +++ b/src/share/classes/com/sun/corba/se/impl/transport/DefaultSocketFactoryImpl.java	Thu Oct 03 19:11:30 2013 +0100
     3.3 @@ -32,6 +32,7 @@
     3.4  import java.net.ServerSocket;
     3.5  import java.nio.channels.SocketChannel;
     3.6  import java.nio.channels.ServerSocketChannel;
     3.7 +import java.security.PrivilegedAction;
     3.8  
     3.9  import com.sun.corba.se.pept.transport.Acceptor;
    3.10  
    3.11 @@ -44,6 +45,22 @@
    3.12      implements ORBSocketFactory
    3.13  {
    3.14      private ORB orb;
    3.15 +    private static final boolean keepAlive;
    3.16 +
    3.17 +    static {
    3.18 +        keepAlive = java.security.AccessController.doPrivileged(
    3.19 +            new PrivilegedAction<Boolean>() {
    3.20 +                @Override
    3.21 +                public Boolean run () {
    3.22 +                    String value =
    3.23 +                        System.getProperty("com.sun.CORBA.transport.enableTcpKeepAlive");
    3.24 +                    if (value != null)
    3.25 +                        return new Boolean(!"false".equalsIgnoreCase(value));
    3.26 +
    3.27 +                    return Boolean.FALSE;
    3.28 +                }
    3.29 +            });
    3.30 +    }
    3.31  
    3.32      public void setORB(ORB orb)
    3.33      {
    3.34 @@ -85,6 +102,9 @@
    3.35          // Disable Nagle's algorithm (i.e., always send immediately).
    3.36          socket.setTcpNoDelay(true);
    3.37  
    3.38 +        if (keepAlive)
    3.39 +            socket.setKeepAlive(true);
    3.40 +
    3.41          return socket;
    3.42      }
    3.43  
    3.44 @@ -95,6 +115,8 @@
    3.45      {
    3.46          // Disable Nagle's algorithm (i.e., always send immediately).
    3.47          socket.setTcpNoDelay(true);
    3.48 +        if (keepAlive)
    3.49 +            socket.setKeepAlive(true);
    3.50      }
    3.51  }
    3.52  

mercurial