# HG changeset patch # User skoppar # Date 1286438029 25200 # Node ID 5f026ab0098c145da5ed09a916cf3ead7e8b65a9 # Parent 2d3622317730660ae747dee0bf55cc24cb3e96e1 6929137: java-corba: Locking too broad in com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl Reviewed-by: asaha diff -r 2d3622317730 -r 5f026ab0098c src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java --- a/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java Thu Oct 07 00:51:42 2010 -0700 +++ b/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java Thu Oct 07 00:53:49 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, 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 @@ -122,9 +122,6 @@ implements ClientRequestDispatcher { - // Used for locking - private Object lock = new Object(); - public OutputObject beginRequest(Object self, String opName, boolean isOneWay, ContactInfo contactInfo) { @@ -151,7 +148,8 @@ // This locking is done so that multiple connections are not created // for the same endpoint - synchronized (lock) { + //6929137 - Synchronized on contactInfo to avoid blocking across multiple endpoints + synchronized (contactInfo) { if (contactInfo.isConnectionBased()) { if (contactInfo.shouldCacheConnection()) { connection = (CorbaConnection) @@ -256,7 +254,7 @@ registerWaiter(messageMediator); // Do connection reclaim now - synchronized (lock) { + synchronized (contactInfo) { if (contactInfo.isConnectionBased()) { if (contactInfo.shouldCacheConnection()) { OutboundConnectionCache connectionCache =