You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2012/08/03 14:14:12 UTC
svn commit: r1368910 [2/27] - in /qpid/branches/asyncstore: ./ bin/
cpp/bindings/qmf/ruby/ cpp/bindings/qmf2/ruby/ cpp/bindings/qpid/python/
cpp/bindings/qpid/ruby/ cpp/bindings/qpid/ruby/features/
cpp/bindings/qpid/ruby/features/step_definitions/ cpp/...
Propchange: qpid/branches/asyncstore/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid:r1333988-1368650
Modified: qpid/branches/asyncstore/QPID_VERSION.txt
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/QPID_VERSION.txt?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/QPID_VERSION.txt (original)
+++ qpid/branches/asyncstore/QPID_VERSION.txt Fri Aug 3 12:13:32 2012
@@ -1 +1 @@
-0.17
+0.19
Modified: qpid/branches/asyncstore/bin/release.sh
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/bin/release.sh?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/bin/release.sh (original)
+++ qpid/branches/asyncstore/bin/release.sh Fri Aug 3 12:13:32 2012
@@ -205,19 +205,19 @@ fi
if [ "JAVA" == "$JAVA" ] ; then
# generate the java 'release' archive seperately to ensure it doesnt have any optional feature dependencies in it
pushd qpid-${VER}/java
- ant build release -Dsvnversion.output=${REV}
+ ant clean build release -Dsvnversion.output=${REV}
popd
cp qpid-${VER}/java/release/*.tar.gz artifacts/qpid-java-${VER}.tar.gz
# now generate the binary packages, with the glue for optional features
pushd qpid-${VER}/java
- ant build release-bin release-mvn -Dsvnversion.output=${REV} -Dmaven.snapshot=false -Dmodules.opt=bdbstore -Ddownload-bdb=true
+ ant build release-bin -Dsvnversion.output=${REV} -Dmodules.opt="bdbstore,bdbstore/jmx" -Ddownload-bdb=true
+ ant release-mvn -Dsvnversion.output=${REV} -Dmodules.opt="bdbstore,bdbstore/jmx" -Dmaven.snapshot=false
popd
cp qpid-${VER}/java/broker/release/*.tar.gz artifacts/qpid-java-broker-${VER}.tar.gz
cp qpid-${VER}/java/client/release/*.tar.gz artifacts/qpid-java-client-${VER}.tar.gz
- cp qpid-${VER}/java/management/eclipse-plugin/release/*.tar.gz qpid-${VER}/java/management/eclipse-plugin/release/*.zip artifacts/
# copy the Maven artifacts
cp -a qpid-${VER}/java/client/release/maven artifacts/
@@ -225,6 +225,12 @@ if [ "JAVA" == "$JAVA" ] ; then
cp -a qpid-${VER}/java/broker/release/maven artifacts/
cp -a qpid-${VER}/java/bdbstore/release/maven artifacts/
cp -a qpid-${VER}/java/management/common/release/maven artifacts/
+ cp -a qpid-${VER}/java/amqp-1-0-common/release/maven artifacts/
+ cp -a qpid-${VER}/java/broker-plugins/access-control/release/maven artifacts/
+ cp -a qpid-${VER}/java/broker-plugins/firewall/release/maven artifacts/
+ cp -a qpid-${VER}/java/broker-plugins/management-jmx/release/maven artifacts/
+ cp -a qpid-${VER}/java/broker-plugins/management-http/release/maven artifacts/
+ cp -a qpid-${VER}/java/bdbstore/jmx/release/maven artifacts/
fi
if [ "TOOLS" = "$TOOLS" ] ; then
Modified: qpid/branches/asyncstore/cpp/bindings/qmf/ruby/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qmf/ruby/CMakeLists.txt?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qmf/ruby/CMakeLists.txt (original)
+++ qpid/branches/asyncstore/cpp/bindings/qmf/ruby/CMakeLists.txt Fri Aug 3 12:13:32 2012
@@ -21,13 +21,12 @@
## Use Swig to generate a literal binding to the C++ API
##------------------------------------------------------
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
+
+include_directories(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include)
swig_add_module(qmfengine_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
swig_link_libraries(qmfengine_ruby qmf qmfconsole ${RUBY_LIBRARY})
-set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include")
-
##----------------------------------
## Install the complete Ruby binding
##----------------------------------
Modified: qpid/branches/asyncstore/cpp/bindings/qmf2/ruby/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qmf2/ruby/CMakeLists.txt?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qmf2/ruby/CMakeLists.txt (original)
+++ qpid/branches/asyncstore/cpp/bindings/qmf2/ruby/CMakeLists.txt Fri Aug 3 12:13:32 2012
@@ -21,13 +21,12 @@
## Use Swig to generate a literal binding to the C++ API
##------------------------------------------------------
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
+
+include_directories(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include)
swig_add_module(cqmf2_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
swig_link_libraries(cqmf2_ruby qmf2 ${RUBY_LIBRARY})
-set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include")
-
##----------------------------------
## Install the complete Ruby binding
##----------------------------------
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/python/python.i
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/python/python.i?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/python/python.i (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/python/python.i Fri Aug 3 12:13:32 2012
@@ -33,41 +33,68 @@
* names as in the C++ library. They get renamed to their Python
* equivalents when brought into the Python wrapping
*/
+%define QPID_EXCEPTION(exception, parent)
%{
-static PyObject* pNoMessageAvailable;
-static PyObject* pTargetCapacityExceeded;
-static PyObject* pNotFound;
-static PyObject* pTransportFailure;
+static PyObject* exception;
%}
-
%init %{
- pNoMessageAvailable = PyErr_NewException(
- "_cqpid.NoMessageAvailable", NULL, NULL);
- Py_INCREF(pNoMessageAvailable);
- PyModule_AddObject(m, "NoMessageAvailable", pNoMessageAvailable);
-
- pTargetCapacityExceeded = PyErr_NewException(
- "_cqpid.TargetCapacityExceeded", NULL, NULL);
- Py_INCREF(pTargetCapacityExceeded);
- PyModule_AddObject(m, "TargetCapacityExceeded", pTargetCapacityExceeded);
-
- pNotFound = PyErr_NewException(
- "_cqpid.NotFound", NULL, NULL);
- Py_INCREF(pNotFound);
- PyModule_AddObject(m, "NotFound", pNotFound);
-
- pTransportFailure = PyErr_NewException(
- "_cqpid.TransportFailure", NULL, NULL);
- Py_INCREF(pTransportFailure);
- PyModule_AddObject(m, "TransportFailure", pTransportFailure);
+ exception = PyErr_NewException(
+ (char *) ("_cqpid." #exception), parent, NULL);
+ Py_INCREF(exception);
+ PyModule_AddObject(m, #exception, exception);
%}
-
%pythoncode %{
- Empty = _cqpid.NoMessageAvailable
- TargetCapacityExceeded = _cqpid.TargetCapacityExceeded
- NotFound = _cqpid.NotFound
- ConnectError = _cqpid.TransportFailure
+ exception = _cqpid. ## exception
%}
+%enddef
+
+ /* Python equivalents of C++ exceptions. */
+ /* */
+ /* Commented out lines are exceptions in the Python library, but not */
+ /* in the C++ library. */
+
+QPID_EXCEPTION(MessagingError, NULL)
+
+QPID_EXCEPTION(LinkError, MessagingError)
+QPID_EXCEPTION(AddressError, LinkError)
+QPID_EXCEPTION(ResolutionError, AddressError)
+QPID_EXCEPTION(AssertionFailed, ResolutionError)
+QPID_EXCEPTION(NotFound, ResolutionError)
+QPID_EXCEPTION(InvalidOption, LinkError)
+QPID_EXCEPTION(MalformedAddress, LinkError)
+QPID_EXCEPTION(ReceiverError, LinkError)
+QPID_EXCEPTION(FetchError, ReceiverError)
+QPID_EXCEPTION(Empty, FetchError)
+/* QPID_EXCEPTION(InsufficientCapacity, LinkError) */
+/* QPID_EXCEPTION(LinkClosed, LinkError) */
+QPID_EXCEPTION(SenderError, LinkError)
+QPID_EXCEPTION(SendError, SenderError)
+QPID_EXCEPTION(TargetCapacityExceeded, SendError)
+
+QPID_EXCEPTION(ConnectionError, MessagingError)
+QPID_EXCEPTION(ConnectError, ConnectionError)
+/* QPID_EXCEPTION(AuthenticationFailure, ConnectError) */
+/* QPID_EXCEPTION(VersionError, ConnectError) */
+/* QPID_EXCEPTION(ConnectionClosed, ConnectionError) */
+/* QPID_EXCEPTION(HeartbeartTimeout, ConnectionError) */
+
+QPID_EXCEPTION(SessionError, MessagingError)
+/* QPID_EXCEPTION(Detached, SessionError) */
+/* QPID_EXCEPTION(NontransactionalSession, SessionError) */
+/* QPID_EXCEPTION(ServerError, SessionError) */
+/* QPID_EXCEPTION(SessionClosed, SessionError) */
+QPID_EXCEPTION(TransactionError, SessionError)
+QPID_EXCEPTION(TransactionAborted, TransactionError)
+QPID_EXCEPTION(UnauthorizedAccess, SessionError)
+
+/* QPID_EXCEPTION(InternalError, MessagingError) */
+
+%define TRANSLATE_EXCEPTION(cpp_exception, py_exception)
+ catch ( cpp_exception & ex) {
+ pExceptionType = py_exception;
+ error = ex.what();
+ }
+%enddef
/* Define the general-purpose exception handling */
%exception {
@@ -76,22 +103,31 @@ static PyObject* pTransportFailure;
Py_BEGIN_ALLOW_THREADS;
try {
$action
- } catch (qpid::messaging::NoMessageAvailable & ex) {
- pExceptionType = pNoMessageAvailable;
- error = ex.what();
- } catch (qpid::messaging::TargetCapacityExceeded & ex) {
- pExceptionType = pTargetCapacityExceeded;
- error = ex.what();
- } catch (qpid::messaging::NotFound & ex) {
- pExceptionType = pNotFound;
- error = ex.what();
- } catch (qpid::messaging::TransportFailure & ex) {
- pExceptionType = pTransportFailure;
- error = ex.what();
- } catch (qpid::types::Exception& ex) {
- pExceptionType = PyExc_RuntimeError;
- error = ex.what();
}
+ /* Catch and translate exceptions. */
+ TRANSLATE_EXCEPTION(qpid::messaging::NoMessageAvailable, Empty)
+ TRANSLATE_EXCEPTION(qpid::messaging::NotFound, NotFound)
+ TRANSLATE_EXCEPTION(qpid::messaging::AssertionFailed, AssertionFailed)
+ TRANSLATE_EXCEPTION(qpid::messaging::ResolutionError, ResolutionError)
+ TRANSLATE_EXCEPTION(qpid::messaging::TargetCapacityExceeded,
+ TargetCapacityExceeded)
+ TRANSLATE_EXCEPTION(qpid::messaging::TransportFailure, ConnectError)
+ TRANSLATE_EXCEPTION(qpid::messaging::MalformedAddress, MalformedAddress)
+ TRANSLATE_EXCEPTION(qpid::messaging::AddressError, AddressError)
+ TRANSLATE_EXCEPTION(qpid::messaging::FetchError, FetchError)
+ TRANSLATE_EXCEPTION(qpid::messaging::ReceiverError, ReceiverError)
+ TRANSLATE_EXCEPTION(qpid::messaging::SendError, SendError)
+ TRANSLATE_EXCEPTION(qpid::messaging::SenderError, SenderError)
+ TRANSLATE_EXCEPTION(qpid::messaging::InvalidOptionString, InvalidOption)
+ TRANSLATE_EXCEPTION(qpid::messaging::LinkError, LinkError)
+ TRANSLATE_EXCEPTION(qpid::messaging::TransactionAborted, TransactionAborted)
+ TRANSLATE_EXCEPTION(qpid::messaging::TransactionError, TransactionError)
+ TRANSLATE_EXCEPTION(qpid::messaging::UnauthorizedAccess, UnauthorizedAccess)
+ TRANSLATE_EXCEPTION(qpid::messaging::SessionError, SessionError)
+ TRANSLATE_EXCEPTION(qpid::messaging::ConnectionError, ConnectionError)
+ TRANSLATE_EXCEPTION(qpid::messaging::KeyError, PyExc_KeyError)
+ TRANSLATE_EXCEPTION(qpid::messaging::MessagingException, MessagingError)
+ TRANSLATE_EXCEPTION(qpid::types::Exception, PyExc_RuntimeError)
Py_END_ALLOW_THREADS;
if (!error.empty()) {
PyErr_SetString(pExceptionType, error.c_str());
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/CMakeLists.txt?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/CMakeLists.txt (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/CMakeLists.txt Fri Aug 3 12:13:32 2012
@@ -30,12 +30,13 @@ set(GEM_OUTPUT_FILE ${GEM_OUTPUT_PATH}/p
## Use Swig to generate a literal binding to the C++ API
##------------------------------------------------------
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
+
+include_directories(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include)
swig_add_module(cqpid_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
swig_link_libraries(cqpid_ruby qpidmessaging qpidtypes qmf2 ${RUBY_LIBRARY})
-set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include")
+set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing")
##----------------------------------
## Install the complete Ruby binding
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/LICENSE
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/LICENSE?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/LICENSE (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/LICENSE Fri Aug 3 12:13:32 2012
@@ -203,32 +203,3 @@
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.
-
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/README.rdoc
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/README.rdoc?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/README.rdoc (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/README.rdoc Fri Aug 3 12:13:32 2012
@@ -2,7 +2,7 @@
Qpid is an cross-platform enterprise messaging system.
-Version :: 0.17.0
+Version :: 0.19.0
= Links
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature Fri Aug 3 12:13:32 2012
@@ -21,9 +21,9 @@ Feature: Creating a receiver
Scenario: The address string is fine
Given an open session
- Then creating a receiver with "my-queue;{create:always}" succeeds
+ Then creating a receiver with "my-queue;{create:always,delete:always}" succeeds
Scenario: Using an Address object
Given an open session
- And an Address with the name "create-receiver-test" and subject "foo" and option "create" set to "always"
+ And an Address with the name "create-receiver-test" and subject "foo" and option "create" set to "always" and "delete" set to "always"
Then creating a receiver with an Address succeeds
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/creating_a_sender.feature
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/creating_a_sender.feature?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/creating_a_sender.feature (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/creating_a_sender.feature Fri Aug 3 12:13:32 2012
@@ -5,11 +5,11 @@ Feature: Creating a sender
Scenario: The session is closed
Given a closed session
- Then creating a sender with "my-queue;{create:always}" raises an exception
+ Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception
Scenario: The connection is closed
Given an open session with a closed connection
- Then creating a sender with "my-queue;{create:always}" raises an exception
+ Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception
Scenario: The address is malformed
Given an open session
@@ -17,7 +17,7 @@ Feature: Creating a sender
Scenario: The address string is valid
Given an open session
- Then creating a sender with "my-queue;{create:always}" succeeds
+ Then creating a sender with "my-queue;{create:always,delete:always}" succeeds
Scenario: Using an Address object
Given an open session
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/receiving_a_message.feature
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/receiving_a_message.feature?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/receiving_a_message.feature (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/receiving_a_message.feature Fri Aug 3 12:13:32 2012
@@ -4,24 +4,26 @@ Feature: Receving a message
I need to be able to receive messages
Scenario: Receiving after the session is closed
- Given a sender and receiver for "my-queue;{create:always}"
+ Given a sender and receiver for "my-queue;{create:always,delete:always}"
And the message "this is a test" is sent
And the session is closed
Then getting the next message raises an error
Scenario: Receiving after the connection is closed
- Given a sender and receiver for "my-queue;{create:always}"
+ Given a sender and receiver for "my-queue;{create:always,delete:always}"
And the message "this is a test" is sent
And the connection is closed
Then getting the next message raises an error
Scenario: No message is received on an empty queue
- Given an existing receiver for "my-queue;{create:always}"
+ Given an existing receiver for "my-queue;{create:always,delete:always}"
And the receiver has no pending messages
Then getting the next message raises an error
Scenario: A message is pending
- Given a sender and receiver for "my-queue;{create:always}"
+ Given an open session
+ And given a sender for "my-queue;{create:always}"
+ And given a receiver for "my-queue;{create:always,delete:always}"
And the receiver has a capacity of 1
And the message "this is a test" is sent
Then the receiver should have 1 message available
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/sending_a_message.feature
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/sending_a_message.feature?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/sending_a_message.feature (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/sending_a_message.feature Fri Aug 3 12:13:32 2012
@@ -5,17 +5,17 @@ Feature: Sending a message
Scenario: The session is closed
Given an open session
- And creating a sender with "my-queue;{create:always}" succeeds
+ And creating a sender with "my-queue;{create:always,delete:always}" succeeds
And the session is closed
Then sending the message "This is a test" should raise an error
Scenario: The connection is closed
Given an open session
- And creating a sender with "my-queue;{create:always}" succeeds
+ And creating a sender with "my-queue;{create:always,delete:always}" succeeds
And the connection is closed
Then sending the message "This is a test" should raise an error
Scenario: The message sends successfully
Given an open session
- And creating a sender with "my-queue;{create:always}" succeeds
+ And creating a sender with "my-queue;{create:always,delete:always}" succeeds
Then sending the message "This is a test" succeeds
\ No newline at end of file
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb Fri Aug 3 12:13:32 2012
@@ -22,3 +22,10 @@ Given /^an Address with the name "([^"]*
options["#{key}"] = "#{value}"
@address = Qpid::Messaging::Address.new "#{name}", "#{subject}", options
end
+
+Given /^an Address with the name "([^"]*)" and subject "([^"]*)" and option "([^"]*)" set to "([^"]*)" and "([^"]*)" set to "([^"]*)"$/ do |name, subject, key1, value1, key2, value2|
+ options = Hash.new
+ options["#{key1}"] = "#{value1}"
+ options["#{key2}"] = "#{value2}"
+ @address = Qpid::Messaging::Address.new "#{name}", "#{subject}", options
+end
Modified: qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb (original)
+++ qpid/branches/asyncstore/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb Fri Aug 3 12:13:32 2012
@@ -59,3 +59,11 @@ Then /^the receiver should have (\d+) me
sleep 1
@receiver.available.should == available.to_i
end
+
+Given /^given a sender for "([^"]*)"$/ do |address|
+ @sender = @session.create_sender "#{address}"
+end
+
+Given /^given a receiver for "([^"]*)"$/ do |address|
+ @receiver = @session.create_receiver "#{address}"
+end
Propchange: qpid/branches/asyncstore/cpp/docs/api/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/docs/api:r1333988-1368650
Modified: qpid/branches/asyncstore/cpp/etc/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/etc/Makefile.am?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/etc/Makefile.am (original)
+++ qpid/branches/asyncstore/cpp/etc/Makefile.am Fri Aug 3 12:13:32 2012
@@ -20,8 +20,8 @@ SASL_CONF = sasl2/qpidd.conf
EXTRA_DIST = \
$(SASL_CONF) \
- qpidd qpidd-primary qpidd.conf qpidc.conf CMakeLists.txt \
- cluster.conf-example.xml
+ qpidd.in qpidd-primary.in qpidd.conf qpidc.conf CMakeLists.txt \
+ cluster.conf-example.xml.in
confdir = $(sysconfdir)/qpid
nobase_conf_DATA=\
Propchange: qpid/branches/asyncstore/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj:r1333988-1368650
Propchange: qpid/branches/asyncstore/cpp/include/qmf/engine/Agent.h
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h:r1333988-1368650
Propchange: qpid/branches/asyncstore/cpp/include/qmf/engine/Console.h
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/include/qmf/engine/Console.h:r1333988-1368650
Modified: qpid/branches/asyncstore/cpp/include/qmf/posix/EventNotifier.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qmf/posix/EventNotifier.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qmf/posix/EventNotifier.h (original)
+++ qpid/branches/asyncstore/cpp/include/qmf/posix/EventNotifier.h Fri Aug 3 12:13:32 2012
@@ -28,7 +28,7 @@
namespace qmf {
class PosixEventNotifierImpl;
- class PosixEventNotifierImplAccess;
+ struct PosixEventNotifierImplAccess;
namespace posix {
Modified: qpid/branches/asyncstore/cpp/include/qpid/Options.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/Options.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/Options.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/Options.h Fri Aug 3 12:13:32 2012
@@ -81,13 +81,12 @@ po::value_semantic* optValue(T& value, c
*/
template <class T>
po::value_semantic* optValue(std::vector<T>& value, const char* name) {
- using namespace std;
- ostringstream os;
- copy(value.begin(), value.end(), ostream_iterator<T>(os, " "));
- string val=os.str();
+ std::ostringstream os;
+ std::copy(value.begin(), value.end(), std::ostream_iterator<T>(os, " "));
+ std::string val=os.str();
if (!val.empty())
val.erase(val.end()-1); // Remove trailing " "
- return (new OptionValue<vector<T> >(value, prettyArg(name, val)));
+ return (new OptionValue<std::vector<T> >(value, prettyArg(name, val)));
}
/** Create a boolean switch value. Presence of the option sets the value. */
Modified: qpid/branches/asyncstore/cpp/include/qpid/RangeSet.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/RangeSet.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/RangeSet.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/RangeSet.h Fri Aug 3 12:13:32 2012
@@ -224,17 +224,15 @@ bool RangeSet<T>::contains(const Range<T
template <class T> void RangeSet<T>::addRange(const Range<T>& r) {
if (r.empty()) return;
- typename Ranges::iterator i =
- std::lower_bound(ranges.begin(), ranges.end(), r);
+ typename Ranges::iterator i = std::lower_bound(ranges.begin(), ranges.end(), r);
if (i == ranges.end() || !i->touching(r))
- ranges.insert(i, r);
+ ranges.insert(i, r); // No overlap
else {
i->merge(r);
typename Ranges::iterator j = i;
- if (++j != ranges.end() && i->touching(*j)) {
+ while (++j != ranges.end() && i->touching(*j))
i->merge(*j);
- ranges.erase(j);
- }
+ ranges.erase(i+1,j);
}
}
Modified: qpid/branches/asyncstore/cpp/include/qpid/amqp_0_10/Codecs.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/amqp_0_10/Codecs.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/amqp_0_10/Codecs.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/amqp_0_10/Codecs.h Fri Aug 3 12:13:32 2012
@@ -69,6 +69,8 @@ class QPID_COMMON_CLASS_EXTERN ListCodec
*/
QPID_COMMON_EXTERN void translate(const qpid::types::Variant::Map& from,
qpid::framing::FieldTable& to);
+QPID_COMMON_EXTERN void translate(const qpid::types::Variant::Map& from, const std::string& efield, const qpid::types::Variant& evalue,
+ qpid::framing::FieldTable& to);
QPID_COMMON_EXTERN void translate(const qpid::framing::FieldTable& from,
qpid::types::Variant::Map& to);
Modified: qpid/branches/asyncstore/cpp/include/qpid/client/SessionBase_0_10.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/client/SessionBase_0_10.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/client/SessionBase_0_10.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/client/SessionBase_0_10.h Fri Aug 3 12:13:32 2012
@@ -36,14 +36,13 @@ namespace client {
class Connection;
class SessionImpl;
-using std::string;
-using framing::Content;
-using framing::FieldTable;
-using framing::SequenceNumber;
-using framing::SequenceSet;
-using framing::SequenceNumberSet;
+using qpid::framing::Content;
+using qpid::framing::FieldTable;
+using qpid::framing::SequenceNumber;
+using qpid::framing::SequenceSet;
+using qpid::framing::SequenceNumberSet;
using qpid::SessionId;
-using framing::Xid;
+using qpid::framing::Xid;
/** Unit of message credit: messages or bytes */
enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF };
Modified: qpid/branches/asyncstore/cpp/include/qpid/client/SubscriptionSettings.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/client/SubscriptionSettings.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/client/SubscriptionSettings.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/client/SubscriptionSettings.h Fri Aug 3 12:13:32 2012
@@ -28,7 +28,19 @@ namespace qpid {
namespace client {
/** Bring AMQP enum definitions for message class into this namespace. */
-using namespace qpid::framing::message;
+using qpid::framing::message::AcceptMode;
+using qpid::framing::message::AcquireMode;
+using qpid::framing::message::ACCEPT_MODE_EXPLICIT;
+using qpid::framing::message::ACCEPT_MODE_NONE;
+using qpid::framing::message::ACQUIRE_MODE_NOT_ACQUIRED;
+using qpid::framing::message::ACQUIRE_MODE_PRE_ACQUIRED;
+using qpid::framing::message::CREDIT_UNIT_BYTE;
+using qpid::framing::message::CREDIT_UNIT_MESSAGE;
+using qpid::framing::message::DELIVERY_MODE_NON_PERSISTENT;
+using qpid::framing::message::DELIVERY_MODE_PERSISTENT;
+using qpid::framing::message::FLOW_MODE_CREDIT;
+using qpid::framing::message::FLOW_MODE_WINDOW;
+
enum CompletionMode {
MANUAL_COMPLETION = 0,
Modified: qpid/branches/asyncstore/cpp/include/qpid/framing/Array.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/framing/Array.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/framing/Array.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/framing/Array.h Fri Aug 3 12:13:32 2012
@@ -82,7 +82,7 @@ class QPID_COMMON_CLASS_EXTERN Array
// For use in standard algorithms
template <typename R, typename V>
static R get(const V& v) {
- return v->get<R>();
+ return v->template get<R>();
}
private:
Modified: qpid/branches/asyncstore/cpp/include/qpid/framing/Buffer.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/framing/Buffer.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/framing/Buffer.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/framing/Buffer.h Fri Aug 3 12:13:32 2012
@@ -1,3 +1,6 @@
+#ifndef QPID_FRAMING_BUFFER_H
+#define QPID_FRAMING_BUFFER_H
+
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -18,13 +21,12 @@
* under the License.
*
*/
-#include "qpid/framing/amqp_types.h"
+
#include "qpid/Exception.h"
#include "qpid/CommonImportExport.h"
-#include <boost/iterator/iterator_facade.hpp>
+#include "qpid/sys/IntegerTypes.h"
-#ifndef _Buffer_
-#define _Buffer_
+#include <string>
namespace qpid {
namespace framing {
@@ -41,42 +43,18 @@ class QPID_COMMON_CLASS_EXTERN Buffer
uint32_t size;
char* data;
uint32_t position;
- uint32_t r_position;
public:
void checkAvailable(uint32_t count) { if (position + count > size) throw OutOfBounds(); }
- /** Buffer input/output iterator.
- * Supports using an amqp_0_10::Codec with a framing::Buffer.
- */
- class Iterator : public boost::iterator_facade<
- Iterator, char, boost::random_access_traversal_tag>
- {
- public:
- Iterator(Buffer& b) : buffer(&b) {}
-
- private:
- friend class boost::iterator_core_access;
- char& dereference() const { return buffer->data[buffer->position]; }
- void increment() { ++buffer->position; }
- bool equal(const Iterator& x) const { return buffer == x.buffer; }
-
- Buffer* buffer;
- };
-
- friend class Iterator;
-
QPID_COMMON_EXTERN Buffer(char* data=0, uint32_t size=0);
- QPID_COMMON_EXTERN void record();
- QPID_COMMON_EXTERN void restore(bool reRecord = false);
QPID_COMMON_EXTERN void reset();
QPID_COMMON_INLINE_EXTERN uint32_t available() { return size - position; }
QPID_COMMON_INLINE_EXTERN uint32_t getSize() { return size; }
QPID_COMMON_INLINE_EXTERN uint32_t getPosition() { return position; }
QPID_COMMON_INLINE_EXTERN void setPosition(uint32_t p) { position = p; }
- QPID_COMMON_INLINE_EXTERN Iterator getIterator() { return Iterator(*this); }
QPID_COMMON_INLINE_EXTERN char* getPointer() { return data; }
QPID_COMMON_EXTERN void putOctet(uint8_t i);
@@ -108,16 +86,16 @@ class QPID_COMMON_CLASS_EXTERN Buffer
template <int n>
QPID_COMMON_EXTERN void putUInt(uint64_t);
- QPID_COMMON_EXTERN void putShortString(const string& s);
- QPID_COMMON_EXTERN void putMediumString(const string& s);
- QPID_COMMON_EXTERN void putLongString(const string& s);
- QPID_COMMON_EXTERN void getShortString(string& s);
- QPID_COMMON_EXTERN void getMediumString(string& s);
- QPID_COMMON_EXTERN void getLongString(string& s);
+ QPID_COMMON_EXTERN void putShortString(const std::string& s);
+ QPID_COMMON_EXTERN void putMediumString(const std::string& s);
+ QPID_COMMON_EXTERN void putLongString(const std::string& s);
+ QPID_COMMON_EXTERN void getShortString(std::string& s);
+ QPID_COMMON_EXTERN void getMediumString(std::string& s);
+ QPID_COMMON_EXTERN void getLongString(std::string& s);
QPID_COMMON_EXTERN void getBin128(uint8_t* b);
- QPID_COMMON_EXTERN void putRawData(const string& s);
- QPID_COMMON_EXTERN void getRawData(string& s, uint32_t size);
+ QPID_COMMON_EXTERN void putRawData(const std::string& s);
+ QPID_COMMON_EXTERN void getRawData(std::string& s, uint32_t size);
QPID_COMMON_EXTERN void putRawData(const uint8_t* data, size_t size);
QPID_COMMON_EXTERN void getRawData(uint8_t* data, size_t size);
Modified: qpid/branches/asyncstore/cpp/include/qpid/framing/ProtocolVersion.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/framing/ProtocolVersion.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/framing/ProtocolVersion.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/framing/ProtocolVersion.h Fri Aug 3 12:13:32 2012
@@ -24,6 +24,8 @@
#include "qpid/framing/amqp_types.h"
#include "qpid/CommonImportExport.h"
+#include <string>
+
namespace qpid
{
namespace framing
Modified: qpid/branches/asyncstore/cpp/include/qpid/framing/SequenceNumber.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/framing/SequenceNumber.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/framing/SequenceNumber.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/framing/SequenceNumber.h Fri Aug 3 12:13:32 2012
@@ -57,12 +57,18 @@ boost::equality_comparable<
QPID_COMMON_EXTERN uint32_t encodedSize() const;
template <class S> void serialize(S& s) { s(value); }
-
- friend inline int32_t operator-(const SequenceNumber& a, const SequenceNumber& b);
};
inline int32_t operator-(const SequenceNumber& a, const SequenceNumber& b) {
- return int32_t(a.value - b.value);
+ return int32_t(a.getValue() - b.getValue());
+}
+
+inline SequenceNumber operator+(const SequenceNumber& a, int32_t n) {
+ return SequenceNumber(a.getValue() + n);
+}
+
+inline SequenceNumber operator-(const SequenceNumber& a, int32_t n) {
+ return SequenceNumber(a.getValue() - n);
}
struct Window
Modified: qpid/branches/asyncstore/cpp/include/qpid/framing/StructHelper.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/framing/StructHelper.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/framing/StructHelper.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/framing/StructHelper.h Fri Aug 3 12:13:32 2012
@@ -34,7 +34,7 @@ class QPID_COMMON_CLASS_EXTERN StructHel
{
public:
- template <class T> void encode(const T t, std::string& data) {
+ template <class T> void encode(const T& t, std::string& data) {
uint32_t size = t.bodySize() + 2/*type*/;
data.resize(size);
Buffer wbuffer(const_cast<char*>(data.data()), size);
Modified: qpid/branches/asyncstore/cpp/include/qpid/framing/Uuid.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/framing/Uuid.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/framing/Uuid.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/framing/Uuid.h Fri Aug 3 12:13:32 2012
@@ -48,6 +48,9 @@ struct Uuid : public boost::array<uint8_
/** Copy from 16 bytes of data. */
QPID_COMMON_EXTERN Uuid(const uint8_t* data);
+ /** Parse format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */
+ QPID_COMMON_EXTERN Uuid(const std::string&);
+
// Default op= and copy ctor are fine.
// boost::array gives us ==, < etc.
Modified: qpid/branches/asyncstore/cpp/include/qpid/framing/amqp_types.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/framing/amqp_types.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/framing/amqp_types.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/framing/amqp_types.h Fri Aug 3 12:13:32 2012
@@ -27,12 +27,10 @@
*/
#include "qpid/sys/IntegerTypes.h"
-#include <string>
namespace qpid {
namespace framing {
-using std::string;
typedef uint8_t FrameType;
typedef uint16_t ChannelId;
typedef uint32_t BatchOffset;
Modified: qpid/branches/asyncstore/cpp/include/qpid/log/Logger.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/log/Logger.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/log/Logger.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/log/Logger.h Fri Aug 3 12:13:32 2012
@@ -36,7 +36,7 @@ namespace log {
class QPID_COMMON_CLASS_EXTERN Logger : private boost::noncopyable {
public:
/** Flags indicating what to include in the log output */
- enum FormatFlag { FILE=1, LINE=2, FUNCTION=4, LEVEL=8, TIME=16, THREAD=32, HIRES=64};
+ enum FormatFlag { FILE=1, LINE=2, FUNCTION=4, LEVEL=8, TIME=16, THREAD=32, HIRES=64, CATEGORY=128};
/**
* Logging output sink.
Modified: qpid/branches/asyncstore/cpp/include/qpid/log/Options.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/log/Options.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/log/Options.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/log/Options.h Fri Aug 3 12:13:32 2012
@@ -39,7 +39,7 @@ struct Options : public qpid::Options {
std::string argv0;
std::string name;
std::vector<std::string> selectors;
- bool time, level, thread, source, function, hiresTs;
+ bool time, level, thread, source, function, hiresTs, category;
bool trace;
std::string prefix;
std::auto_ptr<SinkOptions> sinkOptions;
Modified: qpid/branches/asyncstore/cpp/include/qpid/log/Selector.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/log/Selector.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/log/Selector.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/log/Selector.h Fri Aug 3 12:13:32 2012
@@ -35,17 +35,24 @@ struct Options;
class Selector {
public:
/** Empty selector selects nothing */
- Selector() {}
+ Selector() {
+ reset();
+ }
/** Set selector from Options */
QPID_COMMON_EXTERN Selector(const Options&);
/** Equavlient to: Selector s; s.enable(l, s) */
Selector(Level l, const std::string& s=std::string()) {
+ reset();
enable(l,s);
}
- Selector(const std::string& enableStr) { enable(enableStr); }
+ Selector(const std::string& enableStr) {
+ reset();
+ enable(enableStr);
+ }
+
/**
* Enable messages with level in levels where the file
* name contains substring. Empty string matches all.
@@ -54,14 +61,30 @@ class Selector {
substrings[level].push_back(substring);
}
+ /**
+ * Enable messages at this level for this category
+ */
+ void enable(Level level, Category category) {
+ catFlags[level][category] = true;
+ }
+
/** Enable based on a 'level[+]:file' string */
QPID_COMMON_EXTERN void enable(const std::string& enableStr);
/** True if level is enabled for file. */
QPID_COMMON_EXTERN bool isEnabled(Level level, const char* function);
+ QPID_COMMON_EXTERN bool isEnabled(Level level, const char* function, Category category);
+
+ /** Reset the category enable flags */
+ QPID_COMMON_EXTERN void reset() {
+ for (int lt = 0; lt < LevelTraits::COUNT; ++lt)
+ for (int ct = 0; ct < CategoryTraits::COUNT; ++ct)
+ catFlags[lt][ct] = false;
+ }
private:
std::vector<std::string> substrings[LevelTraits::COUNT];
+ bool catFlags[LevelTraits::COUNT][CategoryTraits::COUNT];
};
Modified: qpid/branches/asyncstore/cpp/include/qpid/log/Statement.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/log/Statement.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/log/Statement.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/log/Statement.h Fri Aug 3 12:13:32 2012
@@ -22,6 +22,7 @@
#include "qpid/Msg.h"
#include "qpid/CommonImportExport.h"
#include <boost/current_function.hpp>
+#include <list>
namespace qpid {
namespace log {
@@ -55,15 +56,119 @@ struct LevelTraits {
static const char* name(Level);
};
-/** POD struct representing a logging statement in source code. */
+/** Formal message categories
+ * https://issues.apache.org/jira/browse/QPID-3902
+ *
+ * Category Source code directory
+ * -------- ---------------------
+ * Security acl ssl gssapi sasl cyrus
+ * Broker broker
+ * Management agent console qmf
+ * Protocol amqp_0_10 framing
+ * System log sys types xml thread mutex fork pipe time ...
+ * HA cluster ha replication
+ * Messaging messaging
+ * Client client
+ * Store store
+ * Network tcp rdma AsynchIO socket epoll
+ * Test
+ * Model <not related to a directory>
+ * Unspecified <must be last in enum>
+ */
+enum Category { security, broker, management, protocol, system, ha, messaging,
+ store, network, test, client, model, unspecified };
+struct CategoryTraits {
+ static const int COUNT=unspecified+1;
+
+ /** Test if given name is a Category name
+ */
+ static bool isCategory(const std::string& name);
+
+ /** Get category from string name
+ * @exception if name invalid.
+ */
+ static Category category(const char* name);
+
+ /** Get category from string name.
+ * @exception if name invalid.
+ */
+ static Category category(const std::string& name) {
+ return category(name.c_str());
+ }
+
+ /** String name of category */
+ static const char* name(Category);
+};
+
+
+class CategoryFileNameHints {
+public:
+ CategoryFileNameHints(){
+ hintList.push_back(std::make_pair("AsynchIo", network));
+ hintList.push_back(std::make_pair("TCP", network));
+ hintList.push_back(std::make_pair("epoll", network));
+ hintList.push_back(std::make_pair("Pollable", network));
+ hintList.push_back(std::make_pair("Socket", network));
+
+ hintList.push_back(std::make_pair("Sasl", security));
+ hintList.push_back(std::make_pair("Ssl", security));
+ hintList.push_back(std::make_pair("Acl", security));
+ hintList.push_back(std::make_pair("acl", security));
+ hintList.push_back(std::make_pair("cyrus", security));
+
+ hintList.push_back(std::make_pair("amqp_", protocol));
+ hintList.push_back(std::make_pair("framing", protocol));
+
+ hintList.push_back(std::make_pair("management", management));
+ hintList.push_back(std::make_pair("qmf", management));
+ hintList.push_back(std::make_pair("console", management));
+ hintList.push_back(std::make_pair("Management", management));
+
+ hintList.push_back(std::make_pair("cluster", ha));
+ hintList.push_back(std::make_pair("qpid/ha", ha));
+ hintList.push_back(std::make_pair("qpid\\ha", ha));
+ hintList.push_back(std::make_pair("replication", ha));
+ hintList.push_back(std::make_pair("ClusterSafe", ha));
+
+ hintList.push_back(std::make_pair("broker", broker));
+ hintList.push_back(std::make_pair("SessionState",broker));
+ hintList.push_back(std::make_pair("DataDir", broker));
+ hintList.push_back(std::make_pair("qpidd", broker));
+ hintList.push_back(std::make_pair("xml", broker));
+ hintList.push_back(std::make_pair("QpidBroker", broker));
+
+ hintList.push_back(std::make_pair("store", store));
+
+ hintList.push_back(std::make_pair("assert", system));
+ hintList.push_back(std::make_pair("Exception", system));
+ hintList.push_back(std::make_pair("sys", system));
+ hintList.push_back(std::make_pair("SCM", system));
+
+ hintList.push_back(std::make_pair("tests", test));
+
+ hintList.push_back(std::make_pair("messaging", messaging));
+ hintList.push_back(std::make_pair("types", messaging));
+
+ hintList.push_back(std::make_pair("client", client));
+ }
+
+ static Category categoryOf(const char*const fName);
+
+private:
+ std::list<std::pair<const char* const, Category> > hintList;
+};
+
+ /** POD struct representing a logging statement in source code. */
struct Statement {
bool enabled;
const char* file;
int line;
const char* function;
Level level;
+ Category category;
QPID_COMMON_EXTERN void log(const std::string& message);
+ QPID_COMMON_EXTERN static void categorize(Statement& s);
struct Initializer {
QPID_COMMON_EXTERN Initializer(Statement& s);
@@ -72,8 +177,14 @@ struct Statement {
};
///@internal static initializer for a Statement.
-#define QPID_LOG_STATEMENT_INIT(level) \
- { 0, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (::qpid::log::level) }
+#define QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY) \
+{ 0, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (::qpid::log::LEVEL), \
+(::qpid::log::CATEGORY) }
+
+
+///@internal static initializer for a Statement with unspecified category
+#define QPID_LOG_STATEMENT_INIT(LEVEL) \
+QPID_LOG_STATEMENT_INIT_CAT ( LEVEL , unspecified )
/**
* Like QPID_LOG but computes an additional boolean test expression
@@ -96,13 +207,26 @@ struct Statement {
} while(0)
/**
+ * Line QPID_LOG_IF but with the additional specification of a category.
+ * @param CATEGORY message category.
+ */
+#define QPID_LOG_IF_CAT(LEVEL, CATEGORY, TEST, MESSAGE) \
+ do { \
+ using ::qpid::log::Statement; \
+ static Statement stmt_= QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY); \
+ static Statement::Initializer init_(stmt_); \
+ if (stmt_.enabled && (TEST)) \
+ stmt_.log(::qpid::Msg() << MESSAGE); \
+ } while(0)
+
+/**
* FLAG must be a boolean variable. Assigns FLAG to true iff logging
* is enabled for LEVEL in the calling context. Use when extra
* support code is needed to generate log messages, to ensure that it
* is only run if the logging level is enabled.
* e.g.
* bool logWarning;
- * QPID_LOG_TEST(LEVEL, logWarning);
+ * QPID_LOG_TEST(warning, logWarning);
* if (logWarning) { do stuff needed for warning log messages }
*/
#define QPID_LOG_TEST(LEVEL, FLAG) \
@@ -113,12 +237,31 @@ struct Statement {
FLAG = stmt_.enabled; \
} while(0)
+ /**
+ * FLAG must be a boolean variable. Assigns FLAG to true iff logging
+ * is enabled for LEVEL in the calling context. Use when extra
+ * support code is needed to generate log messages, to ensure that it
+ * is only run if the logging level is enabled.
+ * e.g.
+ * bool logWarning;
+ * QPID_LOG_TEST_CAT(warning, System, logWarning);
+ * if (logWarning) { do stuff needed for warning log messages }
+ */
+ #define QPID_LOG_TEST_CAT(LEVEL, CATEGORY, FLAG) \
+ do { \
+ using ::qpid::log::Statement; \
+ static Statement stmt_= QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY); \
+ static Statement::Initializer init_(stmt_); \
+ FLAG = stmt_.enabled; \
+ } while(0)
+
/**
* Macro for log statements. Example of use:
* @code
* QPID_LOG(debug, "There are " << foocount << " foos in the bar.");
* QPID_LOG(error, boost::format("Dohickey %s exploded") % dohicky.name());
* @endcode
+ * Using QPID_LOG implies a category of Unspecified.
*
* You can subscribe to log messages by level, by component, by filename
* or a combination @see Configuration.
@@ -130,6 +273,25 @@ struct Statement {
*/
#define QPID_LOG(LEVEL, MESSAGE) QPID_LOG_IF(LEVEL, true, MESSAGE);
+/**
+ * Macro for log statements. Example of use:
+ * @code
+ * QPID_LOG_CAT(debug, System, "There are " << foocount << " foos in the bar.");
+ * QPID_LOG_CAT(error, System, boost::format("Dohickey %s exploded") % dohicky.name());
+ * @endcode
+ * Using QPID_LOG_CAT requires the specification of a category.
+ *
+ * You can subscribe to log messages by level, by component, by filename
+ * or a combination @see Configuration.
+ *
+ *@param LEVEL severity Level for message, should be one of:
+ * debug, info, notice, warning, error, critical. NB no qpid::log:: prefix.
+ *@param CATEGORY basic Category for the message.
+ *@param MESSAGE any object with an @eostream operator<<, or a sequence
+ * like of ostreamable objects separated by @e<<.
+ */
+#define QPID_LOG_CAT(LEVEL, CATEGORY, MESSAGE) QPID_LOG_IF_CAT(LEVEL, CATEGORY, true, MESSAGE);
+
}} // namespace qpid::log
Modified: qpid/branches/asyncstore/cpp/include/qpid/management/Buffer.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/management/Buffer.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/management/Buffer.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/management/Buffer.h Fri Aug 3 12:13:32 2012
@@ -46,13 +46,12 @@ public:
QPID_COMMON_EXTERN Buffer(char* data=0, uint32_t size=0);
QPID_COMMON_EXTERN ~Buffer();
- QPID_COMMON_EXTERN void record();
- QPID_COMMON_EXTERN void restore(bool reRecord = false);
QPID_COMMON_EXTERN void reset();
QPID_COMMON_EXTERN uint32_t available();
QPID_COMMON_EXTERN uint32_t getSize();
QPID_COMMON_EXTERN uint32_t getPosition();
+ QPID_COMMON_EXTERN void setPosition(uint32_t);
QPID_COMMON_EXTERN char* getPointer();
QPID_COMMON_EXTERN void putOctet(uint8_t i);
Modified: qpid/branches/asyncstore/cpp/include/qpid/sys/SystemInfo.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/include/qpid/sys/SystemInfo.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/include/qpid/sys/SystemInfo.h (original)
+++ qpid/branches/asyncstore/cpp/include/qpid/sys/SystemInfo.h Fri Aug 3 12:13:32 2012
@@ -34,51 +34,61 @@ namespace sys {
* Results may be dependent on OS/hardware.
*/
namespace SystemInfo {
- /**
- * Estimate available concurrency, e.g. number of CPU cores.
- * -1 means estimate not available on this platform.
- */
- QPID_COMMON_EXTERN long concurrency();
-
- /**
- * Get the local host name and set it in the specified.
- * Returns false if it can't be obtained and sets errno to any error value.
- */
- QPID_COMMON_EXTERN bool getLocalHostname (Address &address);
-
- QPID_COMMON_EXTERN void getLocalIpAddresses (uint16_t port, std::vector<Address> &addrList);
-
- /**
- * Retrieve system identifiers and versions. This is information that can
- * generally be retrieved via POSIX uname().
- *
- * @param osName Receives the OS name; e.g., GNU/Linux or Windows
- * @param nodeName Receives the nodename. This may or may not match the
- * set hostname from getLocalHostname().
- * @param release Receives the OS release identifier.
- * @param version Receives the OS release version (kernel, build, sp, etc.)
- * @param machine Receives the hardware type.
- */
- QPID_COMMON_EXTERN void getSystemId (std::string &osName,
- std::string &nodeName,
- std::string &release,
- std::string &version,
- std::string &machine);
-
- /**
- * Get the process ID of the current process.
- */
- QPID_COMMON_EXTERN uint32_t getProcessId();
-
- /**
- * Get the process ID of the parent of the current process.
- */
- QPID_COMMON_EXTERN uint32_t getParentProcessId();
-
- /**
- * Get the name of the current process (i.e. the name of the executable)
- */
- QPID_COMMON_EXTERN std::string getProcessName();
+/**
+ * Estimate available concurrency, e.g. number of CPU cores.
+ * -1 means estimate not available on this platform.
+ */
+QPID_COMMON_EXTERN long concurrency();
+
+/**
+ * Get the local host name and set it in the specified.
+ * Returns false if it can't be obtained and sets errno to any error value.
+ */
+QPID_COMMON_EXTERN bool getLocalHostname (Address &address);
+
+/**
+ * Get the (possibly multiple) local IP addresses of this host
+ * using the specified port.
+ */
+QPID_COMMON_EXTERN void getLocalIpAddresses (uint16_t port, std::vector<Address> &addrList);
+
+/**
+ * Return true if host names an address of the local host.
+ *@param host host name or IP address.
+ */
+QPID_COMMON_EXTERN bool isLocalHost(const std::string& host);
+
+/**
+ * Retrieve system identifiers and versions. This is information that can
+ * generally be retrieved via POSIX uname().
+ *
+ * @param osName Receives the OS name; e.g., GNU/Linux or Windows
+ * @param nodeName Receives the nodename. This may or may not match the
+ * set hostname from getLocalHostname().
+ * @param release Receives the OS release identifier.
+ * @param version Receives the OS release version (kernel, build, sp, etc.)
+ * @param machine Receives the hardware type.
+ */
+QPID_COMMON_EXTERN void getSystemId (std::string &osName,
+ std::string &nodeName,
+ std::string &release,
+ std::string &version,
+ std::string &machine);
+
+/**
+ * Get the process ID of the current process.
+ */
+QPID_COMMON_EXTERN uint32_t getProcessId();
+
+/**
+ * Get the process ID of the parent of the current process.
+ */
+QPID_COMMON_EXTERN uint32_t getParentProcessId();
+
+/**
+ * Get the name of the current process (i.e. the name of the executable)
+ */
+QPID_COMMON_EXTERN std::string getProcessName();
}}} // namespace qpid::sys::SystemInfo
Modified: qpid/branches/asyncstore/cpp/managementgen/qmf-gen
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/managementgen/qmf-gen?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/managementgen/qmf-gen (original)
+++ qpid/branches/asyncstore/cpp/managementgen/qmf-gen Fri Aug 3 12:13:32 2012
@@ -49,6 +49,8 @@ parser.add_option("-b", "--broker-plugin
help="Generate code for use in a qpid broker plugin")
parser.add_option("-2", "--v2-style", dest="v2_style", default=False, action="store_true",
help="Generate code for use with the QMFv2 Agent API")
+parser.add_option("-l", "--qpid-logs", dest="qpidlogs", default=False, action="store_true",
+ help="Generate code for QPID_LOG statements in classes constructor/destructor")
(opts, args) = parser.parse_args()
@@ -70,6 +72,11 @@ else:
vargs["agentHeaderDir"] = "agent"
vargs["genQmfV1"] = None
+if opts.qpidlogs:
+ vargs["genLogs"] = True
+else:
+ vargs["genLogs"] = False
+
for schemafile in args:
package = SchemaPackage(typefile, schemafile, opts)
Modified: qpid/branches/asyncstore/cpp/managementgen/qmfgen/generate.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/managementgen/qmfgen/generate.py?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/managementgen/qmfgen/generate.py (original)
+++ qpid/branches/asyncstore/cpp/managementgen/qmfgen/generate.py Fri Aug 3 12:13:32 2012
@@ -304,6 +304,9 @@ class Generator:
def testGenQMFv1 (self, variables):
return variables["genQmfV1"]
+ def testGenLogs (self, variables):
+ return variables["genLogs"]
+
def genDisclaimer (self, stream, variables):
prefix = variables["commentPrefix"]
stream.write (prefix + " This source file was created by a code generator.\n")
Modified: qpid/branches/asyncstore/cpp/managementgen/qmfgen/templates/Class.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/managementgen/qmfgen/templates/Class.cpp?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/managementgen/qmfgen/templates/Class.cpp (original)
+++ qpid/branches/asyncstore/cpp/managementgen/qmfgen/templates/Class.cpp Fri Aug 3 12:13:32 2012
@@ -7,9 +7,9 @@
// 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
@@ -27,8 +27,12 @@
#include "qpid//*MGEN:Class.AgentHeaderLocation*//ManagementAgent.h"
#include "/*MGEN:Class.NameCap*/.h"
/*MGEN:Class.MethodArgIncludes*/
+/*MGEN:IF(Root.GenLogs)*/
+#include "qpid/log/Statement.h"
+/*MGEN:ENDIF*/
#include <iostream>
#include <sstream>
+#include <string.h>
using namespace qmf::/*MGEN:Class.Namespace*/;
using qpid::management::ManagementAgent;
@@ -58,10 +62,26 @@ uint8_t /*MGEN:Class.NameCap*/::md5Sum[M
for (int idx = 0; idx < maxThreads; idx++)
perThreadStatsArray[idx] = 0;
/*MGEN:ENDIF*/
+/*MGEN:IF(Root.GenLogs)*/
+ QPID_LOG_CAT(trace, model, "Mgmt create " << className
+ << ". id:" << getKey());
+/*MGEN:ENDIF*/
}
/*MGEN:Class.NameCap*/::~/*MGEN:Class.NameCap*/ ()
{
+/*MGEN:IF(Root.GenLogs)*/
+ bool logEnabled;
+ QPID_LOG_TEST_CAT(trace, model, logEnabled);
+ if (logEnabled)
+ {
+ ::qpid::types::Variant::Map map;
+ mapEncodeValues(map, false, true);
+ QPID_LOG_CAT(trace, model, "Mgmt delete " << className
+ << ". id:" << getKey()
+ << " Statistics: " << map);
+ }
+/*MGEN:ENDIF*/
/*MGEN:IF(Class.ExistPerThreadStats)*/
for (int idx = 0; idx < maxThreads; idx++)
if (perThreadStatsArray[idx] != 0)
@@ -274,7 +294,6 @@ std::string /*MGEN:Class.NameCap*/::getK
}
-
void /*MGEN:Class.NameCap*/::mapEncodeValues (::qpid::types::Variant::Map& _map,
bool includeProperties,
bool includeStatistics)
Propchange: qpid/branches/asyncstore/cpp/src/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src:r1333988-1368650
Modified: qpid/branches/asyncstore/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/CMakeLists.txt?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/CMakeLists.txt (original)
+++ qpid/branches/asyncstore/cpp/src/CMakeLists.txt Fri Aug 3 12:13:32 2012
@@ -220,7 +220,7 @@ execute_process(COMMAND ${RUBY_EXECUTABL
endforeach (spec_file ${mgmt_specs})
if (regen_mgmt)
message(STATUS "Regenerating Qpid Management Framework sources")
-execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c managementgen.cmake -b -q -o ${CMAKE_CURRENT_BINARY_DIR}/qmf ${mgmt_specs}
+execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c managementgen.cmake -b -l -q -o ${CMAKE_CURRENT_BINARY_DIR}/qmf ${mgmt_specs}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
else (regen_mgmt)
message(STATUS "No need to generate Qpid Management Framework sources")
@@ -281,7 +281,7 @@ endif (CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
set (COMPILER_FLAGS "-library=stlport4 -mt")
- set (WARNING_FLAGS "+w2")
+ set (WARNING_FLAGS "+w")
endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
option(ENABLE_WARNINGS "Enable lots of compiler warnings (recommended)" ON)
@@ -626,27 +626,42 @@ set (ha_default ON)
option(BUILD_HA "Build Active-Passive HA plugin" ${ha_default})
if (BUILD_HA)
set (ha_SOURCES
+ qpid/ha/AlternateExchangeSetter.h
+ qpid/ha/BackupConnectionExcluder.h
+ qpid/ha/BrokerInfo.cpp
+ qpid/ha/BrokerInfo.h
+ qpid/ha/QueueGuard.cpp
+ qpid/ha/QueueGuard.h
+ qpid/ha/ReplicationTest.cpp
+ qpid/ha/ReplicationTest.h
qpid/ha/Backup.cpp
qpid/ha/Backup.h
+ qpid/ha/BrokerReplicator.cpp
+ qpid/ha/BrokerReplicator.h
+ qpid/ha/ConnectionObserver.cpp
+ qpid/ha/ConnectionObserver.h
qpid/ha/HaBroker.cpp
qpid/ha/HaBroker.h
qpid/ha/HaPlugin.cpp
- qpid/ha/Settings.h
- qpid/ha/QueueReplicator.h
+ qpid/ha/Membership.cpp
+ qpid/ha/Membership.h
+ qpid/ha/Primary.cpp
+ qpid/ha/Primary.h
+ qpid/ha/QueueRange.h
qpid/ha/QueueReplicator.cpp
- qpid/ha/ReplicateLevel.h
- qpid/ha/ReplicateLevel.cpp
- qpid/ha/ReplicatingSubscription.h
+ qpid/ha/QueueReplicator.h
qpid/ha/ReplicatingSubscription.cpp
- qpid/ha/BrokerReplicator.cpp
- qpid/ha/BrokerReplicator.h
- qpid/ha/ConnectionExcluder.cpp
- qpid/ha/ConnectionExcluder.h
+ qpid/ha/ReplicatingSubscription.h
+ qpid/ha/Settings.h
+ qpid/ha/types.cpp
+ qpid/ha/types.h
+ qpid/ha/RemoteBackup.cpp
+ qpid/ha/RemoteBackup.h
)
add_library (ha MODULE ${ha_SOURCES})
set_target_properties (ha PROPERTIES PREFIX "")
- target_link_libraries (ha qpidcommon qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY})
+ target_link_libraries (ha qpidtypes qpidcommon qpidbroker)
if (CMAKE_COMPILER_IS_GNUCXX)
set_target_properties (ha PROPERTIES
PREFIX ""
@@ -672,6 +687,11 @@ include (ssl.cmake)
# Check for syslog capabilities not present on all systems
check_symbol_exists (LOG_AUTHPRIV "sys/syslog.h" HAVE_LOG_AUTHPRIV)
check_symbol_exists (LOG_FTP "sys/syslog.h" HAVE_LOG_FTP)
+
+# Set default Memory Status module (Null implementation)
+set (qpid_memstat_module
+ qpid/sys/MemStat.cpp
+)
# Allow MSVC user to select 'WinXP-SP3/Windows Server 2003' as build target version
set (win32_winnt_default OFF)
@@ -734,7 +754,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
qpid/sys/windows/SystemInfo.cpp
qpid/sys/windows/Thread.cpp
qpid/sys/windows/Time.cpp
- qpid/sys/windows/MemStat.cpp
qpid/client/windows/SaslFactory.cpp
${sslcommon_windows_SOURCES}
)
@@ -780,41 +799,54 @@ else (CMAKE_SYSTEM_NAME STREQUAL Windows
)
endif (POLLER STREQUAL poll)
+ # Set default System Info module
+ set (qpid_system_module
+ qpid/sys/posix/SystemInfo.cpp
+ )
+
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
- set (qpid_system_module
- qpid/sys/posix/SystemInfo.cpp
- )
add_definitions(-pthread)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
if (CMAKE_COMPILER_IS_GNUCXX)
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GCC_CATCH_UNDEFINED} -pthread")
+ set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pthread")
endif (CMAKE_COMPILER_IS_GNUCXX)
+ # On Linux override memory status module
+ set (qpid_memstat_module
+ qpid/sys/posix/MemStat.cpp
+ )
endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
- set (qpidtypes_platform_SOURCES)
- set (qpidtypes_platform_LIBS
- uuid
- ${Boost_SYSTEM_LIBRARY}
- )
-
if (CMAKE_SYSTEM_NAME STREQUAL SunOS)
+ # On Solaris override the system info module
set (qpid_system_module
qpid/sys/solaris/SystemInfo.cpp
)
-# On Sun we want -lpthread -lthread as the 2nd last and last libs passed to linker
+ # On Sun we want -lpthread -lthread as the 2nd last and last libs passed to linker
set (qpidtypes_platform_LIBS ${qpidtypes_platform_LIBS}
pthread
thread
)
endif (CMAKE_SYSTEM_NAME STREQUAL SunOS)
+ if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
+ # -lmalloc needed for mallinfo.
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lmalloc")
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lmalloc")
+ endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
+
+ set (qpidtypes_platform_SOURCES)
+ set (qpidtypes_platform_LIBS
+ uuid
+ ${Boost_SYSTEM_LIBRARY}
+ )
+
set (qpidcommon_platform_SOURCES
qpid/sys/posix/AsynchIO.cpp
qpid/sys/posix/Fork.cpp
qpid/sys/posix/FileSysDir.cpp
qpid/sys/posix/IOHandle.cpp
qpid/sys/posix/LockFile.cpp
- qpid/sys/posix/MemStat.cpp
qpid/sys/posix/Mutex.cpp
qpid/sys/posix/PipeHandle.cpp
qpid/sys/posix/PollableCondition.cpp
@@ -917,6 +949,7 @@ set (qpidcommon_SOURCES
qpid/sys/Timer.cpp
qpid/sys/TimerWarnings.cpp
qpid/amqp_0_10/Codecs.cpp
+ ${qpid_memstat_module}
)
add_msvc_version (qpidcommon library dll)
@@ -1200,6 +1233,7 @@ set (qmf_SOURCES
set (qmf_HEADERS
../include/qpid/agent/ManagementAgent.h
../include/qpid/agent/QmfAgentImportExport.h
+ ../include/qmf/BrokerImportExport.h
)
add_msvc_version (qmf library dll)
Propchange: qpid/branches/asyncstore/cpp/src/CMakeLists.txt
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/CMakeLists.txt:r1333988-1368650
Modified: qpid/branches/asyncstore/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/Makefile.am?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/Makefile.am (original)
+++ qpid/branches/asyncstore/cpp/src/Makefile.am Fri Aug 3 12:13:32 2012
@@ -28,6 +28,7 @@ windows_dist = \
qpid/log/windows/SinkOptions.cpp \
qpid/log/windows/SinkOptions.h \
../include/qpid/sys/windows/check.h \
+ qpid/sys/MemStat.cpp \
qpid/sys/windows/AsynchIO.cpp \
qpid/sys/windows/AsynchIoResult.h \
../include/qpid/sys/windows/Condition.h \
@@ -53,7 +54,6 @@ windows_dist = \
../include/qpid/sys/windows/Time.h \
qpid/sys/windows/uuid.cpp \
qpid/sys/windows/uuid.h \
- qpid/sys/windows/MemStat.cpp \
windows/QpiddBroker.cpp \
windows/SCM.h \
windows/SCM.cpp \
@@ -107,7 +107,7 @@ mgen_xml=$(top_srcdir)/../specs/manageme
$(srcdir)/qpid/cluster/management-schema.xml \
$(srcdir)/qpid/ha/management-schema.xml
mgen_cmd=$(mgen_dir)/qmf-gen -m $(srcdir)/managementgen.mk \
- -c $(srcdir)/managementgen.cmake -q -b -o qmf \
+ -c $(srcdir)/managementgen.cmake -q -b -l -o qmf \
$(mgen_xml)
$(srcdir)/managementgen.mk $(mgen_broker_cpp) $(dist_qpid_management_HEADERS): mgen.timestamp
@@ -380,7 +380,6 @@ libqpidcommon_la_SOURCES += \
qpid/assert.h \
qpid/framing/AMQBody.cpp \
qpid/framing/AMQBody.h \
- qpid/framing/AMQCommandControlBody.h \
qpid/framing/AMQContentBody.cpp \
qpid/framing/AMQContentBody.h \
qpid/framing/AMQDataBlock.h \
@@ -553,6 +552,8 @@ libqpidbroker_la_SOURCES = \
qpid/broker/ConsumerFactory.h \
qpid/broker/ConnectionObserver.h \
qpid/broker/ConnectionObservers.h \
+ qpid/broker/ConfigurationObserver.h \
+ qpid/broker/ConfigurationObservers.h \
qpid/broker/Daemon.cpp \
qpid/broker/Daemon.h \
qpid/broker/Deliverable.h \
@@ -615,6 +616,7 @@ libqpidbroker_la_SOURCES = \
qpid/broker/NameGenerator.h \
qpid/broker/NullMessageStore.cpp \
qpid/broker/NullMessageStore.h \
+ qpid/broker/Observers.h \
qpid/broker/OwnershipToken.h \
qpid/broker/Persistable.h \
qpid/broker/PersistableConfig.h \
@@ -684,6 +686,7 @@ libqpidbroker_la_SOURCES = \
qpid/broker/ThresholdAlerts.h \
qpid/broker/TopicExchange.cpp \
qpid/broker/TopicExchange.h \
+ qpid/broker/TopicKeyNode.h \
qpid/broker/TransactionalStore.h \
qpid/broker/TxAccept.cpp \
qpid/broker/TxAccept.h \
Modified: qpid/branches/asyncstore/cpp/src/ha.mk
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/ha.mk?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/ha.mk (original)
+++ qpid/branches/asyncstore/cpp/src/ha.mk Fri Aug 3 12:13:32 2012
@@ -23,22 +23,37 @@
dmoduleexec_LTLIBRARIES += ha.la
ha_la_SOURCES = \
+ qpid/ha/AlternateExchangeSetter.h \
qpid/ha/Backup.cpp \
qpid/ha/Backup.h \
+ qpid/ha/BackupConnectionExcluder.h \
+ qpid/ha/BrokerInfo.cpp \
+ qpid/ha/BrokerInfo.h \
qpid/ha/BrokerReplicator.cpp \
- qpid/ha/BrokerReplicator.h \
- qpid/ha/ConnectionExcluder.cpp \
- qpid/ha/ConnectionExcluder.h \
+ qpid/ha/BrokerReplicator.h \
+ qpid/ha/ConnectionObserver.cpp \
+ qpid/ha/ConnectionObserver.h \
qpid/ha/HaBroker.cpp \
qpid/ha/HaBroker.h \
qpid/ha/HaPlugin.cpp \
+ qpid/ha/Membership.cpp \
+ qpid/ha/Membership.h \
+ qpid/ha/Primary.cpp \
+ qpid/ha/Primary.h \
+ qpid/ha/QueueGuard.cpp \
+ qpid/ha/QueueGuard.h \
+ qpid/ha/QueueRange.h \
qpid/ha/QueueReplicator.cpp \
qpid/ha/QueueReplicator.h \
- qpid/ha/ReplicateLevel.cpp \
- qpid/ha/ReplicateLevel.h \
qpid/ha/ReplicatingSubscription.cpp \
qpid/ha/ReplicatingSubscription.h \
- qpid/ha/Settings.h
+ qpid/ha/ReplicationTest.cpp \
+ qpid/ha/ReplicationTest.h \
+ qpid/ha/Settings.h \
+ qpid/ha/RemoteBackup.cpp \
+ qpid/ha/RemoteBackup.h \
+ qpid/ha/types.cpp \
+ qpid/ha/types.h
ha_la_LIBADD = libqpidbroker.la
ha_la_LDFLAGS = $(PLUGINLDFLAGS)
Modified: qpid/branches/asyncstore/cpp/src/posix/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/posix/QpiddBroker.cpp?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/posix/QpiddBroker.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/posix/QpiddBroker.cpp Fri Aug 3 12:13:32 2012
@@ -154,8 +154,14 @@ int QpiddBroker::execute (QpiddOptions *
throw Exception("Internal error obtaining platform options");
if (myOptions->daemon.check || myOptions->daemon.quit) {
- pid_t pid = Daemon::getPid(myOptions->daemon.piddir,
- options->broker.port);
+ pid_t pid;
+ try {
+ pid = Daemon::getPid(myOptions->daemon.piddir, options->broker.port);
+ } catch (const ErrnoException& e) {
+ // This is not a critical error, usually means broker is not running
+ QPID_LOG(notice, "Cannot stop broker: " << e.what());
+ return 1;
+ }
if (pid < 0)
return 1;
if (myOptions->daemon.check)
Modified: qpid/branches/asyncstore/cpp/src/qmf.mk
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qmf.mk?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qmf.mk (original)
+++ qpid/branches/asyncstore/cpp/src/qmf.mk Fri Aug 3 12:13:32 2012
@@ -30,7 +30,8 @@ lib_LTLIBRARIES += \
#
QMF_API = \
../include/qpid/agent/ManagementAgent.h \
- ../include/qpid/agent/QmfAgentImportExport.h
+ ../include/qpid/agent/QmfAgentImportExport.h \
+ ../include/qmf/BrokerImportExport.h
#
# Public headers for the QMF2 API
@@ -96,7 +97,6 @@ libqmf2_la_SOURCES = \
qmf/AgentSessionImpl.h \
qmf/AgentSubscription.cpp \
qmf/AgentSubscription.h \
- qmf/BrokerImportExport.h \
qmf/ConsoleEvent.cpp \
qmf/ConsoleEventImpl.h \
qmf/ConsoleSession.cpp \
Modified: qpid/branches/asyncstore/cpp/src/qmf/AgentSession.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qmf/AgentSession.cpp?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qmf/AgentSession.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qmf/AgentSession.cpp Fri Aug 3 12:13:32 2012
@@ -21,6 +21,22 @@
#include "qmf/AgentSessionImpl.h"
+#include <iostream>
+#include <memory>
+
+namespace qmf {
+
+using std::string;
+using std::map;
+
+using qpid::messaging::Address;
+using qpid::messaging::Connection;
+using qpid::messaging::Duration;
+using qpid::messaging::Message;
+using qpid::messaging::Receiver;
+using qpid::messaging::Sender;
+using qpid::types::Variant;
+
AgentSession::AgentSession(AgentSessionImpl* impl) { PI::ctor(*this, impl); }
AgentSession::AgentSession(const AgentSession& s) : qmf::Handle<AgentSessionImpl>() { PI::copy(*this, s); }
AgentSession::~AgentSession() { PI::dtor(*this); }
@@ -332,7 +348,7 @@ void AgentSessionImpl::delData(const Dat
void AgentSessionImpl::authAccept(AgentEvent& authEvent)
{
- auto_ptr<AgentEventImpl> eventImpl(new AgentEventImpl(AGENT_QUERY));
+ std::auto_ptr<AgentEventImpl> eventImpl(new AgentEventImpl(AGENT_QUERY));
eventImpl->setQuery(authEvent.getQuery());
eventImpl->setUserId(authEvent.getUserId());
eventImpl->setReplyTo(AgentEventImplAccess::get(authEvent).getReplyTo());
@@ -593,7 +609,7 @@ void AgentSessionImpl::handleMethodReque
//
// Construct an AgentEvent to be sent to the application.
//
- auto_ptr<AgentEventImpl> eventImpl(new AgentEventImpl(AGENT_METHOD));
+ std::auto_ptr<AgentEventImpl> eventImpl(new AgentEventImpl(AGENT_METHOD));
eventImpl->setUserId(msg.getUserId());
eventImpl->setReplyTo(msg.getReplyTo());
eventImpl->setCorrelationId(msg.getCorrelationId());
@@ -655,8 +671,8 @@ void AgentSessionImpl::handleQueryReques
//
// Construct an AgentEvent to be sent to the application or directly handled by the agent.
//
- auto_ptr<QueryImpl> queryImpl(new QueryImpl(content));
- auto_ptr<AgentEventImpl> eventImpl(new AgentEventImpl(AGENT_AUTH_QUERY));
+ std::auto_ptr<QueryImpl> queryImpl(new QueryImpl(content));
+ std::auto_ptr<AgentEventImpl> eventImpl(new AgentEventImpl(AGENT_AUTH_QUERY));
eventImpl->setUserId(msg.getUserId());
eventImpl->setReplyTo(msg.getReplyTo());
eventImpl->setCorrelationId(msg.getCorrelationId());
@@ -1012,3 +1028,4 @@ const AgentSessionImpl& AgentSessionImpl
return *session.impl;
}
+}
Modified: qpid/branches/asyncstore/cpp/src/qmf/AgentSessionImpl.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qmf/AgentSessionImpl.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qmf/AgentSessionImpl.h (original)
+++ qpid/branches/asyncstore/cpp/src/qmf/AgentSessionImpl.h Fri Aug 3 12:13:32 2012
@@ -57,17 +57,10 @@
#include <queue>
#include <map>
-#include <iostream>
-#include <memory>
-
-using namespace std;
-using namespace qpid::messaging;
-using namespace qmf;
-using qpid::types::Variant;
-
-typedef qmf::PrivateImplRef<AgentSession> PI;
namespace qmf {
+ typedef qmf::PrivateImplRef<AgentSession> PI;
+
class AgentSessionImpl : public virtual qpid::RefCounted, public qpid::sys::Runnable {
public:
~AgentSessionImpl();
@@ -75,29 +68,29 @@ namespace qmf {
//
// Methods from API handle
//
- AgentSessionImpl(Connection& c, const string& o);
- void setDomain(const string& d) { checkOpen(); domain = d; }
- void setVendor(const string& v) { checkOpen(); attributes["_vendor"] = v; }
- void setProduct(const string& p) { checkOpen(); attributes["_product"] = p; }
- void setInstance(const string& i) { checkOpen(); attributes["_instance"] = i; }
- void setAttribute(const string& k, const qpid::types::Variant& v) { checkOpen(); attributes[k] = v; }
- const string& getName() const { return agentName; }
+ AgentSessionImpl(qpid::messaging::Connection& c, const std::string& o);
+ void setDomain(const std::string& d) { checkOpen(); domain = d; }
+ void setVendor(const std::string& v) { checkOpen(); attributes["_vendor"] = v; }
+ void setProduct(const std::string& p) { checkOpen(); attributes["_product"] = p; }
+ void setInstance(const std::string& i) { checkOpen(); attributes["_instance"] = i; }
+ void setAttribute(const std::string& k, const qpid::types::Variant& v) { checkOpen(); attributes[k] = v; }
+ const std::string& getName() const { return agentName; }
void open();
void closeAsync();
void close();
- bool nextEvent(AgentEvent& e, Duration t);
+ bool nextEvent(AgentEvent& e, qpid::messaging::Duration t);
int pendingEvents() const;
void setEventNotifier(EventNotifierImpl* eventNotifier);
EventNotifierImpl* getEventNotifier() const;
void registerSchema(Schema& s);
- DataAddr addData(Data& d, const string& n, bool persist);
+ DataAddr addData(Data& d, const std::string& n, bool persist);
void delData(const DataAddr&);
void authAccept(AgentEvent& e);
- void authReject(AgentEvent& e, const string& m);
- void raiseException(AgentEvent& e, const string& s);
+ void authReject(AgentEvent& e, const std::string& m);
+ void raiseException(AgentEvent& e, const std::string& s);
void raiseException(AgentEvent& e, const Data& d);
void response(AgentEvent& e, const Data& d);
void complete(AgentEvent& e);
@@ -106,21 +99,21 @@ namespace qmf {
void raiseEvent(const Data& d, int s);
private:
- typedef map<DataAddr, Data, DataAddrCompare> DataIndex;
- typedef map<SchemaId, Schema, SchemaIdCompare> SchemaMap;
+ typedef std::map<DataAddr, Data, DataAddrCompare> DataIndex;
+ typedef std::map<SchemaId, Schema, SchemaIdCompare> SchemaMap;
mutable qpid::sys::Mutex lock;
qpid::sys::Condition cond;
- Connection connection;
- Session session;
- Sender directSender;
- Sender topicSender;
- string domain;
- Variant::Map attributes;
- Variant::Map options;
- string agentName;
+ qpid::messaging::Connection connection;
+ qpid::messaging::Session session;
+ qpid::messaging::Sender directSender;
+ qpid::messaging::Sender topicSender;
+ std::string domain;
+ qpid::types::Variant::Map attributes;
+ qpid::types::Variant::Map options;
+ std::string agentName;
bool opened;
- queue<AgentEvent> eventQueue;
+ std::queue<AgentEvent> eventQueue;
EventNotifierImpl* eventNotifier;
qpid::sys::Thread* thread;
bool threadCanceled;
@@ -140,25 +133,25 @@ namespace qmf {
bool strictSecurity;
uint32_t maxThreadWaitTime;
uint64_t schemaUpdateTime;
- string directBase;
- string topicBase;
+ std::string directBase;
+ std::string topicBase;
SchemaMap schemata;
DataIndex globalIndex;
- map<SchemaId, DataIndex, SchemaIdCompareNoHash> schemaIndex;
+ std::map<SchemaId, DataIndex, SchemaIdCompareNoHash> schemaIndex;
void checkOpen();
void setAgentName();
void enqueueEvent(const AgentEvent&);
void alertEventNotifierLH(bool readable);
- void handleLocateRequest(const Variant::List& content, const Message& msg);
- void handleMethodRequest(const Variant::Map& content, const Message& msg);
- void handleQueryRequest(const Variant::Map& content, const Message& msg);
+ void handleLocateRequest(const qpid::types::Variant::List& content, const qpid::messaging::Message& msg);
+ void handleMethodRequest(const qpid::types::Variant::Map& content, const qpid::messaging::Message& msg);
+ void handleQueryRequest(const qpid::types::Variant::Map& content, const qpid::messaging::Message& msg);
void handleSchemaRequest(AgentEvent&);
- void handleV1SchemaRequest(qpid::management::Buffer&, uint32_t, const Message&);
- void dispatch(Message);
+ void handleV1SchemaRequest(qpid::management::Buffer&, uint32_t, const qpid::messaging::Message&);
+ void dispatch(qpid::messaging::Message);
void sendHeartbeat();
- void send(Message, const Address&);
+ void send(qpid::messaging::Message, const qpid::messaging::Address&);
void flushResponses(AgentEvent&, bool);
void periodicProcessing(uint64_t);
void run();
Modified: qpid/branches/asyncstore/cpp/src/qmf/ConsoleSessionImpl.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qmf/ConsoleSessionImpl.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qmf/ConsoleSessionImpl.h (original)
+++ qpid/branches/asyncstore/cpp/src/qmf/ConsoleSessionImpl.h Fri Aug 3 12:13:32 2012
@@ -47,8 +47,6 @@
#include <map>
#include <queue>
-using namespace std;
-
namespace qmf {
class ConsoleSessionImpl : public virtual qpid::RefCounted, public qpid::sys::Runnable {
public:
Modified: qpid/branches/asyncstore/cpp/src/qmf/EventNotifierImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qmf/EventNotifierImpl.cpp?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qmf/EventNotifierImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qmf/EventNotifierImpl.cpp Fri Aug 3 12:13:32 2012
@@ -21,6 +21,8 @@
#include "qmf/AgentSessionImpl.h"
#include "qmf/ConsoleSessionImpl.h"
+namespace qmf {
+
EventNotifierImpl::EventNotifierImpl(AgentSession& agentSession)
: readable(false), agent(agentSession)
{
@@ -54,3 +56,5 @@ bool EventNotifierImpl::isReadable() con
{
return this->readable;
}
+
+}
Modified: qpid/branches/asyncstore/cpp/src/qmf/PrivateImplRef.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qmf/PrivateImplRef.h?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qmf/PrivateImplRef.h (original)
+++ qpid/branches/asyncstore/cpp/src/qmf/PrivateImplRef.h Fri Aug 3 12:13:32 2012
@@ -76,15 +76,15 @@ template <class T> class PrivateImplRef
/** Set the implementation pointer in a handle */
static void set(T& t, const intrusive_ptr& p) {
if (t.impl == p) return;
- if (t.impl) boost::intrusive_ptr_release(t.impl);
+ if (t.impl) intrusive_ptr_release(t.impl);
t.impl = p.get();
- if (t.impl) boost::intrusive_ptr_add_ref(t.impl);
+ if (t.impl) intrusive_ptr_add_ref(t.impl);
}
// Helper functions to implement the ctor, dtor, copy, assign
- static void ctor(T& t, Impl* p) { t.impl = p; if (p) boost::intrusive_ptr_add_ref(p); }
+ static void ctor(T& t, Impl* p) { t.impl = p; if (p) intrusive_ptr_add_ref(p); }
static void copy(T& t, const T& x) { if (&t == &x) return; t.impl = 0; assign(t, x); }
- static void dtor(T& t) { if(t.impl) boost::intrusive_ptr_release(t.impl); }
+ static void dtor(T& t) { if(t.impl) intrusive_ptr_release(t.impl); }
static T& assign(T& t, const T& x) { set(t, get(x)); return t;}
};
Propchange: qpid/branches/asyncstore/cpp/src/qmf/engine/Agent.cpp
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp:r1333988-1368650
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org