8029073: (corba) New connection reclaimed when number of connection is greater than highwatermark

Fri, 04 Apr 2014 14:58:04 +0400

author
aefimov
date
Fri, 04 Apr 2014 14:58:04 +0400
changeset 645
693525eeea85
parent 602
4e4a75376185
child 646
ff602d794259

8029073: (corba) New connection reclaimed when number of connection is greater than highwatermark
Reviewed-by: coffeys

src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java	Wed Mar 26 12:00:38 2014 -0700
     1.2 +++ b/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java	Fri Apr 04 14:58:04 2014 +0400
     1.3 @@ -253,6 +253,13 @@
     1.4              // registered with the selector.  Otherwise if the bytes
     1.5              // are read on the connection it will attempt a time stamp
     1.6              // but the cache will be null, resulting in NPE.
     1.7 +
     1.8 +            // A connection needs to be timestamped before putting to the cache.
     1.9 +            // Otherwise the newly created connection (with 0 timestamp) could be
    1.10 +            // incorrectly reclaimed by concurrent reclaim() call OR if there
    1.11 +            // will be no events on this connection then it could be reclaimed
    1.12 +            // by upcoming reclaim() call.
    1.13 +            getConnectionCache().stampTime(connection);
    1.14              getConnectionCache().put(this, connection);
    1.15  
    1.16              if (connection.shouldRegisterServerReadEvent()) {

mercurial