summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2012-12-05 23:17:40 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2012-12-05 23:17:40 +0000
commit032db1f5a1cbff8d7467fc7acc6ea7efa3d4f0ce (patch)
tree3284c9c18f4b6b4555b26a6128b8753fda1fe5af
parentf0d3c725c68776275bfb63375a88fb5f764f4c44 (diff)
downloadqpid-python-032db1f5a1cbff8d7467fc7acc6ea7efa3d4f0ce.tar.gz
NO-JIRA added consumer.close() and producer.close() to Drain and Spout.
This allows proper demonstration of the delete keyword in addressing. Allthough session.close() does call consumer and producer close, the session is marked closed, thereby preventing the qeueue or exchange delete being sent. This is a safety mechanism to prevent a deadlock situation in the client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1417692 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/client/example/src/main/java/org/apache/qpid/example/Drain.java2
-rw-r--r--qpid/java/client/example/src/main/java/org/apache/qpid/example/Spout.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/qpid/java/client/example/src/main/java/org/apache/qpid/example/Drain.java b/qpid/java/client/example/src/main/java/org/apache/qpid/example/Drain.java
index 28e1d5a87e..f0eb83ad24 100644
--- a/qpid/java/client/example/src/main/java/org/apache/qpid/example/Drain.java
+++ b/qpid/java/client/example/src/main/java/org/apache/qpid/example/Drain.java
@@ -88,7 +88,7 @@ public class Drain extends OptionParser
}
}
}
-
+ consumer.close();
ssn.close();
con.close();
}
diff --git a/qpid/java/client/example/src/main/java/org/apache/qpid/example/Spout.java b/qpid/java/client/example/src/main/java/org/apache/qpid/example/Spout.java
index 61ff2dfc19..09e813f8c1 100644
--- a/qpid/java/client/example/src/main/java/org/apache/qpid/example/Spout.java
+++ b/qpid/java/client/example/src/main/java/org/apache/qpid/example/Spout.java
@@ -100,6 +100,7 @@ public class Spout extends OptionParser
System.out.println(msg);
System.out.println("-------------------------------\n");
}
+ producer.close();
ssn.close();
con.close();
}