qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kp...@apache.org
Subject svn commit: r1377715 [11/12] - in /qpid/branches/asyncstore: ./ bin/ cpp/ cpp/docs/api/ cpp/examples/old_api/tradedemo/ cpp/include/qmf/engine/ cpp/include/qpid/client/ cpp/src/ cpp/src/qmf/engine/ cpp/src/qpid/acl/ cpp/src/qpid/asyncStore/ cpp/src/qpi...
Date Mon, 27 Aug 2012 15:40:45 GMT
Modified: qpid/branches/asyncstore/doc/book/src/java-broker/images/HA-2N-SplitBrain.svg
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/doc/book/src/java-broker/images/HA-2N-SplitBrain.svg?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/doc/book/src/java-broker/images/HA-2N-SplitBrain.svg (original)
+++ qpid/branches/asyncstore/doc/book/src/java-broker/images/HA-2N-SplitBrain.svg Mon Aug 27 15:40:33 2012
@@ -1,3 +1,23 @@
 <?xml version="1.0"?>
+<!--
+ 
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+ 
+   http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ 
+-->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="-20 -16 598 591" width="598pt" height="591pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2012-05-31 06:19Z</dc:date><!-- Produced by OmniGraffle Professional 5.3.6 --></metadata><defs><radialGradient cx="0" cy="0" r="1" id="Gradient" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset=".5" stop-color="#b5d0ea"/><stop offset="1" stop-color="#aaa"/></radialGradient><radialGradient id="Obj_Gradient" xl:href="#Gradient" gradientTransform="translate(200.35501 136.5) scale(145.18695)"/><linearGradient x1="0" x2="1" id="Gradient_2" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset="1" stop-color="#2824aa"/></linearGradient><linearGradient id="Obj_Gradient_2" xl:href="#Gradient_2" gradientTransform="translate(212.855 146) rotate(90) scale(69)"/><linearGradient x1="0" x2="1" id="Gradient_3" gradientUnits
 ="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset="1" stop-color="#0caa25"/></linearGradient><linearGradient id="Obj_Gradient_3" xl:href="#Gradient_3" gradientTransform="translate(212.85451 162.5) rotate(90) scale(36)"/><linearGradient x1="0" x2="1" id="Gradient_4" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset="1" stop-color="#6923aa"/></linearGradient><linearGradient id="Obj_Gradient_4" xl:href="#Gradient_4" gradientTransform="translate(80.355003 111) rotate(90) scale(24)"/><linearGradient id="Obj_Gradient_5" xl:href="#Gradient_2" gradientTransform="translate(195.355 59.999996) rotate(90) scale(69.000007)"/><linearGradient x1="0" x2="1" id="Gradient_5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset="1" stop-color="#aa172d"/></linearGradient><linearGradient id="Obj_Gradient_6" xl:href="#Gradient_5" gradientTransform="translate(195.35451 78) rotate(90) scale(36)"/><marker orient="auto" over
 flow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-1 -3 6 6" markerWidth="6" markerHeight="6" color="black"><g><path d="M 3.7333333 0 L 0 -1.4 L 0 1.4 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="Arrow_Marker" viewBox="-1 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M 8 0 L 0 -3 L 0 3 Z" fill="none" stroke="currentColor" stroke-width="1"/></g></marker><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="532.22656" cap-height="719.72656" ascent="770.01953" descent="-229.98047" font-weight="bold"><font-face-src><font-face-name name="Helvetica-Bold"/></font-face-src></font-face><radialGradient id="Obj_Gradient_7" xl:href="#Gradient" gradientTransform="translate(468.855 133.5) scale(145.18695)"/><linearGradient id="Obj_Gradient_8" x
 l:href="#Gradient_2" gradientTransform="translate(486.355 141.5) rotate(90) scale(69)"/><linearGradient x1="0" x2="1" id="Gradient_6" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset="1" stop-color="#6ead6a"/></linearGradient><linearGradient id="Obj_Gradient_9" xl:href="#Gradient_6" gradientTransform="translate(486.3545 158) rotate(90) scale(36)"/><linearGradient id="Obj_Gradient_10" xl:href="#Gradient_4" gradientTransform="translate(348.565 85) rotate(90) scale(24)"/><radialGradient cx="0" cy="0" r="1" id="Gradient_7" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset=".5" stop-color="#ea061f"/><stop offset="1" stop-color="#aaa"/></radialGradient><radialGradient id="Obj_Gradient_11" xl:href="#Gradient_7" gradientTransform="translate(483.56808 132.68761) scale(20.071926)"/><linearGradient id="Obj_Gradient_12" xl:href="#Gradient_2" gradientTransform="translate(465.01501 51.445) rotate(90) scale(69)"/><linearGradien
 t x1="0" x2="1" id="Gradient_8" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset="1" stop-color="#b6b4b5"/></linearGradient><linearGradient id="Obj_Gradient_13" xl:href="#Gradient_8" gradientTransform="translate(465.0145 67.945) rotate(90) scale(36)"/><font-face font-family="Arial Unicode MS" font-size="36" panose-1="2 11 6 4 2 2 2 2 2 4" units-per-em="1000" underline-position="-100.097656" underline-thickness="49.804688" slope="0" x-height="529.78516" cap-height="728.02734" ascent="1068.84766" descent="-270.9961" font-weight="500"><font-face-src><font-face-name name="ArialUnicodeMS"/></font-face-src></font-face><radialGradient id="Obj_Gradient_14" xl:href="#Gradient" gradientTransform="translate(180.29001 414.5) scale(145.18695)"/><linearGradient id="Obj_Gradient_15" xl:href="#Gradient_2" gradientTransform="translate(172.37 337) rotate(90) scale(69)"/><linearGradient x1="0" x2="1" id="Gradient_9" gradientUnits="userSpaceOnUse"><stop offset="0
 " stop-color="white"/><stop offset="1" stop-color="#66ab61"/></linearGradient><linearGradient id="Obj_Gradient_16" xl:href="#Gradient_9" gradientTransform="translate(172.36951 351.5) rotate(90) scale(36)"/><linearGradient id="Obj_Gradient_17" xl:href="#Gradient_4" gradientTransform="translate(53.18649 396) rotate(90) scale(24)"/><linearGradient id="Obj_Gradient_18" xl:href="#Gradient_2" gradientTransform="translate(180.953 426.5) rotate(90) scale(69)"/><linearGradient x1="0" x2="1" id="Gradient_10" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="white"/><stop offset="1" stop-color="#21aa1a"/></linearGradient><linearGradient id="Obj_Gradient_19" xl:href="#Gradient_10" gradientTransform="translate(180.9525 443) rotate(90) scale(36)"/><radialGradient id="Obj_Gradient_20" xl:href="#Gradient_7" gradientTransform="translate(185.10121 416.23209) scale(20.071926)"/><font-face font-family="Arial Unicode MS" font-size="72" panose-1="2 11 6 4 2 2 2 2 2 4" units-per-em="1000
 " underline-position="-100.097656" underline-thickness="49.804688" slope="0" x-height="529.78516" cap-height="728.02734" ascent="1068.84766" descent="-270.9961" font-weight="500"><font-face-src><font-face-name name="ArialUnicodeMS"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Canvas 6</title><g><title>Layer 1</title><rect x="0" y="0" width="278" height="273" fill="white"/><rect x="0" y="0" width="278" height="273" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 146.38904 149.98122 C 122.79251 136.5 132.20221 23.010353 169.84393 42.375 C 173.33626 4.6271057 217.1085 10.754013 216.82236 42.375 C 244.26889 1.931366 279.34393 82.575165 255.81749 123.01879 C 284.04803 142.62691 255.46124 248.27281 232.29251 230.625 C 230.43831 260.03967 189.01958 270.33319 185.38417 230.625 C 161.930725 273.03143 113.02657 207.82918 146.38904 149.98122 Z" fill="url(#Ob
 j_Gradient)"/><path d="M 146.38904 149.98122 C 122.79251 136.5 132.20221 23.010353 169.84393 42.375 C 173.33626 4.6271057 217.1085 10.754013 216.82236 42.375 C 244.26889 1.931366 279.34393 82.575165 255.81749 123.01879 C 284.04803 142.62691 255.46124 248.27281 232.29251 230.625 C 230.43831 260.03967 189.01958 270.33319 185.38417 230.625 C 161.930725 273.03143 113.02657 207.82918 146.38904 149.98122 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="179.355" y="146" width="67" height="69" fill="url(#Obj_Gradient_2)"/><rect x="179.355" y="146" width="67" height="69" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 192.524 180.5 L 202.68925 162.5 L 223.01976 162.5 L 233.18501 180.5 L 223.01976 198.5 L 202.68925 198.5 Z" fill="url(#Obj_Gradient_3)"/><path d="M 192.524 180.5 L 202.68925 162.5 L 223.01976 162.5 L 233.18501 180.5 L 223.01976 198.5 L 202.68925 198.5 Z" stroke="black" stroke-linecap="r
 ound" stroke-linejoin="round" stroke-width="1"/><path d="M 69.855003 111 L 90.855003 111 C 93.339005 111 95.355003 116.376 95.355003 123 C 95.355003 129.62399 93.339005 135 90.855003 135 L 69.855003 135 C 67.371002 135 65.355003 129.62399 65.355003 123 C 65.355003 116.376 67.371002 111 69.855003 111" fill="url(#Obj_Gradient_4)"/><path d="M 69.855003 111 L 90.855003 111 C 93.339005 111 95.355003 116.376 95.355003 123 C 95.355003 129.62399 93.339005 135 90.855003 135 L 69.855003 135 C 67.371002 135 65.355003 129.62399 65.355003 123 C 65.355003 116.376 67.371002 111 69.855003 111" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="161.855" y="60" width="67" height="69" fill="url(#Obj_Gradient_5)"/><rect x="161.855" y="60" width="67" height="69" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 175.024 96 L 185.18925 78 L 205.51976 78 L 215.68501 96 L 205.51976 114 L 185.18925 114 Z" fill="url(#Obj_Gr
 adient_6)"/><path d="M 175.024 96 L 185.18925 78 L 205.51976 78 L 215.68501 96 L 205.51976 114 L 185.18925 114 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 83 135 C 87.728355 147.33211 78.882416 164.66258 97.186493 172 C 112.61268 178.18378 147.33044 177.27293 176.94928 178.23598" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/><path d="M 222.38084 162.05576 C 227.03842 153.03807 238.59448 143.85422 236.355 135 C 234.66139 128.303986 225.07715 121.79347 216.5538 115.25858" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(285 6)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="bold" x=".16308594" y="11" textLength="6.673828">2</tspan></text><rect x="279.64499" y="0" width="278.00003" height="273" fill="white"/><rect x="279.64499" y="0" width="278.
 00003" height="273" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 414.88904 146.98122 C 391.2925 133.5 400.7022 20.010353 438.34393 39.375 C 441.83624 1.6271057 485.60852 7.754013 485.32236 39.375 C 512.76892 -1.06863403 547.84393 79.575165 524.3175 120.01879 C 552.54803 139.62691 523.96124 245.27281 500.7925 227.625 C 498.93832 257.03967 457.51956 267.33319 453.88416 227.625 C 430.43073 270.03143 381.52658 204.82918 414.88904 146.98122 Z" fill="url(#Obj_Gradient_7)"/><path d="M 414.88904 146.98122 C 391.2925 133.5 400.7022 20.010353 438.34393 39.375 C 441.83624 1.6271057 485.60852 7.754013 485.32236 39.375 C 512.76892 -1.06863403 547.84393 79.575165 524.3175 120.01879 C 552.54803 139.62691 523.96124 245.27281 500.7925 227.625 C 498.93832 257.03967 457.51956 267.33319 453.88416 227.625 C 430.43073 270.03143 381.52658 204.82918 414.88904 146.98122 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><r
 ect x="452.855" y="141.5" width="66.99997" height="69" fill="url(#Obj_Gradient_8)"/><rect x="452.855" y="141.5" width="66.99997" height="69" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 466.024 176 L 476.18924 158 L 496.51974 158 L 506.685 176 L 496.51974 194 L 476.18924 194 Z" fill="url(#Obj_Gradient_9)"/><path d="M 466.024 176 L 476.18924 158 L 496.51974 158 L 506.685 176 L 496.51974 194 L 476.18924 194 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 338.065 85 L 359.065 85 C 361.54901 85 363.565 90.376 363.565 97 C 363.565 103.624 361.54901 109 359.065 109 L 338.065 109 C 335.581 109 333.565 103.624 333.565 97 C 333.565 90.376 335.581 85 338.065 85" fill="url(#Obj_Gradient_10)"/><path d="M 338.065 85 L 359.065 85 C 361.54901 85 363.565 90.376 363.565 97 C 363.565 103.624 361.54901 109 359.065 109 L 338.065 109 C 335.581 109 333.565 103.624 333.565 97 C 333.565 90.376 335.581 85 338
 .065 85" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 353.37662 109.46646 C 359.1055 124.30949 351.54587 143.50909 370.565 154 C 386.66068 162.87834 421.80042 165.52399 451.8061 169.84834" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/><path d="M 470.9274 125.16071 L 480.5343 133.763016 L 472.91028 144.58757 L 475.98358 148.27911 L 484.31168 136.56943 L 493.17505 144.515656 L 496.20877 140.214615 L 486.60178 131.07477 L 494.69186 121.39724 L 490.1412 117.09611 L 483.06238 127.84885 L 474.9724 119.246674 Z" fill="url(#Obj_Gradient_11)"/><path d="M 470.9274 125.16071 L 480.5343 133.763016 L 472.91028 144.58757 L 475.98358 148.27911 L 484.31168 136.56943 L 493.17505 144.515656 L 496.20877 140.214615 L 486.60178 131.07477 L 494.69186 121.39724 L 490.1412 117.09611 L 483.06238 127.84885 L 474.9724 119.246674 Z" stroke="black" stroke-linecap="round" stroke-linejoin=
 "round" stroke-width="1"/><rect x="431.51501" y="51.445" width="67" height="69" fill="url(#Obj_Gradient_12)"/><rect x="431.51501" y="51.445" width="67" height="69" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 444.684 85.945 L 454.84924 67.945 L 475.17975 67.945 L 485.345 85.945 L 475.17975 103.945 L 454.84924 103.945 Z" fill="url(#Obj_Gradient_13)"/><path d="M 444.684 85.945 L 454.84924 67.945 L 475.17975 67.945 L 485.345 85.945 L 475.17975 103.945 L 454.84924 103.945 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 485.18884 157.50099 C 484.6743 149.33481 485.7887 141.847626 483.645 133 C 482.1737 126.92762 479.1671 120.211914 476.20593 113.515625" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(496 56.5)" fill="#262626"><tspan font-family="Arial Unicode MS" font-size="36" font-weight="500" fill
 ="#262626" x="0" y="38" textLength="36">♛</tspan></text><text transform="translate(6 6)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="bold" x=".16308594" y="11" textLength="6.673828">1</tspan></text><rect x="0" y="278" width="278" height="273" fill="white"/><rect x="0" y="278" width="278" height="273" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 126.32403 427.9812 C 102.72751 414.5 112.13721 301.01035 149.77893 320.375 C 153.27126 282.6271 197.0435 288.75403 196.75735 320.375 C 224.20389 279.93137 259.27893 360.57516 235.75249 401.0188 C 263.98303 420.62692 235.39624 526.27283 212.22751 508.625 C 210.37331 538.03967 168.95457 548.3332 165.31917 508.625 C 141.86572 551.03143 92.96157 485.82916 126.32403 427.9812 Z" fill="url(#Obj_Gradient_14)"/><path d="M 126.32403 427.9812 C 102.72751 414.5 112.13721 301.01035 149.77893 320.375 C 153.27126 282.6271 197.0435 288.75403 196.75735 320.375 C 224.20389 2
 79.93137 259.27893 360.57516 235.75249 401.0188 C 263.98303 420.62692 235.39624 526.27283 212.22751 508.625 C 210.37331 538.03967 168.95457 548.3332 165.31917 508.625 C 141.86572 551.03143 92.96157 485.82916 126.32403 427.9812 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="138.869995" y="337" width="67" height="69" fill="url(#Obj_Gradient_15)"/><rect x="138.869995" y="337" width="67" height="69" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 152.039 369.5 L 162.20425 351.5 L 182.53476 351.5 L 192.70001 369.5 L 182.53476 387.5 L 162.20425 387.5 Z" fill="url(#Obj_Gradient_16)"/><path d="M 152.039 369.5 L 162.20425 351.5 L 182.53476 351.5 L 192.70001 369.5 L 182.53476 387.5 L 162.20425 387.5 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 42.68649 396 L 63.68649 396 C 66.170486 396 68.186493 401.376 68.186493 408 C 68.186493 414.624 66.170486 42
 0 63.68649 420 L 42.68649 420 C 40.202488 420 38.18649 414.624 38.18649 408 C 38.18649 401.376 40.202488 396 42.68649 396" fill="url(#Obj_Gradient_17)"/><path d="M 42.68649 396 L 63.68649 396 C 66.170486 396 68.186493 401.376 68.186493 408 C 68.186493 414.624 66.170486 420 63.68649 420 L 42.68649 420 C 40.202488 420 38.18649 414.624 38.18649 408 C 38.18649 401.376 40.202488 396 42.68649 396" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="147.453" y="426.5" width="67" height="69" fill="url(#Obj_Gradient_18)"/><rect x="147.453" y="426.5" width="67" height="69" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 160.62199 461 L 170.78725 443 L 191.11775 443 L 201.283 461 L 191.11775 479 L 170.78725 479 Z" fill="url(#Obj_Gradient_19)"/><path d="M 160.62199 461 L 170.78725 443 L 191.11775 443 L 201.283 461 L 191.11775 479 L 170.78725 479 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round
 " stroke-width="1"/><path d="M 64.073936 420.37445 C 71.881844 429.24875 71.228394 440.71005 87.5 447 C 100.49186 452.02213 124.27972 453.7499 145.93179 456.12848" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/><path d="M 61.40507 395.58307 C 67.269463 386.72293 63.968967 373.3653 79 369 C 90.933815 365.53418 114.428574 367.73508 135.71434 368.85406" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/><text transform="translate(6 286)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="bold" x=".16308594" y="11" textLength="6.673828">3</tspan></text><path d="M 172.46051 408.7052 L 182.06741 417.3075 L 174.4434 428.13205 L 177.51671 431.82358 L 185.8448 420.1139 L 194.70818 428.06015 L 197.74191 423.7591 L 188.1349 414.61926 L 196.22501 404.9417 L 191.67433 400.6406 L 184.59552 411.39334 L 176.50554 402.79114 Z" fill="ur
 l(#Obj_Gradient_20)"/><path d="M 172.46051 408.7052 L 182.06741 417.3075 L 174.4434 428.13205 L 177.51671 431.82358 L 185.8448 420.1139 L 194.70818 428.06015 L 197.74191 423.7591 L 188.1349 414.61926 L 196.22501 404.9417 L 191.67433 400.6406 L 184.59552 411.39334 L 176.50554 402.79114 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 186.722 441.046 C 186.20738 432.87949 187.32178 425.39178 185.17799 416.544 C 183.70665 410.47153 180.69995 403.75586 177.73871 397.05966" marker-end="url(#Arrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(19.372978 273)" fill="black"><tspan font-family="Arial Unicode MS" font-size="72" font-weight="500" x="0" y="77" textLength="54">☠</tspan></text></g></g></svg>

Modified: qpid/branches/asyncstore/doc/book/src/programming/Programming-In-Apache-Qpid-Book.xml
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/doc/book/src/programming/Programming-In-Apache-Qpid-Book.xml?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/doc/book/src/programming/Programming-In-Apache-Qpid-Book.xml (original)
+++ qpid/branches/asyncstore/doc/book/src/programming/Programming-In-Apache-Qpid-Book.xml Mon Aug 27 15:40:33 2012
@@ -3317,7 +3317,7 @@ spout - -content "$(cat rdu.xml | sed -e
 		  integer
 	        </entry>
 	        <entry>
-		  Length of time to wait before attempting to reconnect (in milliseconds). Defaults to 0.
+		  Length of time (in milliseconds) to wait before attempting to reconnect. Defaults to 0.
 	        </entry>
 	      </row>
 	      <row>
@@ -3328,7 +3328,7 @@ spout - -content "$(cat rdu.xml | sed -e
 		  integer
 	        </entry>
 	        <entry>
-		  Length of time to wait for the connection to succeed (in milliseconds).  Defaults to 30000.
+		  Length of time (in milliseconds) to wait for the socket connection to succeed. A value of 0 represents an infinite timeout, i.e. the connection attempt will block until established or an error occurs.  Defaults to 30000.
 	        </entry>
 	      </row>
 	      <row>

Modified: qpid/branches/asyncstore/extras/qmf/src/py/qmf/console.py
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/extras/qmf/src/py/qmf/console.py?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/extras/qmf/src/py/qmf/console.py (original)
+++ qpid/branches/asyncstore/extras/qmf/src/py/qmf/console.py Mon Aug 27 15:40:33 2012
@@ -2443,6 +2443,8 @@ class Broker(Thread):
       uid = self.conn.user_id
       if uid.__class__ == tuple and len(uid) == 2:
         self.saslUser = uid[1]
+      elif type(uid) is str:
+        self.saslUser = uid;
       else:
         self.saslUser = None
 

Propchange: qpid/branches/asyncstore/java/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java:r1368652-1375508

Modified: qpid/branches/asyncstore/java/.gitignore
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/.gitignore?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/.gitignore (original)
+++ qpid/branches/asyncstore/java/.gitignore Mon Aug 27 15:40:33 2012
@@ -1,2 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
 *.swp
 eclipse-projects/*

Propchange: qpid/branches/asyncstore/java/amqp-1-0-client/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-client:r1368652-1375508

Propchange: qpid/branches/asyncstore/java/amqp-1-0-client-jms/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-client-jms:r1368652-1375508

Modified: qpid/branches/asyncstore/java/amqp-1-0-client-jms/build.xml
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/amqp-1-0-client-jms/build.xml?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/amqp-1-0-client-jms/build.xml (original)
+++ qpid/branches/asyncstore/java/amqp-1-0-client-jms/build.xml Mon Aug 27 15:40:33 2012
@@ -22,8 +22,19 @@
 
   <property name="module.genpom" value="true"/>
   <property name="module.depends" value="amqp-1-0-common amqp-1-0-client"/>
+  <property name="module.genpom.args" value="-Sgeronimo-jms_1.1_spec=provided"/>
 
 
+  <target name="release-bin-copy-readme">
+      <copy todir="${module.release}" overwrite="true" failonerror="true">
+          <fileset file="${basedir}/README.txt" />
+      </copy>
+  </target>
+
+  <target name="release-bin-other" depends="release-bin-copy-readme"/>
+
+  <target name="release-bin" depends="release-bin-tasks"/>
+
   <import file="../module.xml"/>
 
 </project>

Propchange: qpid/branches/asyncstore/java/amqp-1-0-common/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-common:r1368652-1375508

Propchange: qpid/branches/asyncstore/java/broker/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker:r1368652-1375508

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java Mon Aug 27 15:40:33 2012
@@ -16,9 +16,9 @@
  */
 package org.apache.qpid.server.management.plugin.servlet.rest;
 
+import java.io.BufferedWriter;
 import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.SocketAddress;
+import java.io.Writer;
 import java.util.*;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
@@ -49,6 +49,8 @@ public class RestServlet extends Abstrac
 
     private volatile boolean initializationRequired = false;
 
+    private final ConfiguredObjectToMapConverter _objectConverter = new ConfiguredObjectToMapConverter();
+
     public RestServlet()
     {
         super();
@@ -133,7 +135,7 @@ public class RestServlet extends Abstrac
 
         for(int i = 0; i < _hierarchy.length; i++)
         {
-            if(i == 0 || Model.getChildTypes(_hierarchy[i - 1]).contains(_hierarchy[i]))
+            if(i == 0 || Model.getInstance().getChildTypes(_hierarchy[i - 1]).contains(_hierarchy[i]))
             {
 
                 for(ConfiguredObject parent : parents)
@@ -257,7 +259,7 @@ public class RestServlet extends Abstrac
                                                                 ConfiguredObject child)
     {
         Collection<ConfiguredObject> ancestors = new HashSet<ConfiguredObject>();
-        Collection<Class<? extends ConfiguredObject>> parentTypes = Model.getParentTypes(childType);
+        Collection<Class<? extends ConfiguredObject>> parentTypes = Model.getInstance().getParentTypes(childType);
 
         for(Class<? extends ConfiguredObject> parentClazz : parentTypes)
         {
@@ -282,119 +284,33 @@ public class RestServlet extends Abstrac
         return ancestors;
     }
 
-
-    protected Map<String, Object> convertObjectToMap(final ConfiguredObject confObject,
-                                                     Class<? extends  ConfiguredObject> clazz,
-                                                     int depth)
-    {
-        Map<String, Object> object = new LinkedHashMap<String, Object>();
-
-        for(String name : confObject.getAttributeNames())
-        {
-            Object value = confObject.getAttribute(name);
-            if(value instanceof ConfiguredObject)
-            {
-                object.put(name, ((ConfiguredObject) value).getName());
-            }
-            else if(value != null)
-            {
-                object.put(name, value);
-            }
-        }
-
-        Statistics statistics = confObject.getStatistics();
-        Map<String, Object> statMap = new HashMap<String, Object>();
-        for(String name : statistics.getStatisticNames())
-        {
-            Object value = statistics.getStatistic(name);
-            if(value != null)
-            {
-                statMap.put(name, value);
-            }
-        }
-
-        if(!statMap.isEmpty())
-        {
-            object.put("statistics", statMap);
-        }
-
-        if(depth > 0)
-        {
-            for(Class<? extends ConfiguredObject> childClass : Model.getChildTypes(clazz))
-            {
-                Collection<? extends ConfiguredObject> children = confObject.getChildren(childClass);
-                if(children != null)
-                {
-                    List<Map<String, Object>> childObjects = new ArrayList<Map<String, Object>>();
-
-                    for(ConfiguredObject child : children)
-                    {
-                        childObjects.add(convertObjectToMap(child, childClass, depth-1));
-                    }
-
-                    if(!childObjects.isEmpty())
-                    {
-                        object.put(childClass.getSimpleName().toLowerCase()+"s",childObjects);
-                    }
-                }
-            }
-        }
-        return object;
-    }
-
     @Override
     protected void onGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
     {
         response.setContentType("application/json");
         response.setStatus(HttpServletResponse.SC_OK);
 
-        response.setHeader("Cache-Control","no-cache");
-        response.setHeader("Pragma","no-cache");
-        response.setDateHeader ("Expires", 0);
+        setCachingHeadersOnResponse(response);
 
         Collection<ConfiguredObject> allObjects = getObjects(request);
 
-        @SuppressWarnings("unchecked")
-        Map params = new HashMap(request.getParameterMap());
-
-        int depth = 1;
-        try
-        {
-            depth = Integer.parseInt(String.valueOf(params.remove("depth")));
-        }
-        catch (NumberFormatException e)
-        {
-            // Ignore
-        }
+        // TODO - sort special params, everything else should act as a filter
+        int depth = getDepthParameterFromRequest(request);
 
         List<Map<String, Object>> output = new ArrayList<Map<String, Object>>();
-
-        // TODO - depth and sort special params, everything else should act as a filter
-        if(request.getParameter(DEPTH_PARAM)!=null)
-        {
-            try
-            {
-                depth = Integer.parseInt(request.getParameter(DEPTH_PARAM));
-            }
-            catch (NumberFormatException e)
-            {
-
-            }
-        }
-
         for(ConfiguredObject configuredObject : allObjects)
         {
-            output.add(convertObjectToMap(configuredObject, getConfiguredClass(),depth));
+            output.add(_objectConverter.convertObjectToMap(configuredObject, getConfiguredClass(),
+                    depth));
         }
 
-        final PrintWriter writer = response.getWriter();
+        final Writer writer = new BufferedWriter(response.getWriter());
         ObjectMapper mapper = new ObjectMapper();
         mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
         mapper.writeValue(writer, output);
 
         response.setContentType("application/json");
         response.setStatus(HttpServletResponse.SC_OK);
-
     }
 
     private Class<? extends ConfiguredObject> getConfiguredClass()
@@ -462,7 +378,7 @@ public class RestServlet extends Abstrac
                 {
                     for(int j = i-1; j >=0; j--)
                     {
-                        if(Model.getChildTypes(_hierarchy[j]).contains(_hierarchy[i]))
+                        if(Model.getInstance().getChildTypes(_hierarchy[j]).contains(_hierarchy[i]))
                         {
                             for(ConfiguredObject parent : objects[j])
                             {
@@ -482,7 +398,7 @@ public class RestServlet extends Abstrac
             }
             List<ConfiguredObject> parents = new ArrayList<ConfiguredObject>();
             Class<? extends ConfiguredObject> objClass = getConfiguredClass();
-            Collection<Class<? extends ConfiguredObject>> parentClasses = Model.getParentTypes(objClass);
+            Collection<Class<? extends ConfiguredObject>> parentClasses = Model.getInstance().getParentTypes(objClass);
             for(int i = _hierarchy.length-2; i >=0 ; i--)
             {
                 if(parentClasses.contains(_hierarchy[i]))
@@ -565,9 +481,7 @@ public class RestServlet extends Abstrac
         response.setContentType("application/json");
         response.setStatus(HttpServletResponse.SC_OK);
 
-        response.setHeader("Cache-Control","no-cache");
-        response.setHeader("Pragma","no-cache");
-        response.setDateHeader ("Expires", 0);
+        setCachingHeadersOnResponse(response);
         try
         {
             Collection<ConfiguredObject> allObjects = getObjects(request);
@@ -583,4 +497,31 @@ public class RestServlet extends Abstrac
             setResponseStatus(response, e);
         }
     }
+
+    private void setCachingHeadersOnResponse(HttpServletResponse response)
+    {
+        response.setHeader("Cache-Control","no-cache");
+        response.setHeader("Pragma","no-cache");
+        response.setDateHeader ("Expires", 0);
+    }
+
+    private int getDepthParameterFromRequest(HttpServletRequest request)
+    {
+        int depth = 1;
+        final String depthString = request.getParameter(DEPTH_PARAM);
+        if(depthString!=null)
+        {
+            try
+            {
+                depth = Integer.parseInt(depthString);
+            }
+            catch (NumberFormatException e)
+            {
+                LOGGER.warn("Could not parse " + depthString + " as integer");
+            }
+        }
+        return depth;
+    }
+
+
 }

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/StructureServlet.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/StructureServlet.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/StructureServlet.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/StructureServlet.java Mon Aug 27 15:40:33 2012
@@ -73,7 +73,7 @@ public class StructureServlet extends Ab
         structure.put("id", object.getId());
         structure.put("name", object.getName());
 
-        for(Class<? extends ConfiguredObject> childClass : Model.getChildTypes(clazz))
+        for(Class<? extends ConfiguredObject> childClass : Model.getInstance().getChildTypes(clazz))
         {
             Collection<? extends ConfiguredObject> children = object.getChildren(childClass);
             if(children != null)

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/resources/showBroker.html
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/resources/showBroker.html?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/resources/showBroker.html (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/main/java/resources/showBroker.html Mon Aug 27 15:40:33 2012
@@ -1,3 +1,23 @@
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+ -->
 <div class="broker">
     <span>Name:</span><span class="broker-name" style="position:absolute; left:6em"></span>
     <br/>

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/AuthenticationProviderRestTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/AuthenticationProviderRestTest.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/AuthenticationProviderRestTest.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/AuthenticationProviderRestTest.java Mon Aug 27 15:40:33 2012
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
 package org.apache.qpid.server.management.plugin.servlet.rest;
 
 import java.util.List;

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/BindingRestTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/BindingRestTest.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/BindingRestTest.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/BindingRestTest.java Mon Aug 27 15:40:33 2012
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
 package org.apache.qpid.server.management.plugin.servlet.rest;
 
 import java.net.HttpURLConnection;

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ExchangeRestTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ExchangeRestTest.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ExchangeRestTest.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ExchangeRestTest.java Mon Aug 27 15:40:33 2012
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
 package org.apache.qpid.server.management.plugin.servlet.rest;
 
 import java.net.URLDecoder;

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/PortRestTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/PortRestTest.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/PortRestTest.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/PortRestTest.java Mon Aug 27 15:40:33 2012
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
 package org.apache.qpid.server.management.plugin.servlet.rest;
 
 import java.net.URLDecoder;

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/SaslRestTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/SaslRestTest.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/SaslRestTest.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/SaslRestTest.java Mon Aug 27 15:40:33 2012
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
 package org.apache.qpid.server.management.plugin.servlet.rest;
 
 import java.util.List;

Modified: qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/UserRestTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/UserRestTest.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/UserRestTest.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/UserRestTest.java Mon Aug 27 15:40:33 2012
@@ -1,3 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
 package org.apache.qpid.server.management.plugin.servlet.rest;
 
 import java.net.HttpURLConnection;

Modified: qpid/branches/asyncstore/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java (original)
+++ qpid/branches/asyncstore/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java Mon Aug 27 15:40:33 2012
@@ -22,6 +22,7 @@ package org.apache.qpid.server.jmx;
 
 import org.apache.log4j.Logger;
 
+import org.apache.qpid.server.logging.LogActor;
 import org.apache.qpid.server.logging.actors.CurrentActor;
 import org.apache.qpid.server.logging.actors.ManagementActor;
 import org.apache.qpid.server.logging.messages.ManagementConsoleMessages;
@@ -38,6 +39,7 @@ import javax.management.MBeanServer;
 import javax.management.Notification;
 import javax.management.NotificationListener;
 import javax.management.ObjectName;
+import javax.management.RuntimeErrorException;
 import javax.management.remote.JMXConnectionNotification;
 import javax.management.remote.JMXPrincipal;
 import javax.management.remote.MBeanServerForwarder;
@@ -48,6 +50,7 @@ import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.security.AccessControlContext;
 import java.security.AccessController;
+import java.util.Arrays;
 import java.util.Map;
 import java.util.Set;
 
@@ -157,77 +160,98 @@ public class MBeanInvocationHandlerImpl 
 
             // Save the subject
             SecurityManager.setThreadSubject(subject);
-
-            // Get the component, type and impact, which may be null
-            String type = getType(method, args);
-            String vhost = getVirtualHost(method, args);
-            int impact = getImpact(method, args);
-
-            // Get the security manager for the virtual host (if set)
-            SecurityManager security;
-            if (vhost == null)
+            CurrentActor.set(_logActor);
+            try
             {
-                security = _appRegistry.getSecurityManager();
+                return authoriseAndInvoke(method, args);
             }
-            else
+            finally
             {
-                security = _appRegistry.getVirtualHostRegistry().getVirtualHost(vhost).getSecurityManager();
+                CurrentActor.remove();
             }
+        }
+        catch (InvocationTargetException e)
+        {
+            Throwable targetException =  e.getCause();
+            logTargetException(method, args, targetException);
+            throw targetException;
+        }
+    }
 
-            methodName = getMethodName(method, args);
-            if (isAccessMethod(methodName) || impact == MBeanOperationInfo.INFO)
-            {
-                // Check for read-only method invocation permission
-                if (!security.authoriseMethod(Operation.ACCESS, type, methodName))
-                {
-                    throw new SecurityException("Permission denied: Access " + methodName);
-                }
-            }
-            else
-            {
-                // Check for setting properties permission
-                if (!security.authoriseMethod(Operation.UPDATE, type, methodName))
-                {
-                    throw new SecurityException("Permission denied: Update " + methodName);
-                }
-            }
+    private void logTargetException(Method method, Object[] args, Throwable targetException)
+    {
+        Throwable error = null;
+        if (targetException instanceof RuntimeErrorException)
+        {
+            error = ((RuntimeErrorException)targetException).getCause();
+        }
+        else if (targetException instanceof Error)
+        {
+            error = targetException;
+        }
+        if (error == null)
+        {
+            _logger.debug("Exception was thrown on invoking of " + method + " with arguments " + Arrays.toString(args), targetException);
+        }
+        else
+        {
+            _logger.error("Unexpected error occured on invoking of " + method + " with arguments " + Arrays.toString(args), targetException);
+        }
+    }
 
-            boolean oldAccessChecksDisabled = false;
-            if(_managementRightsInferAllAccess)
-            {
-                oldAccessChecksDisabled = SecurityManager.setAccessChecksDisabled(true);
-            }
+    private Object authoriseAndInvoke(Method method, Object[] args) throws IllegalAccessException, InvocationTargetException
+    {
+        String methodName;
+        // Get the component, type and impact, which may be null
+        String type = getType(method, args);
+        String vhost = getVirtualHost(method, args);
+        int impact = getImpact(method, args);
 
-            try
+        // Get the security manager for the virtual host (if set)
+        SecurityManager security;
+        if (vhost == null)
+        {
+            security = _appRegistry.getSecurityManager();
+        }
+        else
+        {
+            security = _appRegistry.getVirtualHostRegistry().getVirtualHost(vhost).getSecurityManager();
+        }
+
+        methodName = getMethodName(method, args);
+        if (isAccessMethod(methodName) || impact == MBeanOperationInfo.INFO)
+        {
+            // Check for read-only method invocation permission
+            if (!security.authoriseMethod(Operation.ACCESS, type, methodName))
             {
-                return doInvokeWrappingWithManagementActor(method, args);
+                throw new SecurityException("Permission denied: Access " + methodName);
             }
-            finally
+        }
+        else
+        {
+            // Check for setting properties permission
+            if (!security.authoriseMethod(Operation.UPDATE, type, methodName))
             {
-                if(_managementRightsInferAllAccess)
-                {
-                    SecurityManager.setAccessChecksDisabled(oldAccessChecksDisabled);
-                }
+                throw new SecurityException("Permission denied: Update " + methodName);
             }
         }
-        catch (InvocationTargetException e)
+
+        boolean oldAccessChecksDisabled = false;
+        if(_managementRightsInferAllAccess)
         {
-            throw e.getTargetException();
+            oldAccessChecksDisabled = SecurityManager.setAccessChecksDisabled(true);
         }
-    }
 
-    private Object doInvokeWrappingWithManagementActor(Method method,
-            Object[] args) throws IllegalAccessException,
-            InvocationTargetException
-    {
         try
         {
-            CurrentActor.set(_logActor);
             return method.invoke(_mbs, args);
         }
         finally
         {
-            CurrentActor.remove();
+            if(_managementRightsInferAllAccess)
+            {
+                SecurityManager.setAccessChecksDisabled(oldAccessChecksDisabled);
+            }
         }
     }
 
@@ -368,14 +392,17 @@ public class MBeanInvocationHandlerImpl 
             user = splitConnectionId[1];
         }
 
+        // use a separate instance of actor as subject is not set on connect/disconnect
+        // we need to pass principal name explicitly into log actor
+        LogActor logActor = new ManagementActor(_appRegistry.getRootMessageLogger(), user);
         if (JMXConnectionNotification.OPENED.equals(type))
         {
-            _logActor.message(ManagementConsoleMessages.OPEN(user));
+            logActor.message(ManagementConsoleMessages.OPEN(user));
         }
         else if (JMXConnectionNotification.CLOSED.equals(type) ||
                  JMXConnectionNotification.FAILED.equals(type))
         {
-            _logActor.message(ManagementConsoleMessages.CLOSE(user));
+            logActor.message(ManagementConsoleMessages.CLOSE(user));
         }
     }
 }

Propchange: qpid/branches/asyncstore/java/broker/bin/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/bin:r1368652-1375508

Modified: qpid/branches/asyncstore/java/broker/etc/broker_example.acl
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/etc/broker_example.acl?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/etc/broker_example.acl (original)
+++ qpid/branches/asyncstore/java/broker/etc/broker_example.acl Mon Aug 27 15:40:33 2012
@@ -18,6 +18,7 @@
 #
 
 ### EXAMPLE ACL V2 FILE
+### NOTE: Rules are considered from top to bottom, and the first matching rule governs the decision.
 
 ### DEFINE GROUPS ###
 
@@ -27,30 +28,30 @@ GROUP messaging-users client server
 #Define a group for management web console users
 GROUP webadmins webadmin
 
-### MANAGEMENT ####
+### JMX MANAGEMENT ####
 
 # Allow everyone to perform read operations on the ServerInformation mbean
 # This is used for items such as querying the management API and broker release versions.
-ACL ALLOW-LOG ALL ACCESS METHOD component="ServerInformation"
+ACL ALLOW ALL ACCESS METHOD component="ServerInformation"
 
-# Allow 'admin' all management operations
+# Allow 'admin' all management operations. To reduce log file noise, only non-read-only operations are logged.
+ACL ALLOW admin ACCESS METHOD
 ACL ALLOW-LOG admin ALL METHOD
 
+# Allow 'guest' to view logger levels, and use getter methods on LoggingManagement
+ACL ALLOW guest ACCESS METHOD component="LoggingManagement" name="viewEffectiveRuntimeLoggerLevels"
+ACL ALLOW guest ACCESS METHOD component="LoggingManagement" name="get*"
+
 # Deny access to Shutdown, UserManagement, ConfigurationManagement and LoggingManagement for all other users
-# You could grant specific users access to these beans by adding ALLOW-LOG rules above for them
+# You could grant specific users access to these beans by adding rules above to allow them
 ACL DENY-LOG ALL ACCESS METHOD component="Shutdown"
 ACL DENY-LOG ALL ACCESS METHOD component="UserManagement"
 ACL DENY-LOG ALL ACCESS METHOD component="ConfigurationManagement"
 ACL DENY-LOG ALL ACCESS METHOD component="LoggingManagement"
 
-# Allow 'guest' to view logger levels, and use getter methods on LoggingManagement
-# These are examples of redundant rules! The DENY-LOG rule above will be invoked
-# first and will deny the access to all methods of LoggingManagement for guest
-ACL ALLOW-LOG guest ACCESS METHOD component="LoggingManagement" name="viewEffectiveRuntimeLoggerLevels"
-ACL ALLOW-LOG guest ACCESS METHOD component="LoggingManagement" name="get*"
-
-# Allow everyone to perform all read operations on the mbeans not listened in the DENY-LOG rules above
-ACL ALLOW-LOG ALL ACCESS METHOD
+# Allow everyone to perform all read operations (using ALLOW rather than ALLOW-LOG to reduce log file noise)
+# on the mbeans not listed in the DENY rules above
+ACL ALLOW ALL ACCESS METHOD
 
 ### MESSAGING ###
 

Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java Mon Aug 27 15:40:33 2012
@@ -30,16 +30,7 @@ import java.text.MessageFormat;
 import java.util.Set;
 
 /**
- * NOTE: This actor is not thread safe.
- *
- * Sharing of a ManagementActor instance between threads may result in an
- * incorrect actor value being logged.
- *
- * This is due to the fact that calls to message will dynamically query the
- * thread name and use that to set the log format during each message() call.
- *
- * This is currently not an issue as each MBean operation creates a new Actor
- * that is unique for each operation.
+ * Management actor to use in {@link MBeanInvocationHandlerImpl} to log all management operational logging.
  */
 public class ManagementActor extends AbstractActor
 {
@@ -66,38 +57,45 @@ public class ManagementActor extends Abs
     /**
      * The logString to be used for logging
      */
-    private String _logString;
+    private String _logStringContainingPrincipal;
+
+    /** used when the principal name cannot be discovered from the Subject */
+    private final String _fallbackPrincipalName;
 
     /** @param rootLogger The RootLogger to use for this Actor */
     public ManagementActor(RootMessageLogger rootLogger)
     {
         super(rootLogger);
+        _fallbackPrincipalName = UNKNOWN_PRINCIPAL;
+    }
+
+    public ManagementActor(RootMessageLogger rootLogger, String principalName)
+    {
+        super(rootLogger);
+        _fallbackPrincipalName = principalName;
     }
 
-    private void updateLogString()
+    private synchronized String getAndCacheLogString()
     {
         String currentName = Thread.currentThread().getName();
 
         String actor;
+        String logString = _logStringContainingPrincipal;
+
         // Record the last thread name so we don't have to recreate the log string
-        if (!currentName.equals(_lastThreadName))
+        if (_logStringContainingPrincipal == null || !currentName.equals(_lastThreadName))
         {
             _lastThreadName = currentName;
+            String principalName = getPrincipalName();
 
             // Management Thread names have this format.
             // RMI TCP Connection(2)-169.24.29.116
             // This is true for both LocalAPI and JMX Connections
             // However to be defensive lets test.
-
             String[] split = currentName.split("\\(");
             if (split.length == 2)
             {
                 String ip = currentName.split("-")[1];
-                String principalName = getPrincipalName();
-                if (principalName == null)
-                {
-                    principalName = UNKNOWN_PRINCIPAL;
-                }
                 actor = MessageFormat.format(MANAGEMENT_FORMAT, principalName, ip);
             }
             else
@@ -111,9 +109,14 @@ public class ManagementActor extends Abs
                 actor = currentName;
             }
 
-            _logString = "[" + actor + "] ";
+            logString = "[" + actor + "] ";
+            if(principalName != UNKNOWN_PRINCIPAL )
+            {
+                _logStringContainingPrincipal = logString;
+            }
 
         }
+        return logString;
     }
 
     /**
@@ -121,9 +124,9 @@ public class ManagementActor extends Abs
      *
      * @return principal name or null if principal can not be found
      */
-    protected String getPrincipalName()
+    private String getPrincipalName()
     {
-        String identity = null;
+        String identity = _fallbackPrincipalName;
 
         // retrieve Subject from current AccessControlContext
         final Subject subject = Subject.getSubject(AccessController.getContext());
@@ -142,8 +145,7 @@ public class ManagementActor extends Abs
 
     public String getLogMessage()
     {
-        updateLogString();
-        return _logString;
+        return getAndCacheLogString();
     }
 
 }

Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/management/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management:r1368652-1375508

Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java:r1368652-1375508

Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Model.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Model.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Model.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Model.java Mon Aug 27 15:40:33 2012
@@ -29,33 +29,20 @@ import java.util.Map;
 
 public class Model
 {
-    private static final Map<Class<? extends ConfiguredObject>, Collection<Class<? extends ConfiguredObject>>>
-            PARENTS = new HashMap<Class<? extends ConfiguredObject>, Collection<Class<? extends ConfiguredObject>>>();
+    private static final Model MODEL_INSTANCE = new Model();
 
+    private final Map<Class<? extends ConfiguredObject>, Collection<Class<? extends ConfiguredObject>>>
+            _parents = new HashMap<Class<? extends ConfiguredObject>, Collection<Class<? extends ConfiguredObject>>>();
 
-    private static final Map<Class<? extends ConfiguredObject>, Collection<Class<? extends ConfiguredObject>>>
-            CHILDREN = new HashMap<Class<? extends ConfiguredObject>, Collection<Class<? extends ConfiguredObject>>>();
+    private final Map<Class<? extends ConfiguredObject>, Collection<Class<? extends ConfiguredObject>>>
+            _children = new HashMap<Class<? extends ConfiguredObject>, Collection<Class<? extends ConfiguredObject>>>();
 
-    static void addRelationship(Class<? extends ConfiguredObject> parent, Class<? extends ConfiguredObject> child)
+    public static Model getInstance()
     {
-        Collection<Class<? extends ConfiguredObject>> parents = PARENTS.get(child);
-        if(parents == null)
-        {
-            parents = new ArrayList<Class<? extends ConfiguredObject>>();
-            PARENTS.put(child, parents);
-        }
-        parents.add(parent);
-
-        Collection<Class<? extends ConfiguredObject>> children = CHILDREN.get(parent);
-        if(children == null)
-        {
-            children = new ArrayList<Class<? extends ConfiguredObject>>();
-            CHILDREN.put(parent, children);
-        }
-        children.add(child);
+        return MODEL_INSTANCE;
     }
 
-    static
+    private Model()
     {
         addRelationship(Broker.class, VirtualHost.class);
         addRelationship(Broker.class, Port.class);
@@ -78,20 +65,39 @@ public class Model
 
         addRelationship(Session.class, Consumer.class);
         addRelationship(Session.class, Publisher.class);
-
     }
 
-    public static Collection<Class<? extends ConfiguredObject>> getParentTypes(Class<? extends ConfiguredObject> child)
+    public Collection<Class<? extends ConfiguredObject>> getParentTypes(Class<? extends ConfiguredObject> child)
     {
-        Collection<Class<? extends ConfiguredObject>> parentTypes = PARENTS.get(child);
-        return parentTypes == null ? Collections.EMPTY_LIST
+        Collection<Class<? extends ConfiguredObject>> parentTypes = _parents.get(child);
+        return parentTypes == null ? Collections.<Class<? extends ConfiguredObject>>emptyList()
                                    : Collections.unmodifiableCollection(parentTypes);
     }
 
-    public static Collection<Class<? extends ConfiguredObject>> getChildTypes(Class<? extends ConfiguredObject> parent)
+    public Collection<Class<? extends ConfiguredObject>> getChildTypes(Class<? extends ConfiguredObject> parent)
     {
-        Collection<Class<? extends ConfiguredObject>> childTypes = CHILDREN.get(parent);
-        return childTypes == null ? Collections.EMPTY_LIST
+        Collection<Class<? extends ConfiguredObject>> childTypes = _children.get(parent);
+        return childTypes == null ? Collections.<Class<? extends ConfiguredObject>>emptyList()
                                   : Collections.unmodifiableCollection(childTypes);
     }
+
+    private void addRelationship(Class<? extends ConfiguredObject> parent, Class<? extends ConfiguredObject> child)
+    {
+        Collection<Class<? extends ConfiguredObject>> parents = _parents.get(child);
+        if(parents == null)
+        {
+            parents = new ArrayList<Class<? extends ConfiguredObject>>();
+            _parents.put(child, parents);
+        }
+        parents.add(parent);
+
+        Collection<Class<? extends ConfiguredObject>> children = _children.get(parent);
+        if(children == null)
+        {
+            children = new ArrayList<Class<? extends ConfiguredObject>>();
+            _children.put(parent, children);
+        }
+        children.add(child);
+    }
+
 }

Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java:r1368652-1375508

Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java:r1368652-1375508

Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0:r1368652-1375508

Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/queue/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue:r1368652-1375508

Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/virtualhost/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost:r1368652-1375508

Modified: qpid/branches/asyncstore/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java (original)
+++ qpid/branches/asyncstore/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java Mon Aug 27 15:40:33 2012
@@ -26,15 +26,6 @@ import java.security.PrivilegedAction;
 import java.util.Collections;
 import java.util.List;
 
-/**
- * Test : AMQPManagementActorTest
- * Validate the AMQPManagementActor class.
- *
- * The test creates a new AMQPActor and then logs a message using it.
- *
- * The test then verifies that the logged message was the only one created and
- * that the message contains the required message.
- */
 public class ManagementActorTest extends BaseActorTestCase
 {
 
@@ -131,4 +122,67 @@ public class ManagementActorTest extends
         assertTrue("Message contains the [mng: prefix", logMessage.contains("[mng:guest(" + IP + ")"));
     }
 
+    public void testGetLogMessageWithSubject()
+    {
+        assertLogMessageInRMIThreadWithPrincipal("RMI TCP Connection(" + CONNECTION_ID + ")-" + IP, "my_principal");
+    }
+
+    public void testGetLogMessageWithoutSubjectButWithActorPrincipal()
+    {
+        String principalName = "my_principal";
+        _amqpActor = new ManagementActor(_rootLogger, principalName);
+        String message = _amqpActor.getLogMessage();
+        assertEquals("Unexpected log message", "[mng:" + principalName + "(" + IP + ")] ", message);
+    }
+
+    /** It's necessary to test successive calls because ManagementActor caches its log message based on thread and principal name */
+    public void testGetLogMessageCaching()
+    {
+        String originalThreadName = "RMI TCP Connection(1)-" + IP;
+        assertLogMessageInRMIThreadWithoutPrincipal(originalThreadName);
+        assertLogMessageInRMIThreadWithPrincipal(originalThreadName, "my_principal");
+        assertLogMessageInRMIThreadWithPrincipal("RMI TCP Connection(2)-" + IP, "my_principal");
+    }
+
+    public void testGetLogMessageAfterRemovingSubject()
+    {
+        assertLogMessageInRMIThreadWithPrincipal("RMI TCP Connection(1)-" + IP, "my_principal");
+
+        Thread.currentThread().setName("RMI TCP Connection(2)-" + IP );
+        String message = _amqpActor.getLogMessage();
+        assertEquals("Unexpected log message", "[mng:N/A(" + IP + ")] ", message);
+
+        assertLogMessageWithoutPrincipal("TEST");
+    }
+
+    private void assertLogMessageInRMIThreadWithoutPrincipal(String threadName)
+    {
+        Thread.currentThread().setName(threadName );
+        String message = _amqpActor.getLogMessage();
+        assertEquals("Unexpected log message", "[mng:N/A(" + IP + ")] ", message);
+    }
+
+    private void assertLogMessageWithoutPrincipal(String threadName)
+    {
+        Thread.currentThread().setName(threadName );
+        String message = _amqpActor.getLogMessage();
+        assertEquals("Unexpected log message", "[" + threadName +"] ", message);
+    }
+
+    private void assertLogMessageInRMIThreadWithPrincipal(String threadName, String principalName)
+    {
+        Thread.currentThread().setName(threadName);
+        Subject subject = new Subject(true, Collections.singleton(new JMXPrincipal(principalName)), Collections.EMPTY_SET,
+                Collections.EMPTY_SET);
+
+        final String message = Subject.doAs(subject, new PrivilegedAction<String>()
+        {
+            public String run()
+            {
+                return _amqpActor.getLogMessage();
+            }
+        });
+
+        assertEquals("Unexpected log message", "[mng:" + principalName + "(" + IP + ")] ", message);
+    }
 }

Modified: qpid/branches/asyncstore/java/build.deps
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/build.deps?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/build.deps (original)
+++ qpid/branches/asyncstore/java/build.deps Mon Aug 27 15:40:33 2012
@@ -106,7 +106,7 @@ jca.libs=${geronimo-j2ee} ${geronimo-jta
 jca.test.libs=${test.libs}
 
 # optional bdbstore module deps
-bdb-je=lib/bdbstore/je-5.0.55.jar
+bdb-je=lib/bdbstore/je-5.0.58.jar
 bdbstore.libs=${bdb-je}
 bdbstore.test.libs=${test.libs}
 

Modified: qpid/branches/asyncstore/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java (original)
+++ qpid/branches/asyncstore/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java Mon Aug 27 15:40:33 2012
@@ -245,13 +245,13 @@ public class AMQBrokerDetails implements
         _options.put(key, value);
     }
 
-    public long getTimeout()
+    private int lookupConnectTimeout()
     {
         if (_options.containsKey(OPTIONS_CONNECT_TIMEOUT))
         {
             try
             {
-                return Long.parseLong(_options.get(OPTIONS_CONNECT_TIMEOUT));
+                return Integer.parseInt(_options.get(OPTIONS_CONNECT_TIMEOUT));
             }
             catch (NumberFormatException nfe)
             {
@@ -290,11 +290,6 @@ public class AMQBrokerDetails implements
     	}
     }    
 
-    public void setTimeout(long timeout)
-    {
-        setProperty(OPTIONS_CONNECT_TIMEOUT, Long.toString(timeout));
-    }
-
     public String toString()
     {
         StringBuffer sb = new StringBuffer();
@@ -460,6 +455,8 @@ public class AMQBrokerDetails implements
                     getBooleanProperty(BrokerDetails.OPTIONS_TCP_NO_DELAY,true));
         }
 
+        conSettings.setConnectTimeout(lookupConnectTimeout());
+
         return conSettings;
     }
 }

Modified: qpid/branches/asyncstore/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java (original)
+++ qpid/branches/asyncstore/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java Mon Aug 27 15:40:33 2012
@@ -59,7 +59,7 @@ public interface BrokerDetails
     public static final String URL_FORMAT_EXAMPLE =
             "<transport>://<hostname>[:<port Default=\"" + DEFAULT_PORT + "\">][?<option>='<value>'[,<option>='<value>']]";
 
-    public static final long DEFAULT_CONNECT_TIMEOUT = 30000L;
+    public static final int DEFAULT_CONNECT_TIMEOUT = 30000;
     public static final boolean USE_SSL_DEFAULT = false;
 
     // pulled these properties from the new BrokerDetails class in the qpid package
@@ -101,10 +101,6 @@ public interface BrokerDetails
      */
     public void setProperties(Map<String,String> props);
 
-    long getTimeout();
-
-    void setTimeout(long timeout);
-    
     boolean getBooleanProperty(String propName);
 
     String toString();

Modified: qpid/branches/asyncstore/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java (original)
+++ qpid/branches/asyncstore/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java Mon Aug 27 15:40:33 2012
@@ -24,6 +24,7 @@ import junit.framework.TestCase;
 
 import org.apache.qpid.client.AMQBrokerDetails;
 import org.apache.qpid.jms.BrokerDetails;
+import org.apache.qpid.transport.ConnectionSettings;
 import org.apache.qpid.url.URLSyntaxException;
 
 public class BrokerDetailsTest extends TestCase
@@ -49,6 +50,29 @@ public class BrokerDetailsTest extends T
         assertFalse("value should be false", Boolean.valueOf(broker.getProperty(BrokerDetails.OPTIONS_TCP_NO_DELAY)));
     }
 
+    public void testDefaultConnectTimeout() throws URLSyntaxException
+    {
+        String brokerURL = "tcp://localhost:5672";
+        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);
+
+        ConnectionSettings settings = broker.buildConnectionSettings();
+
+        assertEquals("unexpected default connect timeout value", BrokerDetails.DEFAULT_CONNECT_TIMEOUT, settings.getConnectTimeout());
+    }
+
+    public void testOverridingConnectTimeout() throws URLSyntaxException
+    {
+        int timeout = 2 * BrokerDetails.DEFAULT_CONNECT_TIMEOUT;
+        assertTrue(timeout != BrokerDetails.DEFAULT_CONNECT_TIMEOUT);
+
+        String brokerURL = "tcp://localhost:5672?" + BrokerDetails.OPTIONS_CONNECT_TIMEOUT + "='" + timeout + "'";
+        AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);
+
+        ConnectionSettings settings = broker.buildConnectionSettings();
+
+        assertEquals("unexpected connect timeout value", timeout, settings.getConnectTimeout());
+    }
+
     public void testMultiParameters() throws URLSyntaxException
     {
         String url = "tcp://localhost:5672?timeout='200',immediatedelivery='true'";

Modified: qpid/branches/asyncstore/java/common.xml
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/common.xml?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/common.xml (original)
+++ qpid/branches/asyncstore/java/common.xml Mon Aug 27 15:40:33 2012
@@ -97,7 +97,8 @@
   <property name="ivy.jar.dir"         value="${project.root}/lib/ivy" />
   <property name="ivy.install.version" value="2.2.0" />
   <property name="ivy.jar.file"        value="${ivy.jar.dir}/ivy-${ivy.install.version}.jar" />
-  <property name="ivy.repo.url"        value="http://repo1.maven.org/maven2/org/apache/ivy/ivy"/>
+  <property name="ivy.m2repo.url"      value="http://repo1.maven.org/maven2"/>
+  <property name="ivy.repo.url"        value="${ivy.m2repo.url}/org/apache/ivy/ivy"/>
   <property name="ivy.jar.url"         value="${ivy.repo.url}/${ivy.install.version}/ivy-${ivy.install.version}.jar"/>
 
   <available property="ivy.jar.file.exists" file="${ivy.jar.file}"/>

Modified: qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java (original)
+++ qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java Mon Aug 27 15:40:33 2012
@@ -20,10 +20,11 @@ package org.apache.qpid.configuration;
 
 /**
  * This class centralized the Qpid client properties.
+ *
+ * @see CommonProperties
  */
 public class ClientProperties
 {
-
     /**
      * Currently with Qpid it is not possible to change the client ID.
      * If one is not specified upon connection construction, an id is generated automatically.
@@ -118,10 +119,6 @@ public class ClientProperties
      */
     public static final String REJECT_BEHAVIOUR_PROP_NAME = "qpid.reject.behaviour";
 
-    private ClientProperties()
-    {
-    }
-
     /**
      * System property used to set the key manager factory algorithm.
      *
@@ -192,4 +189,10 @@ public class ClientProperties
      * waiting because the client was flow controlled by the broker.
      */
     public static final long DEFAULT_FLOW_CONTROL_WAIT_NOTIFY_PERIOD = 5000L;
+
+
+    private ClientProperties()
+    {
+        //No instances
+    }
 }

Modified: qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/transport/Connection.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/transport/Connection.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/transport/Connection.java (original)
+++ qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/transport/Connection.java Mon Aug 27 15:40:33 2012
@@ -382,7 +382,7 @@ public class Connection extends Connecti
         {
             log.debug("SEND: [%s] %s", this, event);
         }
-        Sender s = sender;
+        Sender<ProtocolEvent> s = sender;
         if (s == null)
         {
             throw new ConnectionException("connection closed");
@@ -415,15 +415,23 @@ public class Connection extends Connecti
 
     public void dispatch(Method method)
     {
-        Session ssn = getSession(method.getChannel());
+        int channel = method.getChannel();
+        Session ssn = getSession(channel);
         if(ssn != null)
         {
             ssn.received(method);
         }
         else
         {
-            throw new ProtocolViolationException(
-					"Received frames for an already detached session", null);
+            /*
+             * A peer receiving any other control on a detached transport MUST discard it and
+             * send a session.detached with the "not-attached" reason code.
+             */
+            if(log.isDebugEnabled())
+            {
+                log.debug("Control received on unattached channel : %d", channel);
+            }
+            invokeSessionDetached(channel, SessionDetachCode.NOT_ATTACHED);
         }
     }
 
@@ -663,7 +671,7 @@ public class Connection extends Connecti
 
     public void setServerProperties(final Map<String, Object> serverProperties)
     {
-        _serverProperties = serverProperties == null ? Collections.EMPTY_MAP : serverProperties;
+        _serverProperties = serverProperties == null ? Collections.<String, Object>emptyMap() : serverProperties;
     }
 
     public Map<String, Object> getServerProperties()
@@ -719,4 +727,12 @@ public class Connection extends Connecti
     {
         return _localAddress;
     }
+
+    private void invokeSessionDetached(int channel, SessionDetachCode sessionDetachCode)
+    {
+        SessionDetached sessionDetached = new SessionDetached();
+        sessionDetached.setChannel(channel);
+        sessionDetached.setCode(sessionDetachCode);
+        invoke(sessionDetached);
+    }
 }

Modified: qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java?rev=1377715&r1=1377714&r2=1377715&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java (original)
+++ qpid/branches/asyncstore/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java Mon Aug 27 15:40:33 2012
@@ -60,9 +60,9 @@ public class ConnectionSettings
     private int maxChannelCount = 32767;
     private int maxFrameSize = 65535;
     private int heartbeatInterval;
+    private int connectTimeout = 30000;
     private int readBufferSize = QpidProperty.intProperty(65535, RECEIVE_BUFFER_SIZE_PROP_NAME, LEGACY_RECEIVE_BUFFER_SIZE_PROP_NAME).get();
     private int writeBufferSize = QpidProperty.intProperty(65535, SEND_BUFFER_SIZE_PROP_NAME, LEGACY_SEND_BUFFER_SIZE_PROP_NAME).get();;
-    private long transportTimeout = 60000;
 
     // SSL props
     private boolean useSSL;
@@ -345,6 +345,16 @@ public class ConnectionSettings
         this.trustStoreType = trustStoreType;
     }
 
+    public int getConnectTimeout()
+    {
+        return connectTimeout;
+    }
+
+    public void setConnectTimeout(int connectTimeout)
+    {
+        this.connectTimeout = connectTimeout;
+    }
+
     public int getReadBufferSize()
     {
         return readBufferSize;
@@ -364,14 +374,4 @@ public class ConnectionSettings
     {
         this.writeBufferSize = writeBufferSize;
     }
-    
-    public long getTransportTimeout()
-    {
-        return transportTimeout;
-    }
-
-    public void setTransportTimeout(long transportTimeout)
-    {
-        this.transportTimeout = transportTimeout;
-    }
 }



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


Mime
View raw message