Author: ron.sigal(a)jboss.com
Date: 2008-03-28 02:31:04 -0400 (Fri, 28 Mar 2008)
New Revision: 3804
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.java
Log:
JBREM-942: Eliminated synchronization on listeners list.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.java 2008-03-27
20:00:54 UTC (rev 3803)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.java 2008-03-28
06:31:04 UTC (rev 3804)
@@ -320,7 +320,7 @@
{
if (listener != null)
{
- synchronized (listeners)
+ synchronized (lock)
{
if (listeners.size() == 0)
{
@@ -336,7 +336,7 @@
boolean isRemoved = false;
if (listener != null)
{
- synchronized (listeners)
+ synchronized (lock)
{
isRemoved = listeners.remove(listener);
if (listeners.size() == 0)
@@ -548,7 +548,7 @@
private void notifyListeners(Throwable thr)
{
final Throwable t = thr;
- synchronized (listeners)
+ synchronized (lock)
{
ListIterator itr = listeners.listIterator();
while (itr.hasNext())