qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1578827 - in /qpid/branches/java-broker-bdb-ha2: ./ qpid/ qpid/cpp/src/ qpid/cpp/src/qpid/messaging/amqp/ qpid/cpp/src/qpid/sys/windows/ qpid/java/ qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/ qpid/java/bdbstor...
Date Tue, 18 Mar 2014 11:31:53 GMT
Author: kwall
Date: Tue Mar 18 11:31:52 2014
New Revision: 1578827

URL: http://svn.apache.org/r1578827
Log:

NO-JIRA: Merged changes from trunk with command:

svn merge https://svn.apache.org/repos/asf/qpid/trunk


Added:
    qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/QpidConfig.cmake.in
      - copied unchanged from r1578815, qpid/trunk/qpid/cpp/src/QpidConfig.cmake.in
    qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/QpidConfigVersion.cmake.in
      - copied unchanged from r1578815, qpid/trunk/qpid/cpp/src/QpidConfigVersion.cmake.in
    qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/PerfTestConstants.java
      - copied unchanged from r1578815, qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/PerfTestConstants.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/qpid-perftests-systests/
      - copied from r1578815, qpid/trunk/qpid/java/qpid-perftests-systests/
Removed:
    qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/src/test/java/org/apache/qpid/systest/
    qpid/branches/java-broker-bdb-ha2/qpid/java/release-docs/
Modified:
    qpid/branches/java-broker-bdb-ha2/   (props changed)
    qpid/branches/java-broker-bdb-ha2/qpid/   (props changed)
    qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/   (props changed)
    qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/CMakeLists.txt   (contents, props changed)
    qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/amqp.cmake
    qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp
    qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp
    qpid/branches/java-broker-bdb-ha2/qpid/java/   (props changed)
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/pom.xml
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/build.xml
    qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/pom.xml
    qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/pom.xml
    qpid/branches/java-broker-bdb-ha2/qpid/java/qpid-systests-parent/pom.xml
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/pom.xml
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java

Propchange: qpid/branches/java-broker-bdb-ha2/
------------------------------------------------------------------------------
  Merged /qpid/trunk:r1576683-1578815

Propchange: qpid/branches/java-broker-bdb-ha2/qpid/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid:r1576683-1578815

Propchange: qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/cpp/src:r1576683-1578815

Modified: qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/CMakeLists.txt?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/CMakeLists.txt Tue Mar 18 11:31:52 2014
@@ -1084,7 +1084,7 @@ set (qpidmessaging_SOURCES
 add_msvc_version (qpidmessaging library dll)
 
 add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES})
-target_link_libraries (qpidmessaging qpidtypes qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}" ${PROTON_LIBRARIES})
+target_link_libraries (qpidmessaging qpidtypes qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}" ${Proton_LIBRARIES})
 set_target_properties (qpidmessaging PROPERTIES
                        LINK_FLAGS "${HIDE_SYMBOL_FLAGS} ${LINK_VERSION_SCRIPT_FLAG}"
                        COMPILE_FLAGS "${HIDE_SYMBOL_FLAGS}"
@@ -1373,7 +1373,7 @@ set (prefix ${CMAKE_INSTALL_PREFIX})
 set (exec_prefix ${CMAKE_INSTALL_PREFIX})
 set_absolute_install_path (libdir ${QPID_INSTALL_LIBDIR})
 set_absolute_install_path (includedir ${QPID_INSTALL_INCLUDEDIR})
-set (VERSION ${QPID_VERSION})
+set (VERSION ${QPID_VERSION_FULL})
 
 #add_custom_target(pkgconfig ALL echo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
 #add_dependencies(pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc)
@@ -1382,3 +1382,23 @@ configure_file(qmf2.pc.in ${CMAKE_CURREN
 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc
          DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig
          COMPONENT ${QPID_COMPONENT_COMMON})
+
+if (DEFINED CMAKE_IMPORT_LIBRARY_PREFIX)
+set(QPIDMSGLIB ${CMAKE_IMPORT_LIBRARY_PREFIX}qpidmessaging${CMAKE_IMPORT_LIBRARY_SUFFIX})
+set(QPIDMSGLIBDEBUG ${CMAKE_IMPORT_LIBRARY_PREFIX}qpidmessaging${CMAKE_DEBUG_POSTFIX}${CMAKE_IMPORT_LIBRARY_SUFFIX})
+set(QPIDTYPESLIB ${CMAKE_IMPORT_LIBRARY_PREFIX}qpidtypes${CMAKE_IMPORT_LIBRARY_SUFFIX})
+set(QPIDTYPESLIBDEBUG ${CMAKE_IMPORT_LIBRARY_PREFIX}qpidtypes${CMAKE_DEBUG_POSTFIX}${CMAKE_IMPORT_LIBRARY_SUFFIX})
+else ()
+set(QPIDMSGLIB ${CMAKE_SHARED_LIBRARY_PREFIX}qpidmessaging${CMAKE_SHARED_LIBRARY_SUFFIX})
+set(QPIDMSGLIBDEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}qpidmessaging${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
+set(QPIDTYPESLIB ${CMAKE_SHARED_LIBRARY_PREFIX}qpidtypes${CMAKE_SHARED_LIBRARY_SUFFIX})
+set(QPIDTYPESLIBDEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}qpidtypes${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
+endif ()
+
+configure_file(QpidConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/QpidConfig.cmake @ONLY)
+configure_file(QpidConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/QpidConfigVersion.cmake @ONLY)
+install (FILES
+         ${CMAKE_CURRENT_BINARY_DIR}/QpidConfig.cmake
+         ${CMAKE_CURRENT_BINARY_DIR}/QpidConfigVersion.cmake
+         DESTINATION ${QPID_INSTALL_LIBDIR}/cmake/Qpid
+         COMPONENT ${QPID_COMPONENT_COMMON})

Propchange: qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/CMakeLists.txt
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/cpp/src/CMakeLists.txt:r1576683-1578815

Modified: qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/amqp.cmake
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/amqp.cmake?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/amqp.cmake (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/amqp.cmake Tue Mar 18 11:31:52 2014
@@ -19,61 +19,30 @@
 
 # Optional AMQP1.0 support. Requires proton toolkit.
 
-include(FindPkgConfig)
-
-pkg_check_modules(PROTON libqpid-proton)
-
-if (NOT PROTON_FOUND)
-    # if pkg-config is absent or fails to find proton then use
-    # PROTON_ROOT command line option or environment variable to locate
-    # local installed proton build.
-    if (NOT PROTON_ROOT)
-        set (PROTON_ROOT "$ENV{PROTON_ROOT}")
-    endif()
-    if (PROTON_ROOT)
-        find_package(proton PATHS ${PROTON_ROOT} NO_DEFAULT_PATH)
-
-        if (proton_FOUND EQUAL 1)
-            set(iFile "${PROTON_ROOT}/lib/proton.cmake/libqpid-proton.cmake")
-            if(EXISTS ${iFile})
-                include("${iFile}")
-            else()
-                message(FATAL_ERROR "PROTON_ROOT defined but file ${iFile} is missing")
-            endif()
-        else()
-            message(FATAL_ERROR "Proton package files not found in ${PROTON_ROOT}")
-        endif()
-    endif()
-endif()
+find_package(Proton 0.5)
 
 set (amqp_default ${amqp_force})
-set (minimum_version 0.5)
 set (maximum_version 0.6)
-if (PROTON_FOUND)
-    if (PROTON_VERSION LESS ${minimum_version})
-        message(STATUS "Qpid proton ${PROTON_VERSION} is too old, require ${minimum_version} - ${maximum_version}; amqp 1.0 support not enabled")
-    else (PROTON_VERSION LESS ${minimum_version})
-        if (PROTON_VERSION GREATER ${maximum_version})
-            message(STATUS "Qpid proton ${PROTON_VERSION} is too new, require ${minimum_version} - ${maximum_version}; amqp 1.0 support not enabled")
-        else (PROTON_VERSION GREATER ${maximum_version})
-            message(STATUS "Qpid proton found, amqp 1.0 support enabled")
-            set (amqp_default ON)
-            #remove when 0.5 no longer supported
-            if (NOT PROTON_VERSION EQUAL 0.5)
-               set (HAVE_PROTON_TRACER 1)
-            endif (NOT PROTON_VERSION EQUAL 0.5)
-        endif (PROTON_VERSION GREATER ${maximum_version})
-    endif (PROTON_VERSION LESS ${minimum_version})
-else (PROTON_FOUND)
+if (Proton_FOUND)
+    if (Proton_VERSION GREATER ${maximum_version})
+        message(WARNING "Qpid proton ${Proton_VERSION} is not a tested version and might not be compatible, ${maximum_version} is highest tested; build may not work")
+    endif (Proton_VERSION GREATER ${maximum_version})
+    message(STATUS "Qpid proton found, amqp 1.0 support enabled")
+    set (amqp_default ON)
+    #remove when 0.5 no longer supported
+    if (NOT Proton_VERSION EQUAL 0.5)
+        set (HAVE_PROTON_TRACER 1)
+    endif (NOT Proton_VERSION EQUAL 0.5)
+else ()
     message(STATUS "Qpid proton not found, amqp 1.0 support not enabled")
-endif (PROTON_FOUND)
+endif ()
 
 option(BUILD_AMQP "Build with support for AMQP 1.0" ${amqp_default})
 if (BUILD_AMQP)
 
-    if (NOT PROTON_FOUND)
+    if (NOT Proton_FOUND)
       message(FATAL_ERROR "Qpid proton not found, required for amqp 1.0 support")
-    endif (NOT PROTON_FOUND)
+    endif ()
 
     set (amqp_SOURCES
          qpid/broker/amqp/Authorise.h
@@ -129,11 +98,10 @@ if (BUILD_AMQP)
          qpid/broker/amqp/Translation.cpp
         )
 
-    include_directories(${PROTON_INCLUDE_DIRS})
-    link_directories(${PROTON_LIBRARY_DIRS})
+    include_directories(${Proton_INCLUDE_DIRS})
 
     add_library (amqp MODULE ${amqp_SOURCES})
-    target_link_libraries (amqp qpidtypes qpidbroker qpidcommon ${PROTON_LIBRARIES} ${Boost_PROGRAM_OPTIONS_LIBRARY})
+    target_link_libraries (amqp qpidtypes qpidbroker qpidcommon ${Proton_LIBRARIES} ${Boost_PROGRAM_OPTIONS_LIBRARY})
     set_target_properties (amqp PROPERTIES
                            PREFIX ""
                            LINK_FLAGS "${CATCH_UNDEFINED}"
@@ -173,18 +141,6 @@ if (BUILD_AMQP)
     if (WIN32)
         list (APPEND amqp_SOURCES qpid/messaging/amqp/windows/SslTransport.cpp)
         list (APPEND amqpc_SOURCES qpid/messaging/amqp/windows/SslTransport.cpp)
-
-        set(proton_dll  "${PROTON_LIBRARY_DIRS}/${PROTON_LIBRARIES}.dll")
-        set(proton_dlld "${PROTON_LIBRARY_DIRS}/${PROTON_LIBRARIES}d.dll")
-
-        install (PROGRAMS  ${proton_dll}
-                DESTINATION ${QPID_INSTALL_BINDIR}
-                COMPONENT   ${QPID_COMPONENT_COMMON}
-                CONFIGURATIONS Release|MinSizeRel|RelWithDebInfo)
-        install (PROGRAMS  ${proton_dlld}
-                DESTINATION ${QPID_INSTALL_BINDIR}
-                COMPONENT   ${QPID_COMPONENT_COMMON}
-                CONFIGURATIONS Debug)
     endif (WIN32)
 else (BUILD_AMQP)
     # ensure that qpid build ignores proton

Modified: qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp Tue Mar 18 11:31:52 2014
@@ -31,7 +31,13 @@ namespace amqp {
 namespace {
 ConnectionImpl* create(const std::string& u, const qpid::types::Variant::Map& o)
 {
-    return new ConnectionHandle(u, o);
+    try {
+        return new ConnectionHandle(u, o);
+    } catch (const types::Exception& ) {
+        throw;
+    } catch (const qpid::Exception& e) {
+        throw messaging::ConnectionError( e.what() );
+    }
 }
 
 struct StaticInit

Modified: qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp Tue Mar 18 11:31:52 2014
@@ -79,7 +79,9 @@ void FileSysDir::forEachFile(Callback cb
     // process everything that isn't a directory
     do {
         if (!(findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
-            std::string fileName(findFileData.cFileName);
+            std::string fileName(dirPath);
+            fileName += "\\";
+            fileName += findFileData.cFileName;
             cb(fileName);
         }
     } while (FindNextFile(hFind, &findFileData) != 0);

Propchange: qpid/branches/java-broker-bdb-ha2/qpid/java/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java:r1576683-1578815

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java Tue Mar 18 11:31:52 2014
@@ -760,12 +760,6 @@ public class BDBMessageStore implements 
     }
 
     @Override
-    public void update(ConfiguredObjectRecord... records) throws StoreException
-    {
-        update(false, records);
-    }
-
-    @Override
     public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException
     {
         com.sleepycat.je.Transaction txn = _environmentFacade.getEnvironment().beginTransaction(null, null);

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java Tue Mar 18 11:31:52 2014
@@ -24,6 +24,8 @@ import java.io.IOException;
 import java.io.StringWriter;
 import java.util.Map;
 import java.util.UUID;
+
+import org.apache.qpid.server.model.ConfiguredObject;
 import org.apache.qpid.server.store.ConfiguredObjectRecord;
 
 import com.sleepycat.bind.tuple.TupleBinding;
@@ -31,14 +33,42 @@ import com.sleepycat.bind.tuple.TupleInp
 import com.sleepycat.bind.tuple.TupleOutput;
 import org.apache.qpid.server.store.StoreException;
 import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.JsonGenerator;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.Version;
 import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.JsonSerializer;
+import org.codehaus.jackson.map.Module;
 import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializerProvider;
+import org.codehaus.jackson.map.module.SimpleModule;
 
 public class ConfiguredObjectBinding extends TupleBinding<ConfiguredObjectRecord>
 {
     private static final ConfiguredObjectBinding INSTANCE = new ConfiguredObjectBinding(null);
+
     private final UUID _uuid;
 
+    private static final Module _module;
+    static
+    {
+        SimpleModule module= new SimpleModule("ConfiguredObjectSerializer", new Version(1,0,0,null));
+
+        final JsonSerializer<ConfiguredObject> serializer = new JsonSerializer<ConfiguredObject>()
+        {
+            @Override
+            public void serialize(final ConfiguredObject value,
+                                  final JsonGenerator jgen,
+                                  final SerializerProvider provider)
+                    throws IOException, JsonProcessingException
+            {
+                jgen.writeString(value.getId().toString());
+            }
+        };
+        module.addSerializer(ConfiguredObject.class, serializer);
+
+        _module = module;
+    }
 
     public static ConfiguredObjectBinding getInstance()
     {
@@ -74,7 +104,9 @@ public class ConfiguredObjectBinding ext
         try
         {
             StringWriter writer = new StringWriter();
-            new ObjectMapper().writeValue(writer, object.getAttributes());
+            final ObjectMapper objectMapper = new ObjectMapper();
+            objectMapper.registerModule(_module);
+            objectMapper.writeValue(writer, object.getAttributes());
             tupleOutput.writeString(object.getType());
             tupleOutput.writeString(writer.toString());
         }

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/pom.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/pom.xml?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/pom.xml (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/pom.xml Tue Mar 18 11:31:52 2014
@@ -67,8 +67,4 @@
     </dependency>
   </dependencies>
 
-  <build>
-    <testSourceDirectory>src/main/java</testSourceDirectory>
-  </build>
-
 </project>

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java Tue Mar 18 11:31:52 2014
@@ -55,6 +55,7 @@ import org.apache.qpid.server.virtualhos
 
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
@@ -582,7 +583,13 @@ public abstract class AbstractExchange<T
                                   final AMQQueue queue,
                                   final Map<String, Object> arguments)
     {
-        return makeBinding(getBinding(bindingKey,queue).getId(), bindingKey, queue, arguments, false, true);
+        final BindingImpl existingBinding = getBinding(bindingKey, queue);
+        return makeBinding(existingBinding == null ? null : existingBinding.getId(),
+                           bindingKey,
+                           queue,
+                           arguments,
+                           false,
+                           true);
     }
 
     @Override
@@ -642,8 +649,6 @@ public abstract class AbstractExchange<T
                                 boolean restore,
                                 boolean force)
     {
-        assert queue != null;
-
         if (bindingKey == null)
         {
             bindingKey = "";
@@ -660,7 +665,16 @@ public abstract class AbstractExchange<T
                                                    bindingKey,
                                                    _virtualHost.getName());
         }
-        BindingImpl b = new BindingImpl(id, bindingKey, queue, this, arguments);
+
+        Map<String,Object> attributes = new HashMap<String, Object>();
+        attributes.put(org.apache.qpid.server.model.Binding.NAME,bindingKey);
+        if(arguments != null)
+        {
+            attributes.put(org.apache.qpid.server.model.Binding.ARGUMENTS, arguments);
+        }
+
+        BindingImpl b = new BindingImpl(id, attributes, queue, this);
+
         BindingImpl existingMapping = _bindingsMap.putIfAbsent(new BindingIdentifier(bindingKey,queue), b);
         if (existingMapping == null || force)
         {

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java Tue Mar 18 11:31:52 2014
@@ -84,8 +84,18 @@ public abstract class AbstractConfigured
 
     private final Map<String, Object> _defaultAttributes = new HashMap<String, Object>();
     private final TaskExecutor _taskExecutor;
-    private final long _createdTime;
-    private final String _createdBy;
+
+    @ManagedAttributeField
+    private long _createdTime;
+
+    @ManagedAttributeField
+    private String _createdBy;
+
+    @ManagedAttributeField
+    private long _lastUpdatedTime;
+
+    @ManagedAttributeField
+    private String _lastUpdatedBy;
 
     @ManagedAttributeField
     private String _name;
@@ -197,8 +207,18 @@ public abstract class AbstractConfigured
                 }
             }
         }
-        _createdTime = MapValueConverter.getLongAttribute(CREATED_TIME, attributes, System.currentTimeMillis());
-        _createdBy = MapValueConverter.getStringAttribute(CREATED_BY, attributes, getCurrentUserName());
+        if(!_attributes.containsKey(CREATED_BY))
+        {
+            final AuthenticatedPrincipal currentUser = SecurityManager.getCurrentUser();
+            if(currentUser != null)
+            {
+                _attributes.put(CREATED_BY, currentUser);
+            }
+        }
+        if(!_attributes.containsKey(CREATED_TIME))
+        {
+            _attributes.put(CREATED_TIME, System.currentTimeMillis());
+        }
         for(Attribute<?,?> attr : _attributeTypes.values())
         {
             if(attr.getAnnotation().mandatory() && !(attributes.containsKey(attr.getName())|| defaults.containsKey(attr.getName())))
@@ -334,6 +354,17 @@ public abstract class AbstractConfigured
 
     protected void attributeSet(String attributeName, Object oldAttributeValue, Object newAttributeValue)
     {
+
+        final AuthenticatedPrincipal currentUser = SecurityManager.getCurrentUser();
+        if(currentUser != null)
+        {
+            _attributes.put(LAST_UPDATED_BY, currentUser.getName());
+            _lastUpdatedBy = currentUser.getName();
+        }
+        final long currentTime = System.currentTimeMillis();
+        _attributes.put(LAST_UPDATED_TIME, currentTime);
+        _lastUpdatedTime = currentTime;
+
         synchronized (_changeListeners)
         {
             List<ConfigurationChangeListener> copy = new ArrayList<ConfigurationChangeListener>(_changeListeners);
@@ -678,13 +709,13 @@ public abstract class AbstractConfigured
     @Override
     public String getLastUpdatedBy()
     {
-        return null;
+        return _lastUpdatedBy;
     }
 
     @Override
     public long getLastUpdatedTime()
     {
-        return 0;
+        return _lastUpdatedTime;
     }
 
     @Override

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java Tue Mar 18 11:31:52 2014
@@ -91,11 +91,6 @@ public class KeyStoreAdapter extends Abs
                                    _certificateAlias, _keyManagerFactoryAlgorithm);
     }
 
-    @Override
-    public String getDescription()
-    {
-        return null;
-    }
 
     @Override
     public Collection<String> getAttributeNames()

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java Tue Mar 18 11:31:52 2014
@@ -2871,7 +2871,8 @@ public abstract class AbstractQueue
         if(childClass == Binding.class && otherParents.length == 1 && otherParents[0] instanceof Exchange)
         {
             final String bindingKey = (String) attributes.get("name");
-            ((ExchangeImpl)otherParents[0]).addBinding(bindingKey, this, attributes);
+            ((ExchangeImpl)otherParents[0]).addBinding(bindingKey, this,
+                                                       (Map<String,Object>) attributes.get(Binding.ARGUMENTS));
             for(Binding binding : _bindings)
             {
                 if(binding.getExchange() == otherParents[0] && binding.getName().equals(bindingKey))

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java Tue Mar 18 11:31:52 2014
@@ -34,6 +34,7 @@ import org.apache.qpid.server.security.a
 import org.apache.qpid.server.security.access.ObjectType;
 import org.apache.qpid.server.security.access.Operation;
 import org.apache.qpid.server.security.access.OperationLoggingDetails;
+import org.apache.qpid.server.security.auth.AuthenticatedPrincipal;
 import org.apache.qpid.server.security.auth.TaskPrincipal;
 
 import javax.security.auth.Subject;
@@ -64,6 +65,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
 public class SecurityManager implements ConfigurationChangeListener
@@ -183,6 +185,29 @@ public class SecurityManager implements 
         return !(subject == null  || subject.getPrincipals(SystemPrincipal.class).isEmpty());
     }
 
+    public static AuthenticatedPrincipal getCurrentUser()
+    {
+        Subject subject = Subject.getSubject(AccessController.getContext());
+        final AuthenticatedPrincipal user;
+        if(subject != null)
+        {
+            Set<AuthenticatedPrincipal> principals = subject.getPrincipals(AuthenticatedPrincipal.class);
+            if(principals != null && !principals.isEmpty())
+            {
+                user = principals.iterator().next();
+            }
+            else
+            {
+                user = null;
+            }
+        }
+        else
+        {
+            user = null;
+        }
+        return user;
+    }
+
     private static final class SystemPrincipal implements Principal
     {
         private SystemPrincipal()

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java Tue Mar 18 11:31:52 2014
@@ -44,13 +44,21 @@ import java.util.concurrent.atomic.Atomi
 import java.util.concurrent.atomic.AtomicLong;
 import org.apache.log4j.Logger;
 import org.apache.qpid.server.message.EnqueueableMessage;
+import org.apache.qpid.server.model.ConfiguredObject;
 import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.server.plugin.MessageMetaDataType;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.JsonGenerator;
 import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.Version;
 import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.JsonSerializer;
+import org.codehaus.jackson.map.Module;
 import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializerProvider;
+import org.codehaus.jackson.map.module.SimpleModule;
 
 abstract public class AbstractJDBCMessageStore implements MessageStore, DurableConfigurationStore
 {
@@ -160,6 +168,28 @@ abstract public class AbstractJDBCMessag
 
     protected static final Charset UTF8_CHARSET = Charset.forName("UTF-8");
 
+
+    private static final Module _module;
+    static
+    {
+        SimpleModule module= new SimpleModule("ConfiguredObjectSerializer", new Version(1,0,0,null));
+
+        final JsonSerializer<ConfiguredObject> serializer = new JsonSerializer<ConfiguredObject>()
+        {
+            @Override
+            public void serialize(final ConfiguredObject value,
+                                  final JsonGenerator jgen,
+                                  final SerializerProvider provider)
+                    throws IOException, JsonProcessingException
+            {
+                jgen.writeString(value.getId().toString());
+            }
+        };
+        module.addSerializer(ConfiguredObject.class, serializer);
+
+        _module = module;
+    }
+
     protected final EventManager _eventManager = new EventManager();
 
     protected final StateManager _stateManager;
@@ -1994,7 +2024,10 @@ abstract public class AbstractJDBCMessag
                                     else
                                     {
                                         final Map<String, Object> attributes = configuredObject.getAttributes();
-                                        byte[] attributesAsBytes = new ObjectMapper().writeValueAsBytes(attributes);
+                                        final ObjectMapper objectMapper = new ObjectMapper();
+                                        objectMapper.registerModule(_module);
+                                        byte[] attributesAsBytes = objectMapper.writeValueAsBytes(attributes);
+
                                         ByteArrayInputStream bis = new ByteArrayInputStream(attributesAsBytes);
                                         insertStmt.setBinaryStream(3, bis, attributesAsBytes.length);
                                     }
@@ -2129,12 +2162,6 @@ abstract public class AbstractJDBCMessag
         }
     }
 
-    @Override
-    public void update(ConfiguredObjectRecord... records) throws StoreException
-    {
-        update(false, records);
-    }
-
     public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException
     {
         if (_stateManager.isInState(State.ACTIVE) || _stateManager.isInState(State.ACTIVATING))
@@ -2176,6 +2203,8 @@ abstract public class AbstractJDBCMessag
                 ResultSet rs = stmt.executeQuery();
                 try
                 {
+                    final ObjectMapper objectMapper = new ObjectMapper();
+                    objectMapper.registerModule(_module);
                     if (rs.next())
                     {
                         PreparedStatement stmt2 = conn.prepareStatement(UPDATE_CONFIGURED_OBJECTS);
@@ -2184,7 +2213,7 @@ abstract public class AbstractJDBCMessag
                             stmt2.setString(1, configuredObject.getType());
                             if (configuredObject.getAttributes() != null)
                             {
-                                byte[] attributesAsBytes = (new ObjectMapper()).writeValueAsBytes(
+                                byte[] attributesAsBytes = objectMapper.writeValueAsBytes(
                                         configuredObject.getAttributes());
                                 ByteArrayInputStream bis = new ByteArrayInputStream(attributesAsBytes);
                                 stmt2.setBinaryStream(2, bis, attributesAsBytes.length);
@@ -2215,7 +2244,7 @@ abstract public class AbstractJDBCMessag
                             else
                             {
                                 final Map<String, Object> attributes = configuredObject.getAttributes();
-                                byte[] attributesAsBytes = new ObjectMapper().writeValueAsBytes(attributes);
+                                byte[] attributesAsBytes = objectMapper.writeValueAsBytes(attributes);
                                 ByteArrayInputStream bis = new ByteArrayInputStream(attributesAsBytes);
                                 insertStmt.setBinaryStream(3, bis, attributesAsBytes.length);
                             }

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java Tue Mar 18 11:31:52 2014
@@ -86,7 +86,6 @@ public interface DurableConfigurationSto
     void update(UUID id, String type, Map<String, Object> attributes) throws StoreException;
 
 
-    public void update(ConfiguredObjectRecord... records) throws StoreException;
     public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException;
 
 

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java Tue Mar 18 11:31:52 2014
@@ -20,6 +20,7 @@
  */
 package org.apache.qpid.server.store;
 
+import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
@@ -32,10 +33,14 @@ import java.util.Set;
 import org.apache.qpid.server.binding.BindingImpl;
 import org.apache.qpid.server.exchange.ExchangeImpl;
 import org.apache.qpid.server.model.Binding;
+import org.apache.qpid.server.model.ConfiguredObject;
 import org.apache.qpid.server.model.Exchange;
 import org.apache.qpid.server.model.LifetimePolicy;
 import org.apache.qpid.server.model.Queue;
 import org.apache.qpid.server.queue.AMQQueue;
+import org.apache.qpid.server.security.*;
+
+import javax.security.auth.Subject;
 
 public class DurableConfigurationStoreHelper
 {
@@ -47,41 +52,25 @@ public class DurableConfigurationStoreHe
 
     public static void updateQueue(DurableConfigurationStore store, AMQQueue queue)
     {
-        Map<String, Object> attributesMap = new LinkedHashMap<String, Object>();
-
-        if (queue.getAlternateExchange() != null)
+        Map<String, Object> attributesMap = queue.getActualAttributes();
+        attributesMap.remove(ConfiguredObject.ID);
+        if(queue.getAlternateExchange() != null)
         {
             attributesMap.put(Queue.ALTERNATE_EXCHANGE, queue.getAlternateExchange().getId());
         }
-
-        Collection<String> availableAttrs = queue.getAvailableAttributes();
-
-        for(String attrName : availableAttrs)
-        {
-            if(!QUEUE_ARGUMENTS_EXCLUDES.contains(attrName))
-            {
-                attributesMap.put(attrName, queue.getAttribute(attrName));
-            }
-        }
-
         store.update(queue.getId(), QUEUE, attributesMap);
     }
 
     public static void createQueue(DurableConfigurationStore store, AMQQueue<?> queue)
     {
-        Map<String, Object> attributesMap = new HashMap<String, Object>();
-        if (queue.getAlternateExchange() != null)
+
+        Map<String, Object> attributesMap = queue.getActualAttributes();
+        attributesMap.remove(ConfiguredObject.ID);
+        if(queue.getAlternateExchange() != null)
         {
             attributesMap.put(Queue.ALTERNATE_EXCHANGE, queue.getAlternateExchange().getId());
         }
 
-        for(String attrName : queue.getAvailableAttributes())
-        {
-            if(!QUEUE_ARGUMENTS_EXCLUDES.contains(attrName))
-            {
-                attributesMap.put(attrName, queue.getAttribute(attrName));
-            }
-        }
         store.create(queue.getId(), QUEUE, attributesMap);
     }
 
@@ -92,11 +81,8 @@ public class DurableConfigurationStoreHe
 
     public static void createExchange(DurableConfigurationStore store, ExchangeImpl exchange)
     {
-        Map<String, Object> attributesMap = new HashMap<String, Object>();
-        attributesMap.put(Exchange.NAME, exchange.getName());
-        attributesMap.put(Exchange.TYPE, exchange.getTypeName());
-        attributesMap.put(Exchange.LIFETIME_POLICY, exchange.isAutoDelete() ? LifetimePolicy.DELETE_ON_NO_OUTBOUND_LINKS.name()
-                : LifetimePolicy.PERMANENT.name());
+        Map<String, Object> attributesMap = exchange.getActualAttributes();
+        attributesMap.remove(ConfiguredObject.ID);
 
         store.create(exchange.getId(), EXCHANGE, attributesMap);
 
@@ -108,16 +94,17 @@ public class DurableConfigurationStoreHe
         store.remove(exchange.getId(), EXCHANGE);
     }
 
-    public static void createBinding(DurableConfigurationStore store, BindingImpl binding)
+    public static void createBinding(DurableConfigurationStore store, final BindingImpl binding)
     {
-        Map<String, Object> attributesMap = new HashMap<String, Object>();
-        attributesMap.put(Binding.NAME, binding.getBindingKey());
-        attributesMap.put(Binding.EXCHANGE, binding.getExchange().getId());
-        attributesMap.put(Binding.QUEUE, binding.getAMQQueue().getId());
-        Map<String, Object> arguments = binding.getArguments();
-        if (arguments != null)
+        Map<String, Object> attributesMap = binding.getActualAttributes();
+        attributesMap.remove(ConfiguredObject.ID);
+        if(!attributesMap.containsKey(Binding.EXCHANGE))
+        {
+            attributesMap.put(Binding.EXCHANGE, binding.getExchange());
+        }
+        if(!attributesMap.containsKey(Binding.QUEUE))
         {
-            attributesMap.put(Binding.ARGUMENTS, arguments);
+            attributesMap.put(Binding.QUEUE, binding.getQueue());
         }
 
         store.create(binding.getId(), BINDING, attributesMap);

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java Tue Mar 18 11:31:52 2014
@@ -464,12 +464,6 @@ public class JsonFileConfigStore impleme
     }
 
     @Override
-    public void update(final ConfiguredObjectRecord... records) throws StoreException
-    {
-        update(false, records);
-    }
-
-    @Override
     public void update(final boolean createIfNecessary, final ConfiguredObjectRecord... records)
             throws StoreException
     {

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java Tue Mar 18 11:31:52 2014
@@ -37,11 +37,6 @@ public abstract class NullMessageStore i
     }
 
     @Override
-    public void update(ConfiguredObjectRecord... records)
-    {
-    }
-
-    @Override
     public void update(boolean createIfNecessary, ConfiguredObjectRecord... records)
     {
     }

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java Tue Mar 18 11:31:52 2014
@@ -23,6 +23,7 @@ package org.apache.qpid.server.store;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyMap;
 import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.argThat;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
@@ -54,6 +55,7 @@ import org.apache.qpid.server.store.Tran
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.util.FileUtils;
 import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatcher;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
@@ -200,7 +202,31 @@ public abstract class AbstractDurableCon
         map.put(org.apache.qpid.server.model.Binding.ARGUMENTS,_bindingArgs);
 
         verify(_recoveryHandler).configuredObject(eq(binding.getId()), eq(BINDING),
-                eq(map));
+                                                  argThat(new IgnoreCreatedByMatcher(map)));
+    }
+
+    private static class IgnoreCreatedByMatcher extends ArgumentMatcher<Map<String,Object>>
+    {
+        private final Map<String,Object> _matchingMap;
+
+        private IgnoreCreatedByMatcher(final Map<String, Object> matchingMap)
+        {
+            _matchingMap = matchingMap;
+        }
+
+        @Override
+        public boolean matches(final Object argument)
+        {
+            if(argument instanceof Map)
+            {
+                Map<String,Object> arg = new HashMap<String, Object>((Map<String,Object>) argument);
+                arg.remove("createdBy");
+                arg.remove("createdTime");
+                return arg.equals(_matchingMap);
+
+            }
+            return false;
+        }
     }
 
     public void testUnbindQueue() throws Exception
@@ -372,6 +398,10 @@ public abstract class AbstractDurableCon
         when(queue.getVirtualHost()).thenReturn(vh);
         final Map<String,Object> attributes = arguments == null ? new LinkedHashMap<String, Object>() : new LinkedHashMap<String, Object>(arguments);
         attributes.put(Queue.NAME, queueName);
+        if(alternateExchange != null)
+        {
+            attributes.put(Queue.ALTERNATE_EXCHANGE, alternateExchange);
+        }
         if(exclusive)
         {
             when(queue.getOwner()).thenReturn(queueOwner);
@@ -393,16 +423,24 @@ public abstract class AbstractDurableCon
                         }
                     });
 
+        when(queue.getActualAttributes()).thenReturn(attributes);
         return queue;
     }
 
     private ExchangeImpl createTestExchange()
     {
         ExchangeImpl exchange = mock(ExchangeImpl.class);
+        Map<String,Object> actualAttributes = new HashMap<String, Object>();
+        actualAttributes.put("id", _exchangeId);
+        actualAttributes.put("name", getName());
+        actualAttributes.put("type", getName() + "Type");
+        actualAttributes.put("lifetimePolicy", LifetimePolicy.DELETE_ON_NO_OUTBOUND_LINKS);
+        when(exchange.getActualAttributes()).thenReturn(actualAttributes);
         when(exchange.getName()).thenReturn(getName());
         when(exchange.getTypeName()).thenReturn(getName() + "Type");
         when(exchange.isAutoDelete()).thenReturn(true);
         when(exchange.getId()).thenReturn(_exchangeId);
+
         return exchange;
     }
 

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java Tue Mar 18 11:31:52 2014
@@ -53,6 +53,7 @@ import org.mockito.invocation.Invocation
 import org.mockito.stubbing.Answer;
 
 import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyBoolean;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doThrow;
@@ -338,7 +339,8 @@ public class DurableConfigurationRecover
                                                                          "x-filter-jms-selector",
                                                                          "wibble"));
 
-        doThrow(new RuntimeException("Update Should not be called")).when(_store).update(any(ConfiguredObjectRecord[].class));
+        doThrow(new RuntimeException("Update Should not be called"))
+                .when(_store).update(anyBoolean(), any(ConfiguredObjectRecord[].class));
 
         _durableConfigurationRecoverer.completeConfigurationRecovery();
     }
@@ -442,12 +444,13 @@ public class DurableConfigurationRecover
             public Object answer(InvocationOnMock invocation) throws Throwable
             {
                 Object[] args = invocation.getArguments();
+                final HashSet actual = new HashSet(Arrays.asList(args[1]));
                 assertEquals("Updated records are not as expected", new HashSet(Arrays.asList(
-                        expected)), new HashSet(Arrays.asList(args)));
+                        expected)), actual);
 
                 return null;
             }
-        }).when(_store).update(any(ConfiguredObjectRecord[].class));
+        }).when(_store).update(anyBoolean(), any(ConfiguredObjectRecord[].class));
     }
 
     private Map<String,Object> createBinding(String bindingKey, UUID exchangeId, UUID queueId, String... args)

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/build.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/build.xml?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/build.xml (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/build.xml Tue Mar 18 11:31:52 2014
@@ -36,7 +36,7 @@
 
   <property name="modules.core"       value="qpid-test-utils common management/common amqp-1-0-common broker-core broker client amqp-1-0-client amqp-1-0-client-jms amqp-1-0-client-websocket tools"/>
   <property name="modules.examples"   value="client/example management/example amqp-1-0-client/example amqp-1-0-client-jms/example"/>
-  <property name="modules.tests"      value="systests perftests"/>
+  <property name="modules.tests"      value="systests perftests qpid-perftests-systests"/>
   <property name="modules.plugin"     value="${broker-plugins} ${client-plugins}"/>
   <property name="modules.jca"        value="jca"/>
   <property name="modules"            value="${modules.core} ${modules.examples}

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/pom.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/pom.xml?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/pom.xml (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/pom.xml Tue Mar 18 11:31:52 2014
@@ -20,19 +20,14 @@
 
   <parent>
     <groupId>org.apache.qpid</groupId>
-    <artifactId>qpid-systests-parent</artifactId>
+    <artifactId>qpid-java-build</artifactId>
     <version>0.28-SNAPSHOT</version>
-    <relativePath>../qpid-systests-parent/pom.xml</relativePath>
   </parent>
 
   <artifactId>qpid-perftests</artifactId>
   <name>Qpid Performance Tests</name>
   <description>Performance testing configuration, code and tests</description>
 
-  <properties>
-    <test.systest.resource.directory>${basedir}/../systests</test.systest.resource.directory>
-  </properties>
-
   <dependencies>
     <!-- client deps -->
     <dependency>
@@ -77,13 +72,6 @@
     <!-- test deps -->
     <dependency>
       <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-systests</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
       <artifactId>qpid-test-utils</artifactId>
       <version>${project.version}</version>
       <scope>test</scope>
@@ -91,6 +79,19 @@
   </dependencies>
 
   <build>
+
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+      </resource>
+      <resource>
+        <directory>src/main/java</directory>
+        <excludes>
+          <exclude>**/*.java/</exclude>
+        </excludes>
+      </resource>
+    </resources>
+
     <testResources>
       <testResource>
         <directory>src/test/java</directory>

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java Tue Mar 18 11:31:52 2014
@@ -19,8 +19,8 @@
  */
 package org.apache.qpid.disttest.controller;
 
-import static org.apache.qpid.systest.disttest.SystemTestConstants.COMMAND_RESPONSE_TIMEOUT;
-import static org.apache.qpid.systest.disttest.SystemTestConstants.REGISTRATION_TIMEOUT;
+import static org.apache.qpid.disttest.PerfTestConstants.COMMAND_RESPONSE_TIMEOUT;
+import static org.apache.qpid.disttest.PerfTestConstants.REGISTRATION_TIMEOUT;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Matchers.isA;

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/pom.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/pom.xml?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/pom.xml (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/pom.xml Tue Mar 18 11:31:52 2014
@@ -38,6 +38,13 @@
     <url>http://svn.apache.org/viewvc/qpid/trunk/qpid/java</url>
   </scm>
 
+  <distributionManagement>
+    <site>
+      <id>${project.artifactId}-site</id>
+      <url>${project.baseUri}</url>
+    </site>
+  </distributionManagement>
+
   <properties>
     <!-- javac source/target properties -->
     <java.source>1.6</java.source>
@@ -101,6 +108,7 @@
     <module>qpid-test-utils</module>
     <module>systests</module>
     <module>perftests</module>
+    <module>qpid-perftests-systests</module>
 
     <module>perftests/visualisation-jfc</module>
     <module>bdbstore</module>
@@ -323,6 +331,13 @@
       <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>build/**</exclude>
+            <exclude>lib/**</exclude>
+            <exclude>test-profiles/test_resources/ssl/**</exclude>
+          </excludes>
+        </configuration>
       </plugin>
 
     </plugins>
@@ -359,6 +374,15 @@
             </reports>
           </reportSet>
         </reportSets>
+        <configuration>
+          <alwaysGenerateSurefireReport>false</alwaysGenerateSurefireReport>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>${maven-jxr-plugin-version}</version>
       </plugin>
 
       <plugin>
@@ -371,6 +395,13 @@
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
         <version>${apache-rat-plugin-version}</version>
+        <configuration>
+          <excludes>
+            <exclude>build/**</exclude>
+            <exclude>lib/**</exclude>
+            <exclude>test-profiles/test_resources/ssl/**</exclude>
+          </excludes>
+        </configuration>
       </plugin>
 
     </plugins>

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/qpid-systests-parent/pom.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/qpid-systests-parent/pom.xml?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/qpid-systests-parent/pom.xml (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/qpid-systests-parent/pom.xml Tue Mar 18 11:31:52 2014
@@ -39,6 +39,8 @@
     <test.working.directory>${basedir}/..</test.working.directory>
     <test.resource.directory>${basedir}/..</test.resource.directory>
     <test.systest.resource.directory>${basedir}</test.systest.resource.directory>
+    <!-- Jacoco skip workaround -->
+    <argLine></argLine>
   </properties>
 
   <dependencies>
@@ -70,6 +72,8 @@
   </dependencies>
 
   <build>
+    <testSourceDirectory>src/main/java</testSourceDirectory>
+
     <resources>
       <resource>
         <directory>src/main/resources</directory>
@@ -204,7 +208,27 @@
 
         </executions>
       </plugin>
+
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <configuration>
+            <skip>true</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <configuration>
+            <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
 </project>

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/systests/pom.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/systests/pom.xml?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/systests/pom.xml (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/systests/pom.xml Tue Mar 18 11:31:52 2014
@@ -185,8 +185,4 @@
 
   </dependencies>
 
-  <build>
-    <testSourceDirectory>src/main/java</testSourceDirectory>
-  </build>
-
 </project>

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java?rev=1578827&r1=1578826&r2=1578827&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java Tue Mar 18 11:31:52 2014
@@ -213,14 +213,6 @@ public class SlowMessageStore implements
     }
 
     @Override
-    public void update(ConfiguredObjectRecord... records) throws StoreException
-    {
-        doPreDelay("update");
-        _durableConfigurationStore.update(records);
-        doPostDelay("update");
-    }
-
-    @Override
     public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException
     {
         doPreDelay("update");



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message