summaryrefslogtreecommitdiff
path: root/java/client
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
commit56e7ea223bf8f17ce43fa3cf5f109ec514cb77a0 (patch)
tree97e8de363fa6516946bf513188571586898bcf00 /java/client
parent7db4e98602cef8e085d160a0a5aa52a464a2f3e8 (diff)
downloadqpid-python-56e7ea223bf8f17ce43fa3cf5f109ec514cb77a0.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/qpid@1417692 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
-rw-r--r--java/client/example/src/main/java/org/apache/qpid/example/Drain.java2
-rw-r--r--java/client/example/src/main/java/org/apache/qpid/example/Spout.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/java/client/example/src/main/java/org/apache/qpid/example/Drain.java b/java/client/example/src/main/java/org/apache/qpid/example/Drain.java
index 28e1d5a87e..f0eb83ad24 100644
--- a/java/client/example/src/main/java/org/apache/qpid/example/Drain.java
+++ b/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/java/client/example/src/main/java/org/apache/qpid/example/Spout.java b/java/client/example/src/main/java/org/apache/qpid/example/Spout.java
index 61ff2dfc19..09e813f8c1 100644
--- a/java/client/example/src/main/java/org/apache/qpid/example/Spout.java
+++ b/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();
}