summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2014-05-30 16:24:58 +0000
committerKeith Wall <kwall@apache.org>2014-05-30 16:24:58 +0000
commitdf196f1d27e75b4f82a35e368406910be16c75c6 (patch)
tree65564f8ac3f68153e2a601448a2ea5e2d14ac488 /qpid/java/broker-plugins
parent51c910379e88ec29a0dd6e5075af4af8441b497e (diff)
downloadqpid-python-df196f1d27e75b4f82a35e368406910be16c75c6.tar.gz
QPID-5795: [Java Broker] Prevent ConnectionAdapter leak when closing a messaging connection
The leak was due to the fact that nothing was telling the virtualhost to unregister the connection child (#unregisterChild) when the connection was closed. * Made ConnectionAdapter responsible for causing its own deletion (when the underlying connection is closed). The call to #deleted() causes the child to be unregistered from its parent (preventing the leak) * Removed the now unnecessary _connectionAdapters map from the VH. This needlessly duplicated information already held more generally by the ACO. * Refactored SessionAdapter in sympathy with CA changes. SessionsAdapters where _not_ being leaked as the session implementation were already telling the model to delete. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1598658 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins')
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java1
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java4
2 files changed, 0 insertions, 5 deletions
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java
index 6dd4124258..793150f9bb 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java
@@ -299,7 +299,6 @@ public class ServerConnectionDelegate extends ServerDelegate
stopAllSubscriptions(conn, dtc);
Session ssn = conn.getSession(dtc.getChannel());
((ServerSession)ssn).setClose(true);
- ((ServerSession)ssn).getModelObject().delete();
super.sessionDetach(conn, dtc);
}
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
index 1f108ec3e9..200be71187 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
@@ -739,10 +739,6 @@ public class AMQChannel<T extends AMQProtocolSession<T>>
_transaction.rollback();
- if(_modelObject != null)
- {
- _modelObject.delete();
- }
try
{