Fri, 23 Dec 2011 16:36:23 -0800
Merge
1.1 --- a/make/jprt.properties Thu Dec 22 19:00:13 2011 -0800 1.2 +++ b/make/jprt.properties Fri Dec 23 16:36:23 2011 -0800 1.3 @@ -25,21 +25,21 @@ 1.4 1.5 # Properties for jprt 1.6 1.7 -# The release to build 1.8 +# Locked down to jdk8 1.9 jprt.tools.default.release=jdk8 1.10 1.11 # The different build flavors we want, we override here so we just get these 2 1.12 jprt.build.flavors=product,fastdebug 1.13 1.14 # Standard list of jprt build targets for this source tree 1.15 -jprt.build.targets= \ 1.16 - solaris_sparc_5.10-{product|fastdebug}, \ 1.17 - solaris_sparcv9_5.10-{product|fastdebug}, \ 1.18 - solaris_i586_5.10-{product|fastdebug}, \ 1.19 - solaris_x64_5.10-{product|fastdebug}, \ 1.20 - linux_i586_2.6-{product|fastdebug}, \ 1.21 - linux_x64_2.6-{product|fastdebug}, \ 1.22 - windows_i586_5.1-{product|fastdebug}, \ 1.23 +jprt.build.targets= \ 1.24 + solaris_sparc_5.10-{product|fastdebug}, \ 1.25 + solaris_sparcv9_5.10-{product|fastdebug}, \ 1.26 + solaris_i586_5.10-{product|fastdebug}, \ 1.27 + solaris_x64_5.10-{product|fastdebug}, \ 1.28 + linux_i586_2.6-{product|fastdebug}, \ 1.29 + linux_x64_2.6-{product|fastdebug}, \ 1.30 + windows_i586_5.1-{product|fastdebug}, \ 1.31 windows_x64_5.2-{product|fastdebug} 1.32 1.33 # Directories to be excluded from the source bundles
2.1 --- a/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java Thu Dec 22 19:00:13 2011 -0800 2.2 +++ b/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java Fri Dec 23 16:36:23 2011 -0800 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 2001, 2011, 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 @@ -113,6 +113,9 @@ 2.11 import com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl; 2.12 import com.sun.corba.se.impl.util.JDKBridge; 2.13 2.14 +import java.util.concurrent.ConcurrentMap; 2.15 +import java.util.concurrent.ConcurrentHashMap; 2.16 + 2.17 /** 2.18 * ClientDelegate is the RMI client-side subcontract or representation 2.19 * It implements RMI delegate as well as our internal ClientRequestDispatcher 2.20 @@ -122,6 +125,9 @@ 2.21 implements 2.22 ClientRequestDispatcher 2.23 { 2.24 + private ConcurrentMap<ContactInfo, Object> locks = 2.25 + new ConcurrentHashMap<ContactInfo, Object>(); 2.26 + 2.27 public OutputObject beginRequest(Object self, String opName, 2.28 boolean isOneWay, ContactInfo contactInfo) 2.29 { 2.30 @@ -148,8 +154,21 @@ 2.31 2.32 // This locking is done so that multiple connections are not created 2.33 // for the same endpoint 2.34 - //6929137 - Synchronized on contactInfo to avoid blocking across multiple endpoints 2.35 - synchronized (contactInfo) { 2.36 + // 7046238 - Synchronization on a single monitor for contactInfo parameters 2.37 + // with identical hashCode(), so we lock on same monitor for equal parameters 2.38 + // (which can refer to equal (in terms of equals()) but not the same objects) 2.39 + 2.40 + Object lock = locks.get(contactInfo); 2.41 + 2.42 + if (lock == null) { 2.43 + Object newLock = new Object(); 2.44 + lock = locks.putIfAbsent(contactInfo, newLock); 2.45 + if (lock == null) { 2.46 + lock = newLock; 2.47 + } 2.48 + } 2.49 + 2.50 + synchronized (lock) { 2.51 if (contactInfo.isConnectionBased()) { 2.52 if (contactInfo.shouldCacheConnection()) { 2.53 connection = (CorbaConnection) 2.54 @@ -254,7 +273,7 @@ 2.55 registerWaiter(messageMediator); 2.56 2.57 // Do connection reclaim now 2.58 - synchronized (contactInfo) { 2.59 + synchronized (lock) { 2.60 if (contactInfo.isConnectionBased()) { 2.61 if (contactInfo.shouldCacheConnection()) { 2.62 OutboundConnectionCache connectionCache =