summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/bindings/qpid/ruby/.gitignore2
-rw-r--r--qpid/cpp/bindings/qpid/ruby/CMakeLists.txt25
-rw-r--r--qpid/cpp/bindings/qpid/ruby/LICENSE234
-rw-r--r--qpid/cpp/bindings/qpid/ruby/README.rdoc18
-rw-r--r--qpid/cpp/bindings/qpid/ruby/Rakefile100
-rw-r--r--qpid/cpp/bindings/qpid/ruby/TODO7
-rw-r--r--qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb73
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb2
-rw-r--r--qpid/cpp/docs/man/qpidd.121
-rw-r--r--qpid/cpp/include/qpid/amqp_0_10/Codecs.h20
-rw-r--r--qpid/cpp/include/qpid/console/ClassKey.h30
-rw-r--r--qpid/cpp/include/qpid/console/ObjectId.h8
-rw-r--r--qpid/cpp/src/CMakeLists.txt1
-rw-r--r--qpid/cpp/src/qmf/AgentSessionImpl.h1
-rw-r--r--qpid/cpp/src/qmf/ConsoleSessionImpl.h1
-rw-r--r--qpid/cpp/src/qpid/broker/Message.cpp6
-rw-r--r--qpid/cpp/src/qpid/broker/SessionState.cpp4
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp2
-rw-r--r--qpid/cpp/src/tests/MessagingSessionTests.cpp18
19 files changed, 509 insertions, 64 deletions
diff --git a/qpid/cpp/bindings/qpid/ruby/.gitignore b/qpid/cpp/bindings/qpid/ruby/.gitignore
new file mode 100644
index 0000000000..ab78513491
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/.gitignore
@@ -0,0 +1,2 @@
+pkg
+html
diff --git a/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt b/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
index 96c00154ba..25258cfc6a 100644
--- a/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
+++ b/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
@@ -17,6 +17,15 @@
# under the License.
#
+##--------------------------------------------------
+## Properties used for generating the Ruby bindings.
+##--------------------------------------------------
+set(GEM_BINDINGS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ext/cqpid)
+set(GEM_BINDINGS_SOURCE_FILE ${GEM_BINDINGS_SOURCE_DIR}/cqpid.cpp)
+set(GEM_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
+set(GEM_OUTPUT_FILE ${GEM_OUTPUT_PATH}/pkg/qpid-${qpidc_version}.0.gem)
+
+
##------------------------------------------------------
## Use Swig to generate a literal binding to the C++ API
##------------------------------------------------------
@@ -36,3 +45,19 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid.so
DESTINATION ${RUBY_SITEARCH_DIR}
COMPONENT ${QPID_COMPONENT_CLIENT}
)
+
+add_custom_command(OUTPUT ${GEM_BINDINGS_SOURCE_FILE}
+ COMMAND cp ${swig_generated_file_fullname} ${GEM_BINDINGS_SOURCE_FILE}
+ DEPENDS ${swig_generated_file_fullname}
+ )
+
+add_custom_command(OUTPUT ${GEM_OUTPUT_FILE}
+ COMMAND OUTPUT_DIR=${GEM_OUTPUT_PATH} rake clean clobber package
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ${swig_generated_file_fullname} ${GEM_BINDINGS_SOURCE_FILE}
+ )
+
+add_custom_target(gemfile
+ DEPENDS ${GEM_OUTPUT_FILE}
+ )
+
diff --git a/qpid/cpp/bindings/qpid/ruby/LICENSE b/qpid/cpp/bindings/qpid/ruby/LICENSE
new file mode 100644
index 0000000000..cff2a5e25d
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/LICENSE
@@ -0,0 +1,234 @@
+=========================================================================
+== Apache License ==
+=========================================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+=========================================================================
+== Boost License ==
+=========================================================================
+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
diff --git a/qpid/cpp/bindings/qpid/ruby/README.rdoc b/qpid/cpp/bindings/qpid/ruby/README.rdoc
index 960fdf6107..0ae7e5cbed 100644
--- a/qpid/cpp/bindings/qpid/ruby/README.rdoc
+++ b/qpid/cpp/bindings/qpid/ruby/README.rdoc
@@ -14,6 +14,20 @@ You can install Qpid with the following command.
$ gem install qpid
+== Building The Native Code
+
+The Qpid gem requires that you have available the Qpid libraries and
+development header files. To install them, please see:
+
+http://cwiki.apache.org/qpid/developer-pages.html
+
+If you are building the gem within the Qpid development environment
+itself, you can specify the location of the Qpid headers and
+libraries with:
+
+$ ruby extconfig.rb --with-qpid-lib=[path to libqpidclient.so, etc.]
+$ make
+
== Examples
Take a look at the integration tests for examples on how to leverage
@@ -24,4 +38,8 @@ the messaging capabilities of Qpid in your Ruby applications.
Licensed to the Apache Software Foundation (ASF) under one or more
contributor licensing agreements.
+Author:: Darryl L. Pierce (mailto:dpierce@redhat.com)
+Copyright:: Copyright (c) 2011, Red Hat, Inc.
+Homepage:: http://qpid.apache.org
+License:: Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html
diff --git a/qpid/cpp/bindings/qpid/ruby/Rakefile b/qpid/cpp/bindings/qpid/ruby/Rakefile
index ef2b158eba..07cfff9844 100644
--- a/qpid/cpp/bindings/qpid/ruby/Rakefile
+++ b/qpid/cpp/bindings/qpid/ruby/Rakefile
@@ -20,24 +20,42 @@
task :noop
-require 'rubygems'
-require 'rake/clean'
-require 'rake/rdoctask'
-require 'rake/testtask'
+# look for a root directory for out-of-tree builds
-CLOBBER.include('pkg')
+OUTPUT_DIR=ENV["OUTPUT_DIR"] || "."
-load './lib/qpid/version.rb'
+require "rubygems"
+require "rubygems/package_task"
-desc 'Default: run all tests.'
-task :default => :'test:all'
+require "rake/clean"
+require "rake/extensiontask"
+require "rake/rdoctask"
+require "rake/testtask"
+
+CLOBBER.include("pkg")
+
+load "./lib/qpid/version.rb"
+
+#-------------
+# Gem Details.
+#-------------
+
+NAME = "qpid"
+# VERSION = Qpid::VERSION
+AUTHOR = "Darryl L. Pierce"
+EMAIL = "dpierce@redhat.com"
+HOMEPAGE = "http://qpid.apache.org"
+SUMMARY = "Qpid is an enterprise messaging framework."
+
+desc "Default: run all tests."
+task :default => :"test:all"
#---------------
# Testing tasks.
#---------------
-desc 'Run all tests (alias for test:all).'
-task :test => :'test:all'
+desc "Run all tests (alias for test:all)."
+task :test => :"test:all"
namespace :test do
desc "Run all tests (default)."
@@ -45,15 +63,15 @@ namespace :test do
desc "Run unit tests."
Rake::TestTask.new(:units) do |t|
- t.libs << '.'
- t.pattern = 'test/test*.rb'
+ t.libs << "."
+ t.pattern = "test/test*.rb"
t.verbose = true
end
desc "Run integration tests."
Rake::TestTask.new(:integrations) do |t|
- t.libs << '.'
- t.pattern = 'test/integration/*.rb'
+ t.libs << "."
+ t.pattern = "test/integration/*.rb"
t.verbose = true
end
@@ -63,12 +81,50 @@ end
# Documentation tasks.
#---------------------
-Rake::RDocTask.new(
- :rdoc => 'rdoc',
- :clobber_rdoc => 'rdoc:clean',
- :rerdoc => 'rdoc:force'
- ) do |rd|
- rd.main = 'README.rdoc'
- rd.options << '--all'
- rd.rdoc_files.include('README.rdoc', 'lib/**/*.rb')
+Rake::RDocTask.new(:rdoc => "rdoc",
+ :clobber_rdoc => "rdoc:clean",
+ :rerdoc => "rdoc:force") do |rd|
+ rd.main = "README.rdoc"
+ rd.options << "--all"
+ rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
end
+
+#-----------------
+# Package the gem.
+#-----------------
+
+spec = Gem::Specification.new do |s|
+ s.name = NAME
+ s.version = Qpid::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.extra_rdoc_files = ["README.rdoc"]
+ s.summary = SUMMARY
+ s.description = s.summary
+ s.author = AUTHOR
+ s.email = EMAIL
+ s.homepage = HOMEPAGE
+
+ s.extensions = FileList["ext/**/extconf.rb"]
+
+ s.require_path = "lib"
+ # DEPRECATED s.autorequire = NAME
+ s.files = FileList["LICENSE",
+ "README.rdoc",
+ "Rakefile",
+ "TODO",
+ "lib/**/*.rb",
+ "test/**/*.rb",
+ "examples/**/*.rb",
+ "ext/**/*"]
+end
+
+Gem::PackageTask.new(spec) do |pkg|
+ pkg.package_dir = "#{OUTPUT_DIR}/pkg"
+end
+
+#------------------
+# Build native code
+#------------------
+
+Rake::ExtensionTask.new("cqpid", spec)
+
diff --git a/qpid/cpp/bindings/qpid/ruby/TODO b/qpid/cpp/bindings/qpid/ruby/TODO
new file mode 100644
index 0000000000..454aac9200
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/TODO
@@ -0,0 +1,7 @@
+TODO Items
+-----------------------------------------------------------------------------
+
+Version 0.11.0:
+ * Deliver the Ruby bindings as a gem.
+ * Rework the blocking tasks to not bring the main thread to a halt.
+
diff --git a/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb b/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb
new file mode 100644
index 0000000000..90292d4bec
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb
@@ -0,0 +1,73 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# To create the Makefile then you need to specify the location
+# of the Qpid shared libraries using the commandline:
+#
+# $ ruby extconf.rb --with-qpid-lib=[path to libraries]
+#
+
+require 'mkmf'
+
+# Setup the build environment.
+$CFLAGS = "-fPIC -fno-inline -x c++"
+
+REQUIRED_LIBRARIES = [
+ 'qpidclient',
+ 'qpidcommon',
+ 'qpidmessaging',
+ 'qpidtypes'
+ ]
+
+REQUIRED_HEADERS = [
+ 'qpid/messaging/Address.h',
+ 'qpid/messaging/Connection.h',
+ 'qpid/messaging/Duration.h',
+ 'qpid/messaging/exceptions.h',
+ 'qpid/messaging/FailoverUpdates.h',
+ 'qpid/messaging/Handle.h',
+ 'qpid/messaging/ImportExport.h',
+ 'qpid/messaging/Message.h',
+ 'qpid/messaging/Receiver.h',
+ 'qpid/messaging/Sender.h',
+ 'qpid/messaging/Session.h'
+ ]
+
+dir_config('qpid')
+
+def abort_build filetype, filename
+ abort "Missing required #{filetype}: #{filename}"
+end
+
+def require_library lib
+ abort_build "library", lib unless have_library lib
+end
+
+def require_header header
+ abort_build "header", header unless have_header header
+end
+
+have_library('stdc++')
+
+REQUIRED_LIBRARIES.each {|library| require_library library}
+
+REQUIRED_HEADERS.each {|header| require_header header}
+
+create_makefile('cqpid')
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb
index a791b1638c..f387ba98dc 100644
--- a/qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb
@@ -22,7 +22,7 @@ module Qpid
module Version
NUMBERS = [MAJOR = 0,
- MINOR = 10,
+ MINOR = 13,
BUILD = 0]
end
diff --git a/qpid/cpp/docs/man/qpidd.1 b/qpid/cpp/docs/man/qpidd.1
index d2cff454cf..1e2d3aabee 100644
--- a/qpid/cpp/docs/man/qpidd.1
+++ b/qpid/cpp/docs/man/qpidd.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
-.TH QPIDD "1" "March 2011" "qpidd (qpidc) version 0.11" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.2.
+.TH QPIDD "1" "October 2011" "qpidd (qpidc) version 0.13" "User Commands"
.SH NAME
qpidd \- the Qpid AMQP Message Broker Daemon
@@ -24,11 +24,11 @@ Displays the help message
\fB\-v\fR [ \fB\-\-version\fR ]
Displays version information
.TP
-\fB\-\-config\fR FILE
+\fB\-\-config\fR FILE (/usr/local/etc/qpidd.conf)
Reads configuration from FILE
.SS "Module options:"
.TP
-\fB\-\-module\-dir\fR DIR
+\fB\-\-module\-dir\fR DIR (/usr/local/lib/qpid/daemon)
Load all shareable modules in this
directory
.TP
@@ -41,7 +41,7 @@ Don't load modules from module
directory
.SS "Broker Options:"
.TP
-\fB\-\-data\-dir\fR DIR
+\fB\-\-data\-dir\fR DIR (/home/kgiusti/.qpidd)
Directory to contain persistent data
generated by the broker
.TP
@@ -127,6 +127,11 @@ which flow control is de\-activated.
\fB\-\-default\-event\-threshold\-ratio\fR %age of limit (80)
The ratio of any specified queue limit
at which an event will be raised
+.TP
+\fB\-\-default\-message\-group\fR GROUP\-IDENTIFER (qpid.no\-group)
+Group identifier to assign to messages
+delivered to a message group queue that
+do not contain an identifier.
.SS "Logging options:"
.TP
\fB\-t\fR [ \fB\-\-trace\fR ]
@@ -164,6 +169,10 @@ Include thread ID in log messages
Include function signature in log
messages
.TP
+\fB\-\-log\-hires\-timestamp\fR yes|no (0)
+Use unformatted hi\-res timestamp in log
+messages
+.TP
\fB\-\-log\-prefix\fR STRING
Prefix to append to all log messages
.SS "Logging sink options:"
@@ -197,7 +206,7 @@ default in this mode.
The transport for which to return the
port
.TP
-\fB\-\-pid\-dir\fR DIR
+\fB\-\-pid\-dir\fR DIR (/home/kgiusti/.qpidd)
Directory where port\-specific PID file
is stored
.TP
diff --git a/qpid/cpp/include/qpid/amqp_0_10/Codecs.h b/qpid/cpp/include/qpid/amqp_0_10/Codecs.h
index 08275402fc..73846f33a8 100644
--- a/qpid/cpp/include/qpid/amqp_0_10/Codecs.h
+++ b/qpid/cpp/include/qpid/amqp_0_10/Codecs.h
@@ -34,14 +34,14 @@ namespace amqp_0_10 {
* Codec for encoding/decoding a map of Variants using the AMQP 0-10
* map encoding.
*/
-class QPID_COMMON_EXTERN MapCodec
+class QPID_COMMON_CLASS_EXTERN MapCodec
{
public:
typedef qpid::types::Variant::Map ObjectType;
- static void encode(const ObjectType&, std::string&);
- static void decode(const std::string&, ObjectType&);
- static size_t encodedSize(const ObjectType&);
- static const std::string contentType;
+ static void QPID_COMMON_EXTERN encode(const ObjectType&, std::string&);
+ static void QPID_COMMON_EXTERN decode(const std::string&, ObjectType&);
+ static size_t QPID_COMMON_EXTERN encodedSize(const ObjectType&);
+ static const QPID_COMMON_EXTERN std::string contentType;
private:
};
@@ -49,14 +49,14 @@ class QPID_COMMON_EXTERN MapCodec
* Codec for encoding/decoding a list of Variants using the AMQP 0-10
* list encoding.
*/
-class QPID_COMMON_EXTERN ListCodec
+class QPID_COMMON_CLASS_EXTERN ListCodec
{
public:
typedef qpid::types::Variant::List ObjectType;
- static void encode(const ObjectType&, std::string&);
- static void decode(const std::string&, ObjectType&);
- static size_t encodedSize(const ObjectType&);
- static const std::string contentType;
+ static void QPID_COMMON_EXTERN encode(const ObjectType&, std::string&);
+ static void QPID_COMMON_EXTERN decode(const std::string&, ObjectType&);
+ static size_t QPID_COMMON_EXTERN encodedSize(const ObjectType&);
+ static const QPID_COMMON_EXTERN std::string contentType;
private:
};
diff --git a/qpid/cpp/include/qpid/console/ClassKey.h b/qpid/cpp/include/qpid/console/ClassKey.h
index 95cd2627f1..5f7c50351a 100644
--- a/qpid/cpp/include/qpid/console/ClassKey.h
+++ b/qpid/cpp/include/qpid/console/ClassKey.h
@@ -33,24 +33,24 @@ namespace console {
*
* \ingroup qmfconsoleapi
*/
- class QPID_CONSOLE_EXTERN ClassKey {
+ class QPID_CONSOLE_CLASS_EXTERN ClassKey {
public:
- static const int HASH_SIZE = 16;
+ QPID_CONSOLE_EXTERN static const int HASH_SIZE = 16;
- ClassKey(const std::string& package, const std::string& name, const uint8_t* hash);
+ QPID_CONSOLE_EXTERN ClassKey(const std::string& package, const std::string& name, const uint8_t* hash);
- const std::string& getPackageName() const { return package; }
- const std::string& getClassName() const { return name; }
- const uint8_t* getHash() const { return hash; }
- std::string getHashString() const;
- std::string str() const;
- bool operator==(const ClassKey& other) const;
- bool operator!=(const ClassKey& other) const;
- bool operator<(const ClassKey& other) const;
- bool operator>(const ClassKey& other) const;
- bool operator<=(const ClassKey& other) const;
- bool operator>=(const ClassKey& other) const;
- void encode(framing::Buffer& buffer) const;
+ const QPID_CONSOLE_EXTERN std::string& getPackageName() const { return package; }
+ const QPID_CONSOLE_EXTERN std::string& getClassName() const { return name; }
+ const QPID_CONSOLE_EXTERN uint8_t* getHash() const { return hash; }
+ QPID_CONSOLE_EXTERN std::string getHashString() const;
+ QPID_CONSOLE_EXTERN std::string str() const;
+ QPID_CONSOLE_EXTERN bool operator==(const ClassKey& other) const;
+ QPID_CONSOLE_EXTERN bool operator!=(const ClassKey& other) const;
+ QPID_CONSOLE_EXTERN bool operator<(const ClassKey& other) const;
+ QPID_CONSOLE_EXTERN bool operator>(const ClassKey& other) const;
+ QPID_CONSOLE_EXTERN bool operator<=(const ClassKey& other) const;
+ QPID_CONSOLE_EXTERN bool operator>=(const ClassKey& other) const;
+ QPID_CONSOLE_EXTERN void encode(framing::Buffer& buffer) const;
private:
std::string package;
diff --git a/qpid/cpp/include/qpid/console/ObjectId.h b/qpid/cpp/include/qpid/console/ObjectId.h
index 7904c85598..0722eaebeb 100644
--- a/qpid/cpp/include/qpid/console/ObjectId.h
+++ b/qpid/cpp/include/qpid/console/ObjectId.h
@@ -40,10 +40,10 @@ namespace console {
ObjectId() : first(0), second(0) {}
ObjectId(framing::Buffer& buffer);
- uint8_t getFlags() const { return (first & 0xF000000000000000LL) >> 60; }
- uint16_t getSequence() const { return (first & 0x0FFF000000000000LL) >> 48; }
- uint32_t getBrokerBank() const { return (first & 0x0000FFFFF0000000LL) >> 28; }
- uint32_t getAgentBank() const { return first & 0x000000000FFFFFFFLL; }
+ uint8_t getFlags() const { return (uint8_t)((first & 0xF000000000000000LL) >> 60); }
+ uint16_t getSequence() const { return (uint16_t)((first & 0x0FFF000000000000LL) >> 48); }
+ uint32_t getBrokerBank() const { return (uint32_t)((first & 0x0000FFFFF0000000LL) >> 28); }
+ uint32_t getAgentBank() const { return (uint32_t) (first & 0x000000000FFFFFFFLL); }
uint64_t getObject() const { return second; }
bool isDurable() const { return getSequence() == 0; }
void decode(framing::Buffer& buffer);
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt
index f7b86d5f8a..da1f539108 100644
--- a/qpid/cpp/src/CMakeLists.txt
+++ b/qpid/cpp/src/CMakeLists.txt
@@ -598,6 +598,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
/wd4244
/wd4800
/wd4355
+ /wd4267
)
if (SET_WIN32_WINNT)
add_definitions(/D "_WIN32_WINNT=0x0502")
diff --git a/qpid/cpp/src/qmf/AgentSessionImpl.h b/qpid/cpp/src/qmf/AgentSessionImpl.h
index 9039a5985f..ae512a4054 100644
--- a/qpid/cpp/src/qmf/AgentSessionImpl.h
+++ b/qpid/cpp/src/qmf/AgentSessionImpl.h
@@ -64,7 +64,6 @@ using namespace std;
using namespace qpid::messaging;
using namespace qmf;
using qpid::types::Variant;
-using namespace boost;
typedef qmf::PrivateImplRef<AgentSession> PI;
diff --git a/qpid/cpp/src/qmf/ConsoleSessionImpl.h b/qpid/cpp/src/qmf/ConsoleSessionImpl.h
index 2f1f631715..e2b30602fa 100644
--- a/qpid/cpp/src/qmf/ConsoleSessionImpl.h
+++ b/qpid/cpp/src/qmf/ConsoleSessionImpl.h
@@ -47,7 +47,6 @@
#include <map>
#include <queue>
-using namespace boost;
using namespace std;
namespace qmf {
diff --git a/qpid/cpp/src/qpid/broker/Message.cpp b/qpid/cpp/src/qpid/broker/Message.cpp
index 992a94f92e..5ea7143366 100644
--- a/qpid/cpp/src/qpid/broker/Message.cpp
+++ b/qpid/cpp/src/qpid/broker/Message.cpp
@@ -59,6 +59,7 @@ Message::~Message() {}
void Message::forcePersistent()
{
+ sys::Mutex::ScopedLock l(lock);
// only set forced bit if we actually need to force.
if (! getAdapter().isPersistent(frames) ){
forcePersistentPolicy = true;
@@ -95,16 +96,19 @@ bool Message::isImmediate() const
const FieldTable* Message::getApplicationHeaders() const
{
+ sys::Mutex::ScopedLock l(lock);
return getAdapter().getApplicationHeaders(frames);
}
std::string Message::getAppId() const
{
+ sys::Mutex::ScopedLock l(lock);
return getAdapter().getAppId(frames);
}
bool Message::isPersistent() const
{
+ sys::Mutex::ScopedLock l(lock);
return (getAdapter().isPersistent(frames) || forcePersistentPolicy);
}
@@ -319,6 +323,7 @@ const std::string X_QPID_TRACE("x-qpid.trace");
bool Message::isExcluded(const std::vector<std::string>& excludes) const
{
+ sys::Mutex::ScopedLock l(lock);
const FieldTable* headers = getApplicationHeaders();
if (headers) {
std::string traceStr = headers->getAsString(X_QPID_TRACE);
@@ -490,6 +495,7 @@ void Message::resetDequeueCompleteCallback() {
}
uint8_t Message::getPriority() const {
+ sys::Mutex::ScopedLock l(lock);
return getAdapter().getPriority(frames);
}
diff --git a/qpid/cpp/src/qpid/broker/SessionState.cpp b/qpid/cpp/src/qpid/broker/SessionState.cpp
index 742dbe9be8..ddd6ae3f5b 100644
--- a/qpid/cpp/src/qpid/broker/SessionState.cpp
+++ b/qpid/cpp/src/qpid/broker/SessionState.cpp
@@ -346,10 +346,8 @@ void SessionState::completeRcvMsg(SequenceNumber id,
}
// if the sender has requested immediate notification of the completion...
- if (requiresSync) {
+ if (requiresSync || callSendCompletion) {
sendAcceptAndCompletion();
- } else if (callSendCompletion) {
- sendCompletion();
}
}
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
index 6687ba75e6..16e5fde075 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
@@ -583,7 +583,7 @@ void Subscription::cancel(qpid::client::AsyncSession& session, const std::string
{
linkBindings.unbind(session);
session.messageCancel(destination);
- if (reliable) session.queueDelete(arg::queue=queue, arg::ifUnused=true);
+ if (exclusiveQueue) session.queueDelete(arg::queue=queue, arg::ifUnused=true);
checkDelete(session, FOR_RECEIVER);
}
diff --git a/qpid/cpp/src/tests/MessagingSessionTests.cpp b/qpid/cpp/src/tests/MessagingSessionTests.cpp
index 418653978b..9d5db84bb4 100644
--- a/qpid/cpp/src/tests/MessagingSessionTests.cpp
+++ b/qpid/cpp/src/tests/MessagingSessionTests.cpp
@@ -1100,6 +1100,24 @@ QPID_AUTO_TEST_CASE(testCreateBindingsOnStandardExchange)
BOOST_CHECK_EQUAL(in.getSubject(), out.getSubject());
}
+QPID_AUTO_TEST_CASE(testUnsubscribeOnClose)
+{
+ MessagingFixture fix;
+ Sender sender = fix.session.createSender("my-exchange/my-subject; {create: always, delete:sender, node:{type:topic, x-declare:{alternate-exchange:amq.fanout}}}");
+ Receiver receiver = fix.session.createReceiver("my-exchange/my-subject");
+ Receiver deadletters = fix.session.createReceiver("amq.fanout");
+
+ sender.send(Message("first"));
+ Message in = receiver.fetch(Duration::SECOND);
+ BOOST_CHECK_EQUAL(in.getContent(), std::string("first"));
+ fix.session.acknowledge();
+ receiver.close();
+ sender.send(Message("second"));
+ in = deadletters.fetch(Duration::SECOND);
+ BOOST_CHECK_EQUAL(in.getContent(), std::string("second"));
+ fix.session.acknowledge();
+}
+
QPID_AUTO_TEST_SUITE_END()
}} // namespace qpid::tests