summaryrefslogtreecommitdiff
path: root/cpp/examples/messaging/hello_xml.cpp
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-09-14 21:19:42 +0000
committerJonathan Robie <jonathan@apache.org>2010-09-14 21:19:42 +0000
commit43393128c074be68dab06b6097072e62546689de (patch)
tree73d4c38213da9ea063b777afeb96a2c39388039f /cpp/examples/messaging/hello_xml.cpp
parent0b51c6b430224e3bfc09eede110ad8b1c530c213 (diff)
downloadqpid-python-43393128c074be68dab06b6097072e62546689de.tar.gz
Adds a parameter to several examples to allow connection options to be specified.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@997099 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/examples/messaging/hello_xml.cpp')
-rw-r--r--cpp/examples/messaging/hello_xml.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/examples/messaging/hello_xml.cpp b/cpp/examples/messaging/hello_xml.cpp
index ab6de25b16..99b4144b17 100644
--- a/cpp/examples/messaging/hello_xml.cpp
+++ b/cpp/examples/messaging/hello_xml.cpp
@@ -12,6 +12,8 @@ using namespace qpid::messaging;
int main(int argc, char** argv) {
std::string broker = argc > 1 ? argv[1] : "localhost:5672";
+ std::string connectionOptions = argc > 2 ? argv[2] : "";
+
std::string query =
"let $w := ./weather "
"return $w/station = 'Raleigh-Durham International Airport (KRDU)' "
@@ -32,7 +34,7 @@ int main(int argc, char** argv) {
" } "
"}";
- Connection connection(broker);
+ Connection connection(broker, connectionOptions);
try {
connection.open();
Session session = connection.createSession();