You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2013/01/27 15:59:06 UTC
svn commit: r1439094 -
/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java
Author: orudyy
Date: Sun Jan 27 14:59:06 2013
New Revision: 1439094
URL: http://svn.apache.org/viewvc?rev=1439094&view=rev
Log:
QPID-4390: Fix a dead lock occuring on starting the broker when bdb store is activated in one thread and JMX plugin is started in another. The dead lock occurs when bdb thread tries to add an exchange from store and the main thread tries to create the exchangeMBean at the same time
Modified:
qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java
Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java?rev=1439094&r1=1439093&r2=1439094&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java Sun Jan 27 14:59:06 2013
@@ -101,7 +101,7 @@ abstract class AbstractAdapter implement
protected void notifyStateChanged(final State currentState, final State desiredState)
{
- synchronized (this)
+ synchronized (_changeListeners)
{
for(ConfigurationChangeListener listener : _changeListeners)
{
@@ -116,7 +116,7 @@ abstract class AbstractAdapter implement
{
throw new NullPointerException("Cannot add a null listener");
}
- synchronized (this)
+ synchronized (_changeListeners)
{
if(!_changeListeners.contains(listener))
{
@@ -131,7 +131,7 @@ abstract class AbstractAdapter implement
{
throw new NullPointerException("Cannot remove a null listener");
}
- synchronized (this)
+ synchronized (_changeListeners)
{
return _changeListeners.remove(listener);
}
@@ -140,7 +140,7 @@ abstract class AbstractAdapter implement
protected void childAdded(ConfiguredObject child)
{
- synchronized (this)
+ synchronized (_changeListeners)
{
for(ConfigurationChangeListener listener : _changeListeners)
{
@@ -152,7 +152,7 @@ abstract class AbstractAdapter implement
protected void childRemoved(ConfiguredObject child)
{
- synchronized (this)
+ synchronized (_changeListeners)
{
for(ConfigurationChangeListener listener : _changeListeners)
{
@@ -181,7 +181,7 @@ abstract class AbstractAdapter implement
@Override
public final Map<String, Object> getActualAttributes()
{
- synchronized (this)
+ synchronized (_attributes)
{
return new HashMap<String, Object>(_attributes);
}
@@ -189,7 +189,7 @@ abstract class AbstractAdapter implement
private Object getActualAttribute(final String name)
{
- synchronized (this)
+ synchronized (_attributes)
{
return _attributes.get(name);
}
@@ -198,7 +198,7 @@ abstract class AbstractAdapter implement
public Object setAttribute(final String name, final Object expected, final Object desired)
throws IllegalStateException, AccessControlException, IllegalArgumentException
{
- synchronized (this)
+ synchronized (_attributes)
{
Object currentValue = getAttribute(name);
if((currentValue == null && expected == null)
@@ -216,7 +216,7 @@ abstract class AbstractAdapter implement
public <T extends ConfiguredObject> T getParent(final Class<T> clazz)
{
- synchronized (this)
+ synchronized (_parents)
{
return (T) _parents.get(clazz);
}
@@ -224,7 +224,7 @@ abstract class AbstractAdapter implement
protected <T extends ConfiguredObject> void addParent(Class<T> clazz, T parent)
{
- synchronized (this)
+ synchronized (_parents)
{
_parents.put(clazz, parent);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org