changeset 465:1e68b59caf29

Merge from jdk7u4 repository
author Greg Lewis <glewis@eyesbeyond.com>
date Tue, 15 May 2012 20:11:44 -0700
parents 30857d2e86f4 6546ee04b833
children d2cd11cf366d
files .hgtags make/common/Defs-bsd.gmk make/common/Defs.gmk make/common/shared/Defs-bsd.gmk make/common/shared/Defs-utils.gmk make/common/shared/Platform.gmk
diffstat 14 files changed, 134 insertions(+), 79 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sun Mar 11 14:03:53 2012 -0700
+++ b/.hgtags	Tue May 15 20:11:44 2012 -0700
@@ -142,3 +142,31 @@
 56b02f8ef70391a67c9fa71157a8faafbdff4b74 jdk7u2-b12
 456ff1f14b14ef8cfe47cef95c8094f8443fa092 jdk7u2-b13
 62b846b0c3259cae732e75df50a1b180a2541178 jdk7u2-b21
+1b648adeeefa9b1fb022459e8e4f590b736c0fdd jdk7u3-b02
+730fa05af5a9d10a3a7a1626d248b96d09f8069f jdk7u3-b03
+7f7a9b1addb4925f4f6e17f6eb5cce986c3b626d jdk7u3-b04
+1ba1205119dc3df49bd85360a579fdb895a2fb46 jdk7u4-b200
+de83741c8ba0c01c8ac515daaad3318dd96b57bf jdk7u4-b04
+6dd348fb709145bb005acf8533fd6b5444daaba2 jdk7u4-b02
+1a7656c7a8b9d0572ac75c2c325429a7dd5e1a97 jdk7u4-b05
+185304fa54224229db578f81f4021fc4ec0f6c13 jdk7u4-b06
+48ac2f190ad1e12eb5092e6f2b1bb1e7c10b88c2 jdk7u4-b225
+352a72e872ea016347f304413ac2ac27c20b8931 jdk7u4-b07
+b86e44b7ad7b1a45dde93a376d99c934de359f1b jdk7u4-b08
+0e8770ade63caf7464a6281cb4697d7ed1bd68df jdk7u4-b227
+f83e6ff13e4be5aedd7edc0d11228ea29200fbb3 jdk7u4-b09
+23777178e7eb61859be3f7240561aa1034ff9221 jdk7u4-b10
+bdc37f3c09b6008667aff77432bb6d31cbae945e jdk7u4-b11
+fddc26b35a31884d64315cf7c296570245e9c481 jdk7u4-b12
+f7119745898016a98cddab3e69efb41c5a5aaf78 jdk7u4-b13
+6a262c36caebb43972cbae5032cff632ce31d2cc jdk7u4-b14
+d9bf21b76f093abfe451880d5db29e4932b1e72e jdk7u4-b15
+bfca64f13d582de179d69b32cf68ed06e6271ad0 jdk7u4-b16
+e2a9fe67e0595ea101a2c0b07cd98ab401b3c25e jdk7u4-b17
+c2eb741b947d9c31137934b75df12741bbc2c7fc jdk7u4-b18
+8bdf527067aca1acf92c7083a9c249e0731ff955 jdk7u4-b19
+81a59f2d7ea4e7a880041eaa4fa4e9d2518ed35b jdk7u4-b20
+91cf6d5b184c696382fd50ad76ca1d2bfd962e91 jdk7u4-b30
+b8560e92b68c2409fa46cd784c87e7cb5a043e59 jdk7u4-b21
+1b97d80df5c476ed722c845246b1fd0f32fa20dc jdk7u4-b22
+add54c4e4101557c24b64c4b40509096964d8821 jdk7u4-b31
--- a/make/common/Defs.gmk	Sun Mar 11 14:03:53 2012 -0700
+++ b/make/common/Defs.gmk	Tue May 15 20:11:44 2012 -0700
@@ -58,7 +58,7 @@
     X11_PATH = $(ALT_X11_PATH)
   else
     X11_PATH = /usr/X11R6
-  endif 
+  endif
 
   ifdef ALT_PACKAGE_PATH
     PACKAGE_PATH = $(ALT_PACKAGE_PATH)
@@ -123,10 +123,10 @@
 
 # An attempt is made to generate unique enough directories for the
 # generated files to not have name collisisons. Most build units
-# defines PRODUCT (except Release.gmk), but then they may or may 
-# not define PACKAGE, THREADIR (only HPI uses this), PROGRAM, and 
-# LIBRARY. This code chunk attempts to generate a unique 
-# OBJDIR/CLASSHDRDIR for each build unit based on which of those 
+# defines PRODUCT (except Release.gmk), but then they may or may
+# not define PACKAGE, THREADIR (only HPI uses this), PROGRAM, and
+# LIBRARY. This code chunk attempts to generate a unique
+# OBJDIR/CLASSHDRDIR for each build unit based on which of those
 # values are set within each build unit.
 
 UNIQUE_LOCATION_STRING = tmp
@@ -155,7 +155,7 @@
   UNIQUE_LOCATION_STRING += /$(THREADDIR)
 endif
 
-# the use of += above makes a space separated list which we need to 
+# the use of += above makes a space separated list which we need to
 # remove for filespecs.
 #
 NULLSTRING :=
@@ -198,9 +198,9 @@
 # Classpath seen by javac (different from the one seen by the VM
 # running javac), and useful variables.
 #
-SOURCEPATH	= $(VPATH.java)
-PKG		= $(shell $(EXPR) $(PACKAGE) : '\([a-z]*\)')
-PKGDIR		= $(subst .,/,$(PACKAGE))
+SOURCEPATH      = $(VPATH.java)
+PKG             = $(shell $(EXPR) $(PACKAGE) : '\([a-z]*\)')
+PKGDIR          = $(subst .,/,$(PACKAGE))
 
 #
 # The java/javac/jdk variables (JAVAC_CMD, JAVA_CMD, etc.)
--- a/make/common/shared/Defs-bsd.gmk	Sun Mar 11 14:03:53 2012 -0700
+++ b/make/common/shared/Defs-bsd.gmk	Tue May 15 20:11:44 2012 -0700
@@ -112,7 +112,7 @@
 # Import JDK images allow for partial builds, components not built are
 #    imported (or copied from) these import areas when needed.
 
-# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for 
+# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
 #   multiple platforms, e.g. windows-i586, solaris-sparc, bsd-586, etc.
 ifdef ALT_BUILD_JDK_IMPORT_PATH
   BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
--- a/make/common/shared/Defs-utils.gmk	Sun Mar 11 14:03:53 2012 -0700
+++ b/make/common/shared/Defs-utils.gmk	Tue May 15 20:11:44 2012 -0700
@@ -31,7 +31,7 @@
 # These input UTILS_* variables can be defined at anytime, ideally once.
 #         Unix Commands: Normally /bin/, /usr/bin/. or C:/mksnt/mksnt/
 #            UTILS_COMMAND_PATH
-#         /usr/bin/ 
+#         /usr/bin/
 #            UTILS_USR_BIN_PATH
 #         /usr/ccs/bin/ (sccs, m4, lex, yacc, as, ar, strip, mcs)
 #            UTILS_CCS_BIN_PATH
@@ -173,15 +173,15 @@
   # Also, some distribution (Ubuntu, Debian, others?) place the rpm command
   # itself in /usr/bin rather than it's traditional home in /bin.
   RPM=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpm) \
-		  $(wildcard $(UTILS_USR_BIN_PATH)rpm))
+                  $(wildcard $(UTILS_USR_BIN_PATH)rpm))
   RPMBUILD=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpmbuild) \
-		       $(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
-		       $(wildcard $(UTILS_COMMAND_PATH)rpm) \
-		       $(wildcard $(UTILS_USR_BIN_PATH)rpm))
+                       $(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
+                       $(wildcard $(UTILS_COMMAND_PATH)rpm) \
+                       $(wildcard $(UTILS_USR_BIN_PATH)rpm))
   # Most Linux distros have "sort" in /bin.  Ubuntu, Debian and perhaps
   # others have it in /usr/bin.
   SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
-		   $(wildcard $(UTILS_USR_BIN_PATH)sort))
+                   $(wildcard $(UTILS_USR_BIN_PATH)sort))
   NAWK           = $(USRBIN_PATH)gawk
   # Intrinsic unix command, with backslash-escaped character interpretation
   ECHO           = /bin/echo -e
--- a/make/common/shared/Platform.gmk	Sun Mar 11 14:03:53 2012 -0700
+++ b/make/common/shared/Platform.gmk	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -62,8 +62,8 @@
 #     CLASSPATH_SEPARATOR         separator in classpath, ; or :
 #     BUNDLE_FILE_SUFFIX          suffix for bundles: .tar or .tar.gz
 #     ISA_DIR                     solaris only: /sparcv9 or /amd64
-#     REQUIRED_WINDOWS_NAME       windows only: basic name of windows 
-#     REQUIRED_WINDOWS_VERSION    windows only: specific version of windows 
+#     REQUIRED_WINDOWS_NAME       windows only: basic name of windows
+#     REQUIRED_WINDOWS_VERSION    windows only: specific version of windows
 #     USING_CYGWIN                windows only: true or false
 #     WINDOWS_NT_VERSION_STRING   windows only: long version name
 #     REQUIRED_OS_VERSION         required OS version, e.g. 5.10, 2.4
@@ -135,7 +135,7 @@
   BUNDLE_FILE_SUFFIX=.tar
   # Required Solaris version
   REQUIRED_OS_VERSION = 5.10
-  # Minimum disk space needed as determined by running 'du -sk' on 
+  # Minimum disk space needed as determined by running 'du -sk' on
   #    a fully built workspace.
   ifeq ($(ARCH_FAMILY), sparc)
     REQUIRED_FREE_SPACE=1300000
@@ -207,7 +207,7 @@
 
   # Suffix for file bundles used in previous release
   BUNDLE_FILE_SUFFIX=.tar.gz
-  # Minimum disk space needed as determined by running 'du -sk' on 
+  # Minimum disk space needed as determined by running 'du -sk' on
   #    a fully built workspace.
   REQUIRED_FREE_SPACE=1460000
   LINUX_VERSION_INFO = /etc/redhat-release
@@ -275,7 +275,7 @@
                     echo sparc \
                     ;; \
                 x86_64) \
-                    echo amd64 \
+                    echo x86_64 \
                     ;; \
                 "Power Macintosh") \
                     echo ppc \
@@ -287,23 +287,21 @@
   ARCH        := $(shell $(archExpr) )
   ARCH_FAMILY := $(ARCH)
 
-  # Darwin builds may be 32-bit or 64-bit data model.
-  ifeq ($(SYSTEM_UNAME), Darwin)
-    ifeq ($(ARCH), i586)
-      ifeq ($(ARCH_DATA_MODEL), 64)
-        ARCH=amd64
-      endif
-    endif
-  endif
+  # Darwin builds are currently universal but only include 64-bit
+  # 
+  # ifeq ($(SYSTEM_UNAME), Darwin)
+  #  ifneq ($(ARCH), ppc)
+  #    ARCH=universal
+  #  endif
+  # endif
 
   # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
-  ifneq (,$(findstring $(ARCH), i586 sparc ppc))
+  ifneq (,$(findstring $(ARCH), i586 sparc ppc universal))
     ARCH_DATA_MODEL=32
   else
     ARCH_DATA_MODEL=64
   endif
 
-  # Need to maintain the jre/lib/i386 location for 32-bit Intel
   ifeq ($(ARCH), i586)
     LIBARCH = i386
   else
@@ -315,7 +313,7 @@
 
   # Suffix for file bundles used in previous release
   BUNDLE_FILE_SUFFIX=.tar.gz
-  # Minimum disk space needed as determined by running 'du -sk' on 
+  # Minimum disk space needed as determined by running 'du -sk' on
   #    a fully built workspace.
   REQUIRED_FREE_SPACE=1500000
   # How much RAM does this machine have:
@@ -422,7 +420,7 @@
   endif
   # Suffix for file bundles used in previous release
   BUNDLE_FILE_SUFFIX=.tar
-  # Minimum disk space needed as determined by running 'du -sk' on 
+  # Minimum disk space needed as determined by running 'du -sk' on
   #    a fully built workspace.
   REQUIRED_FREE_SPACE=500000
   # How much RAM does this machine have:
@@ -430,8 +428,8 @@
     MB_OF_MEMORY := $(shell \
       if [ -f "C:/cygwin/bin/free.exe" ] ; then \
         ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
-	  grep Mem: | \
-	  sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
+          grep Mem: | \
+          sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
       else \
         echo "512"; \
       fi)
@@ -487,7 +485,7 @@
   # Where is unwanted output to be delivered?
   DEV_NULL = /dev/null
   export DEV_NULL
-  # Character used between entries in classpath 
+  # Character used between entries in classpath
   CLASSPATH_SEPARATOR = :
   # User name determination (set _USER)
   ifndef USER
--- a/make/jprt.properties	Sun Mar 11 14:03:53 2012 -0700
+++ b/make/jprt.properties	Tue May 15 20:11:44 2012 -0700
@@ -25,12 +25,24 @@
 
 # Properties for jprt
 
-# Use whatever release that the submitted job requests
-jprt.tools.default.release=${jprt.submit.release}
+# Locked down to jdk7
+jprt.tools.default.release=jdk7
 
 # The different build flavors we want, we override here so we just get these 2
 jprt.build.flavors=product,fastdebug
 
+# Standard list of jprt build targets for this source tree
+jprt.build.targets=                                             \
+    solaris_sparc_5.10-{product|fastdebug},                     \
+    solaris_sparcv9_5.10-{product|fastdebug},                   \
+    solaris_i586_5.10-{product|fastdebug},                      \
+    solaris_x64_5.10-{product|fastdebug},                       \
+    linux_i586_2.6-{product|fastdebug},                         \
+    linux_x64_2.6-{product|fastdebug},                          \
+    macosx_x64_10.7-{product|fastdebug},                        \
+    windows_i586_5.1-{product|fastdebug},                       \
+    windows_x64_5.2-{product|fastdebug}
+
 # Directories to be excluded from the source bundles
 jprt.bundle.exclude.src.dirs=build dist webrev
 
--- a/src/share/classes/com/sun/corba/se/impl/dynamicany/DynAnyFactoryImpl.java	Sun Mar 11 14:03:53 2012 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/dynamicany/DynAnyFactoryImpl.java	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -82,6 +82,6 @@
     private String[] __ids = { "IDL:omg.org/DynamicAny/DynAnyFactory:1.0" };
 
     public String[] _ids() {
-        return __ids;
+        return (String[])__ids.clone();
     }
 }
--- a/src/share/classes/com/sun/corba/se/impl/dynamicany/DynAnyImpl.java	Sun Mar 11 14:03:53 2012 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/dynamicany/DynAnyImpl.java	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -195,6 +195,6 @@
     private String[] __ids = { "IDL:omg.org/DynamicAny/DynAny:1.0" };
 
     public String[] _ids() {
-        return __ids;
+        return (String[])__ids.clone();
     }
 }
--- a/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream.java	Sun Mar 11 14:03:53 2012 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream.java	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -423,6 +423,13 @@
         impl.setByteBufferWithInfo(bbwi);
     }
 
+    /**
+     * return true if our ByteBuffer is sharing/equal to bb
+     */
+    protected final boolean isSharing(ByteBuffer bb) {
+        return (getByteBuffer() ==  bb);
+    }
+
     public final int getBufferLength() {
         return impl.getBufferLength();
     }
--- a/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java	Sun Mar 11 14:03:53 2012 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2412,7 +2412,6 @@
 
         if (bbwi != null && getByteBuffer() != null)
         {
-            int bbHash = System.identityHashCode(bbwi.byteBuffer);
             MessageMediator messageMediator = parent.getMessageMediator();
             if (messageMediator != null)
             {
@@ -2420,19 +2419,12 @@
                              (CDROutputObject)messageMediator.getOutputObject();
                 if (outputObj != null)
                 {
-                    ByteBuffer outputBb = outputObj.getByteBuffer();
-
-                    int oBbHash = 0;
-                    if (outputBb != null)
+                    if (outputObj.isSharing(getByteBuffer()))
                     {
-                        oBbHash = System.identityHashCode(outputBb);
-                        if (bbHash == oBbHash)  // shared?
-                        {
-                            // Set OutputStream's ByteBuffer and bbwi to null
-                            // so its ByteBuffer cannot be released to the pool
-                            outputObj.setByteBuffer(null);
-                            outputObj.setByteBufferWithInfo(null);
-                        }
+                        // Set OutputStream's ByteBuffer and bbwi to null
+                        // so its ByteBuffer cannot be released to the pool
+                        outputObj.setByteBuffer(null);
+                        outputObj.setByteBufferWithInfo(null);
                     }
                 }
             }
--- a/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream.java	Sun Mar 11 14:03:53 2012 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream.java	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,6 +357,13 @@
         impl.setByteBuffer(byteBuffer);
     }
 
+    /**
+     * return true if our ByteBuffer is sharing/equal to bb
+     */
+    protected final boolean isSharing(ByteBuffer bb) {
+        return (getByteBuffer() ==  bb);
+    }
+
     public final boolean isLittleEndian() {
         return impl.isLittleEndian();
     }
--- a/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java	Sun Mar 11 14:03:53 2012 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1902,7 +1902,6 @@
 
         if (getByteBufferWithInfo() != null && getByteBuffer() != null)
         {
-            int bbHash = System.identityHashCode(bbwi.byteBuffer);
             MessageMediator messageMediator = parent.getMessageMediator();
             if (messageMediator != null)
             {
@@ -1910,19 +1909,12 @@
                                (CDRInputObject)messageMediator.getInputObject();
                 if (inputObj != null)
                 {
-                    ByteBuffer inputBb = inputObj.getByteBuffer();
-
-                    int iBbHash = 0;
-                    if (inputBb != null)
+                    if (inputObj.isSharing(getByteBuffer()))
                     {
-                        iBbHash = System.identityHashCode(inputBb);
-                        if (bbHash == iBbHash)  // shared?
-                        {
-                            // Set InputStream's ByteBuffer and bbwi to null
-                            // so its ByteBuffer cannot be released to the pool
-                            inputObj.setByteBuffer(null);
-                            inputObj.setByteBufferWithInfo(null);
-                        }
+                        // Set InputStream's ByteBuffer and bbwi to null
+                        // so its ByteBuffer cannot be released to the pool
+                        inputObj.setByteBuffer(null);
+                        inputObj.setByteBufferWithInfo(null);
                     }
                 }
             }
--- a/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java	Sun Mar 11 14:03:53 2012 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -113,6 +113,9 @@
 import com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl;
 import com.sun.corba.se.impl.util.JDKBridge;
 
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ConcurrentHashMap;
+
 /**
  * ClientDelegate is the RMI client-side subcontract or representation
  * It implements RMI delegate as well as our internal ClientRequestDispatcher
@@ -122,6 +125,9 @@
     implements
         ClientRequestDispatcher
 {
+    private ConcurrentMap<ContactInfo, Object> locks =
+            new ConcurrentHashMap<ContactInfo, Object>();
+
     public OutputObject beginRequest(Object self, String opName,
                                      boolean isOneWay, ContactInfo contactInfo)
     {
@@ -148,8 +154,21 @@
 
         // This locking is done so that multiple connections are not created
         // for the same endpoint
-        //6929137 - Synchronized on contactInfo to avoid blocking across multiple endpoints
-        synchronized (contactInfo) {
+        // 7046238 - Synchronization on a single monitor for contactInfo parameters
+        // with identical hashCode(), so we lock on same monitor for equal parameters
+        // (which can refer to equal (in terms of equals()) but not the same objects)
+
+        Object lock = locks.get(contactInfo);
+
+        if (lock == null) {
+            Object newLock = new Object();
+            lock = locks.putIfAbsent(contactInfo, newLock);
+            if (lock == null) {
+                lock = newLock;
+            }
+        }
+
+        synchronized (lock) {
             if (contactInfo.isConnectionBased()) {
                 if (contactInfo.shouldCacheConnection()) {
                     connection = (CorbaConnection)
@@ -254,7 +273,7 @@
         registerWaiter(messageMediator);
 
         // Do connection reclaim now
-        synchronized (contactInfo) {
+        synchronized (lock) {
             if (contactInfo.isConnectionBased()) {
                 if (contactInfo.shouldCacheConnection()) {
                     OutboundConnectionCache connectionCache =
--- a/src/share/classes/com/sun/org/omg/SendingContext/_CodeBaseImplBase.java	Sun Mar 11 14:03:53 2012 -0700
+++ b/src/share/classes/com/sun/org/omg/SendingContext/_CodeBaseImplBase.java	Tue May 15 20:11:44 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -138,7 +138,7 @@
 
     public String[] _ids ()
     {
-        return __ids;
+        return (String[])__ids.clone();
     }