summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2008-09-02 20:42:18 +0000
committerAidan Skinner <aidan@apache.org>2008-09-02 20:42:18 +0000
commit9f544b894dff84236ef51a66579b7f013a386f28 (patch)
tree154e7a0bb9300009054f50981dae4573c8d6084f
parent95ce6bc4343f1d411a7b51c2ca10b299ae91e1c1 (diff)
parent3b52047c68e2dbb94ddb0e94c7fc6c3b80512cd7 (diff)
downloadqpid-python-9f544b894dff84236ef51a66579b7f013a386f28.tar.gz
Tag M3, four leaf clovers are lucky
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/tags/M3@691371 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/DISCLAIMER5
-rw-r--r--qpid/KEYS104
-rw-r--r--qpid/LICENSE7
-rw-r--r--qpid/NOTICE8
-rw-r--r--qpid/bin/LICENSE206
-rw-r--r--qpid/bin/NOTICE8
-rw-r--r--qpid/bin/release.sh52
-rw-r--r--qpid/buildtools/LICENSE206
-rw-r--r--qpid/buildtools/NOTICE8
-rwxr-xr-xqpid/buildtools/buildCreator/buildCreator.py22
-rw-r--r--qpid/cc/LICENSE206
-rw-r--r--qpid/cc/NOTICE8
-rw-r--r--qpid/cpp/LICENSE31
-rw-r--r--qpid/cpp/NOTICE1
-rw-r--r--qpid/cpp/src/cluster.mk14
-rw-r--r--qpid/cpp/src/qpid/Url.h4
-rw-r--r--qpid/cpp/src/qpid/amqp_0_10/Connection.cpp14
-rw-r--r--qpid/cpp/src/qpid/amqp_0_10/Connection.h15
-rw-r--r--qpid/cpp/src/qpid/broker/Broker.cpp6
-rw-r--r--qpid/cpp/src/qpid/broker/Broker.h7
-rw-r--r--qpid/cpp/src/qpid/broker/Connection.cpp17
-rw-r--r--qpid/cpp/src/qpid/broker/Connection.h11
-rw-r--r--qpid/cpp/src/qpid/broker/ConnectionFactory.cpp15
-rw-r--r--qpid/cpp/src/qpid/broker/ConnectionFactory.h3
-rw-r--r--qpid/cpp/src/qpid/cluster/ClassifierHandler.cpp51
-rw-r--r--qpid/cpp/src/qpid/cluster/ClassifierHandler.h50
-rw-r--r--qpid/cpp/src/qpid/cluster/Cluster.cpp214
-rw-r--r--qpid/cpp/src/qpid/cluster/Cluster.h74
-rw-r--r--qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp36
-rw-r--r--qpid/cpp/src/qpid/cluster/Connection.cpp94
-rw-r--r--qpid/cpp/src/qpid/cluster/Connection.h (renamed from qpid/cpp/src/qpid/cluster/ConnectionInterceptor.h)75
-rw-r--r--qpid/cpp/src/qpid/cluster/ConnectionCodec.cpp64
-rw-r--r--qpid/cpp/src/qpid/cluster/ConnectionCodec.h77
-rw-r--r--qpid/cpp/src/qpid/cluster/ConnectionInterceptor.cpp102
-rw-r--r--qpid/cpp/src/qpid/cluster/Cpg.cpp44
-rw-r--r--qpid/cpp/src/qpid/cluster/Cpg.h27
-rw-r--r--qpid/cpp/src/qpid/cluster/NoOpConnectionOutputHandler.h (renamed from qpid/cpp/src/qpid/cluster/ShadowConnectionOutputHandler.h)10
-rw-r--r--qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp19
-rw-r--r--qpid/cpp/src/qpid/cluster/OutputInterceptor.h8
-rw-r--r--qpid/cpp/src/qpid/cluster/PollableQueue.h2
-rw-r--r--qpid/cpp/src/qpid/cluster/ProxyInputHandler.h57
-rw-r--r--qpid/cpp/src/qpid/cluster/types.h58
-rw-r--r--qpid/cpp/src/qpid/sys/ConnectionCodec.h6
-rw-r--r--qpid/cpp/src/qpid/sys/ConnectionInputHandler.h1
-rw-r--r--qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h3
-rw-r--r--qpid/cpp/src/tests/ForkedBroker.h6
-rw-r--r--qpid/cpp/src/tests/cluster_test.cpp12
-rw-r--r--qpid/cpp/xml/cluster.xml12
-rw-r--r--qpid/etc/LICENSE206
-rw-r--r--qpid/etc/NOTICE8
-rw-r--r--qpid/gentools/LICENSE202
-rw-r--r--qpid/gentools/NOTICE2
-rw-r--r--qpid/gentools/README.txt102
-rw-r--r--qpid/gentools/lib/LICENSE202
-rw-r--r--qpid/gentools/lib/NOTICE2
-rw-r--r--qpid/gentools/lib/README.txt102
-rw-r--r--qpid/java/010ExcludeList3
-rw-r--r--qpid/java/010ExcludeList-noPrefetch2
-rw-r--r--qpid/java/010ExcludeList-store2
-rw-r--r--qpid/java/08ExcludeList2
-rw-r--r--qpid/java/08ExcludeList-nonvm2
-rw-r--r--qpid/java/KEYS32
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java16
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java2
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java7
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java11
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java3
-rw-r--r--qpid/java/common/Composite.tpl8
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java31
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/GenTest.java44
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java133
-rw-r--r--qpid/java/resources/LICENSE321
-rw-r--r--qpid/java/resources/NOTICE143
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java15
-rw-r--r--qpid/review/LICENSE206
-rw-r--r--qpid/review/NOTICE8
-rw-r--r--qpid/review/jiraRSS2wiki.xsl20
-rw-r--r--qpid/review/svnlog2wiki.xsl20
-rw-r--r--qpid/specs/LICENSE325
-rw-r--r--qpid/specs/NOTICE7
80 files changed, 3249 insertions, 1020 deletions
diff --git a/qpid/DISCLAIMER b/qpid/DISCLAIMER
new file mode 100644
index 0000000000..c321113c9e
--- /dev/null
+++ b/qpid/DISCLAIMER
@@ -0,0 +1,5 @@
+Apache Qpid is an effort undergoing incubation at the Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
diff --git a/qpid/KEYS b/qpid/KEYS
new file mode 100644
index 0000000000..57139799b3
--- /dev/null
+++ b/qpid/KEYS
@@ -0,0 +1,104 @@
+pub 2048R/18806464 2006-11-14
+uid Rajith Attapattu <rajith@apache.org>
+sig 3 18806464 2006-11-14 Rajith Attapattu <rajith@apache.org>
+uid Rajith Attapattu <rajith77@gmail.com>
+sig 3 18806464 2006-11-14 Rajith Attapattu <rajith@apache.org>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.2.1 (GNU/Linux)
+
+mQELBEVaPcABCAC+iLSVxk/TZ2i5Kq4KhdYdBdpXizwRsKdCq9m9DwD20yke0rZL
+067ka5z4gA2prOUUCJ51G/CFhDgngiK0awnhcMgdNZzMQoOIJC044qgRLeg12IvI
+bzdtzK+DknPW3MC5QbmuJiozBPokyhyHR/C+889f2lR8OTjSGagLwjtHf0oEuEn4
+RdTBWWzNZclKe4J6UIbi3VG5kgUmThCm12TmtABmJmXpeNl3wpyYNPxZkU1huKNl
+Pi0Buu1SroWoIlwR8n2DNvDIU8PvzmtrfZoDBMopC1a6lBiZX9tKwZLUDb28AgaB
+XelJ+L+nkaoLjbNgNxGRMT7N99hWXsOcWlUVAAYptCVSYWppdGggQXR0YXBhdHR1
+IDxyYWppdGg3N0BnbWFpbC5jb20+iQE2BBMBAgAgBQJFWj3AAhsDBgsJCAcDAgQV
+AggDBBYCAwECHgECF4AACgkQdt2xaBiAZGS/AQf/fCrR7bLqAhiI9ojuOgTfwzRv
+9Hf3FcNdRCnVzmRFzE4WGHSG7R92xLL8avtiPEdC7p80d3+bf+QKGSJ/Ym4a0JqE
+KeX08brWOtIfQQK7wd7UgCJ3ufWcbQgnHzhgc7oY00FZAmQfv8TF8Uxqpe6dKXep
+4S3RN1c9ygg643ey7u85knAk+rs1OevZ+xl/IsLN6rSnQ1B8uIJUCct8+5YuGxd7
+VHCAgDEri0zf7+CMWxVpOJgcegn9Iy8rfmif8BUs0620xvNRha03of2UQZau0WzB
+MIMkSgOUhSBdsYNYe8TU9SfJGXabB4R6xDimMDbOXs75ypQMoPiEsf9urx7T6rQk
+UmFqaXRoIEF0dGFwYXR0dSA8cmFqaXRoQGFwYWNoZS5vcmc+iQE2BBMBAgAgBQJF
+Wj7qAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQdt2xaBiAZGQEYQf/SocY
+SONVEePlZtFlLmsebZLZ8sn+HZBPepcJf81eK7YdXcca7QSeY3Q6vwshbfZsUOJZ
+fu+6gaD1MnPtBLF4RWjLBW1OOmxLJPtv5bNifjciuhuvRgBA7y3xWenfNgV4FeKk
+qX8ArRYJQVgy7X5Lv3ccbXcaNq6ajT2xDi0krMkn0TtU1vdkDSK56PRzAwWxA/X+
+4MKQZF/6964or2rz91iX2OnylEj38q+F7/dOaasD/EZpjAh8nipqVBVL3Rcy2gFy
+7EkTao4tOSo1JVrHW7lgfEBxKVSrgHyhnSxx3Z773edp2qnjZPAcv0qiEawszhkI
+vIuNSo3oTbrOW9w2tA==
+=FCqB
+-----END PGP PUBLIC KEY BLOCK-----
+pub 1024D/8004C922 2008-04-01 [expires: 2018-03-30]
+uid Aidan Skinner <aidan@skinner.me.uk>
+sig 3 8004C922 2008-04-01 Aidan Skinner <aidan@skinner.me.uk>
+sub 2048g/A1375A8A 2008-04-01 [expires: 2018-03-30]
+sig 8004C922 2008-04-01 Aidan Skinner <aidan@skinner.me.uk>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+mQGiBEfypHkRBAC0tGJGaJnreJa5eF4KWLxEuPm6zuTrw7V8FRh4Wx7SlSE8XH0O
+08BMAUHWsVDaiAUwGIcnbADpZjPV70ChbRVgasA3p0d5Bf8koRd5clb9cb/+ayg9
+r6sybOEuKLEHL8Va/TCea4ANWWzn2EPUjM6CntipSSTsM4idXo9HtFr8AwCgncYV
+iHncPMTpCc73mbmhpNJrQCsEAJpeZn8Eqy/WvOIxUfsRwM9DI54eu5oEyw1PyDoj
+0Wks5OroPprOaC8wIwI/WWjmNZnGvYsq6ZwEs3EhM5PKRNkOuiu5JwRRDgkaHQaf
+xoxoY6Tn74DT19qGDngf76jLgMCO7/Amqe90rlJNXGwkGHdsA33ItRYcjebtWVIQ
+QgXEA/49akjY/tc4XGsj+QiwhPEYX0/BSdo9CkaeuEpeTDLY7/guzxTeUGALorTW
+PYDH5ie8XZqwyEsz6yFDMk3hoNsrX0Y+gH/mpQVqox4dXCCWPF7bDvNZ/W7uJ5dS
+dwYhHjZ0hvDDhW3VEFlQVEllrBYKQDVNPhZeOcgyLCifsdJXWLQjQWlkYW4gU2tp
+bm5lciA8YWlkYW5Ac2tpbm5lci5tZS51az6IZgQTEQIAJgUCR/KkeQIbAwUJEswD
+AAYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEG+eB3yABMkiQLQAn3NFZrGrzW8W
+1s8YnrAAxJ6xWFfFAJ9FkR159MVTHaJGAIzn0Iq9eLDUqrkCDQRH8qSPEAgA22Cf
+Xspnd5mqQD6FfWUbZAO6AQ0ehwprA/q3PqdAAtQXbJYRzmuIIwrb50Md7FEwCIWt
+FS0wtbSfPTtDE+C4P93r5K87U0Xg/o4MundjoPjeCGNsTYicpewdlS2WcdWl2BJI
++G5yPLhq2/vTI8Sg2sCpktunEFw/g/BzsigbJhsSC63NV8LyHBhbBELifFySwWh/
+ZzPCpXbdxzUdwwi7P57+n/DsmfjbXe0okr2QQL4EtDapqvcwnSlz9c4hNw9ku/m9
+YMiQMKRSmtG/ymH7u8F1CZRurvOaaFFbaoWhSZF7nnUH6H4z5HY+aNbufXa0Ffpb
+kTZqLD6amvrTr6NIbwADBQf+Pn2PkGHhSrF1CWQBDNJC0n/vqnc48QxcGoN0Lu02
+Rj0/UNwVKRFy6VGLBEfyxR08ZWi2EkvlYm+VGyv+wQlfAhwyDBHAEVE+j3lWq90+
+B1Pnf5j5p1vRfKCkAWFddILJUoh8fQKUinZdoAWZf3Qn10HoIkAoYw+wo7xIvwch
+/zIpq45n24W/iDcKAggJ3fl6gO7+Hkttig3nbcaQ0xDi/XwkBP4cUqnvwka2E3Bu
+5KiFKc8cdy4mtYrqiDDZ0EZLr7Hx/3uy8kaIzdsep/g0xKOka6Xs10XG3Sg8vDmv
+OEhlDHlTkVF8WpxsabDOselYSu6kURiLKkgHvrUe4OM+SohPBBgRAgAPBQJH8qSP
+AhsMBQkSzAMAAAoJEG+eB3yABMkih7YAoIwSenHROUBAj/ZU9qttReAoUPeLAKCT
+9JRkXdhK2IGqlgc4N0sfZqdx/w==
+=wO1+
+-----END PGP PUBLIC KEY BLOCK-----
+pub 1024D/7F403EB4 2008-08-29 [expires: 2018-08-27]
+uid Martin Ritchie <ritchiem@apache.org>
+sig 3 7F403EB4 2008-08-29 Martin Ritchie <ritchiem@apache.org>
+sub 2048g/4BFD39DC 2008-08-29 [expires: 2018-08-27]
+sig 7F403EB4 2008-08-29 Martin Ritchie <ritchiem@apache.org>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.8 (Darwin)
+
+mQGiBEi4S7ARBAC2oG706u3Qf0CF6QO4eJ8mATiz+P2CV8Y6sGWWyxqYtGM0B6Mg
+HLUKJ+1nF7y1qnG3zf8SPj8709fVQyW3XoCivDZKL3JZe8eujM8lfdTnblsId3QF
+IK2Q4O6Sjx5xEb8yS1hocj13+7vD4ADcsaxJL8BGXBhA+VMzz6pCxN0FawCggtWK
+jugwOdtmOmFhhR/bEBo7FysD/iI+2y5atlr8vkQRXQgvIFs9oj6Tp+vFzgcv8nfj
+MIuDq9hywzL+sUUNHEr0YW3wfX5K0A30eSOKWiPt4Cvt082iu0voFr1Dmq8FeuyY
+gjZ4cRvOB4UcKwGbCyDfVPE0Uz6v8MnNJikEC8FP8vLJ1LyylrSNXyh9GNg9t5rf
+gfw6A/9VnkM/OrtkHHreK8drBtG8vL/Wd5HoR/rzlIFNw3dQYlqZ7QxGKkuI48j8
+96INl0hhxy3R5aq/dFIk45ke0nuIeOZLn9p4WCu8+CeGQQjeDHuxKhFmDUFv1Wvd
+S9mpQ/sUBm1xG7RK89eTKF2IUOClqmoSeQBUvwTmkHg+xSnI77QkTWFydGluIFJp
+dGNoaWUgPHJpdGNoaWVtQGFwYWNoZS5vcmc+iGYEExECACYFAki4S7ACGwMFCRLM
+AwAGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRD+YIfJf0A+tGzTAJ999RE6+ypv
+cCBBk8s23TW5+UKMlwCfXqw3vGBVqEDqws8OHUK/LYKbkbK5Ag0ESLhLsBAIAIf7
+UwpIIpV7FUL/ufwuTO2ZW61ly32jb+2REPYXCdgisd/xOSbHrndA8MflOYoGOty5
+fsxHzcAQ2YrmV09B8XBVwKeRuKX2HgI5ukjSMtFL3ZaqXG+4KqWxO6XyX9DcJGA7
+6W8Fd92R+7FCaM/NLuWPhHZyDws8E6GkldnzPP+eo6wX2frwkiJHOKP/NP4urBsz
+JhL0tpLVffpLw3BVOBPpcB9FZB2IiLjLh7ouvtpxkSsfoiMR4dob+7fxO4WVVsFi
+f2QNmxUxGWRCwnVVUGQor1i6MFE/0rMbypjIXxCLzSkq2IqRExLAEQGZP35mztzb
+F6TCj/+3QAqYcn2idQ8AAwUIAITEFeXVRSLIpl0le9AF1MyzadGdxdRHiGqYLyuc
+wqqRuAOuYvTf48FGuUKqlwchzdUSwYN3xezO3s4C7AnWfXm44wPARs6gqCMgWRng
+LLDqFi5UEvyzBO7a9I/B0JuTLCzOVOyVlUxFOie6E1/rHimG3RUKibwqWUVdI1ho
+do7LBig3wAaxshjwtVSapDlY0eRq+NVLXIlteKdSFCNSwKX+pWoGq2aIuj3dQ20B
+ogVE18L6sGzM5A/cPQTGk9pabhGpxVZNn4Bri2Qjd5RSGbSy89SIyFgheFA9RLC3
+dAt70Rs4ce0euqimkKR7Ciijcg9THWRtE2yU1RKxGUvprsiITwQYEQIADwUCSLhL
+sAIbDAUJEswDAAAKCRD+YIfJf0A+tPj4AJ9sALGRq8Qkzc2opTXhdzQiqqidXQCb
+B0qGS98nQKt60WWG/5k7wPJcbys=
+=0W1W
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/qpid/LICENSE b/qpid/LICENSE
new file mode 100644
index 0000000000..5f84a6564b
--- /dev/null
+++ b/qpid/LICENSE
@@ -0,0 +1,7 @@
+Please see the individual LICENSE files for each language
+cpp/LICENSE
+dotnet/LICENSE.txt
+gentools/lib/LICENSE
+java/resources/LICENSE
+python/LICENSE.txt
+ruby/LICENSE.txt
diff --git a/qpid/NOTICE b/qpid/NOTICE
new file mode 100644
index 0000000000..ff65d299a9
--- /dev/null
+++ b/qpid/NOTICE
@@ -0,0 +1,8 @@
+Please see the individual NOTICE files for each language:
+
+cpp/NOTICE
+dotnet/NOTICE.txt
+gentools/lib/NOTICE
+java/resources/NOTICE
+python/NOTICE.txt
+ruby/NOTICE.txt
diff --git a/qpid/bin/LICENSE b/qpid/bin/LICENSE
new file mode 100644
index 0000000000..bc46b77047
--- /dev/null
+++ b/qpid/bin/LICENSE
@@ -0,0 +1,206 @@
+=========================================================================
+== Apache License ==
+=========================================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/qpid/bin/NOTICE b/qpid/bin/NOTICE
new file mode 100644
index 0000000000..05f39ba176
--- /dev/null
+++ b/qpid/bin/NOTICE
@@ -0,0 +1,8 @@
+// ------------------------------------------------------------------
+// NOTICE file corresponding to the section 4d of The Apache License,
+// Version 2.0, in this case for Qpid bin scripts
+// ------------------------------------------------------------------
+
+Apache Qpid
+Copyright 2006-2008 Apache Software Foundation
+
diff --git a/qpid/bin/release.sh b/qpid/bin/release.sh
new file mode 100644
index 0000000000..2544910178
--- /dev/null
+++ b/qpid/bin/release.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+#
+# 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.
+#
+#
+# Script to pull together an Apache Release
+#
+
+svn delete https://svn.eu.apache.org/repos/asf/incubator/qpid/tags/M3
+svn copy https://svn.eu.apache.org/repos/asf/incubator/qpid/trunk https://svn.eu.apache.org/repos/asf/incubator/qpid/tags/M3
+svn co https://svn.eu.apache.org/repos/asf/incubator/qpid/tags/M3 qpid-M3
+cd qpid-M3
+ln -s qpid/ qpid-incubating-M3
+tar -zhcf qpid-incubating-M3.tar.gz --exclude=.svn qpid-incubating-M3/
+rm qpid-incubating-M3
+tar -zxf qpid-incubating-M3.tar.gz
+tar -hzcf qpid-incubating-M3-ruby.tar.gz qpid-incubating-M3/ruby/ qpid-incubating-M3/specs/
+tar -zcf qpid-incubating-M3-python.tar.gz qpid-incubating-M3/python/ qpid-incubating-M3/specs/
+cd qpid-incubating-M3/cpp
+./bootstrap
+./configure
+make dist -j4
+cd ../java
+ant build release
+cd ../dotnet
+sh build-framing
+./release mono-2.0
+cd ../../
+mkdir ../artifacts
+cp qpid-incubating-M3/java/release/*.tar.gz ../artifacts
+cp *.tar.gz ../artifacts
+cp qpid-incubating-M3/cpp/*tar.gz ../artifacts/qpid-incubating-M3-cpp.tar.gz
+cp qpid-incubating-M3/dotnet/bin/mono-2.0/release/*.zip ../artifacts/qpid-incubating-M3-dotnet.zip
+cd ../artifacts
+sha1sum *.zip *.gz > SHA1SUM
+for i in `find . | egrep 'jar$|pom$|gz$|zip$|SHA1SUM'`; do gpg --sign --armor --detach $i; done;
diff --git a/qpid/buildtools/LICENSE b/qpid/buildtools/LICENSE
new file mode 100644
index 0000000000..bc46b77047
--- /dev/null
+++ b/qpid/buildtools/LICENSE
@@ -0,0 +1,206 @@
+=========================================================================
+== Apache License ==
+=========================================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/qpid/buildtools/NOTICE b/qpid/buildtools/NOTICE
new file mode 100644
index 0000000000..5813a7a09a
--- /dev/null
+++ b/qpid/buildtools/NOTICE
@@ -0,0 +1,8 @@
+// ------------------------------------------------------------------
+// NOTICE file corresponding to the section 4d of The Apache License,
+// Version 2.0, in this case for Qpid buildTools
+// ------------------------------------------------------------------
+
+Apache Qpid
+Copyright 2006-2008 Apache Software Foundation
+
diff --git a/qpid/buildtools/buildCreator/buildCreator.py b/qpid/buildtools/buildCreator/buildCreator.py
index f71a3fb50b..bebe130343 100755
--- a/qpid/buildtools/buildCreator/buildCreator.py
+++ b/qpid/buildtools/buildCreator/buildCreator.py
@@ -171,7 +171,6 @@ def main():
checkSystemRequirements()
-
if (len(args) > 2):
showUsage()
sys.exit(1)
@@ -279,7 +278,7 @@ def prepareEnvironment(env):
if _rootDir == "":
verbose (ROOTDIR+" value is empty. Please specify a value for "+ ROOTDIR)
- doExit(0)
+ attemptExit(0)
if (os.path.exists(_rootDir)):
verbose ("Using Existing root dir: "+_rootDir)
@@ -545,7 +544,7 @@ def postProcess(item, destination):
if firstline.find(TAR_DATA) != -1:
extractcommand=TAR_BIN+" -vxf "+root+PATH_SEP+file+" -C "+ builddir
- if firstline.find(DIFF_FILE) != -1:
+ if firstline.find(DIFF_FILE) != -1 or firstline.find("text"):
extractcommand=CP_BIN+" -r "+root+PATH_SEP+file+" "+ builddir
@@ -762,7 +761,7 @@ def runScript(script):
warn("Script Failed")
- doExit(1)
+ attemptExit(1)
################################################################################
@@ -878,7 +877,7 @@ def getIncludeValue(include):
else:
for line in stderr:
warn(line)
- doExit(1)
+ attemptExit(1)
#
# Given a file name parse the XML. Any trailing '\n's that the ls command may have added are removed here.
@@ -1030,7 +1029,7 @@ def runCommandShowError(command):
while current != lines:
log (last20[current])
current = current + 1
- doExit(1)
+ attemptExit(1)
#
# Runs the given command if showOutput is true then stdout/stderr is shown on screen
@@ -1100,6 +1099,7 @@ def runCommand(command, showOutput):
logWaitingDone()
else:
logWaitingFailed("Failed")
+ attemptExit(1)
if not showOutput:
last20[0]=index
return last20
@@ -1108,7 +1108,7 @@ def runCommand(command, showOutput):
except IOError:
logWaitingFailed ("Error running command.")
- doExit(1)
+ attemptExit(1)
#
# Runs the given command if showOutput is true then stdout/stderr is shown on screen
@@ -1161,9 +1161,11 @@ def runCommandWithOutput(command):
#
# Check _ignoreErrors value and exit if false
#
-def doExit(code):
+def attemptExit(code):
if not _ignoreErrors:
sys.exit(code)
+ else:
+ print ("Ignoring Errors")
#
# Check that the required binaries are present for this tool.
@@ -1296,7 +1298,7 @@ def warn (string):
def fatal(string):
print string
- doExit(1)
+ attemptExit(1)
def log_no_newline (string):
if _log:
@@ -1314,4 +1316,4 @@ def debug_no_newline (string):
sys.stdout.flush()
if __name__ == "__main__":
- main() \ No newline at end of file
+ main()
diff --git a/qpid/cc/LICENSE b/qpid/cc/LICENSE
new file mode 100644
index 0000000000..bc46b77047
--- /dev/null
+++ b/qpid/cc/LICENSE
@@ -0,0 +1,206 @@
+=========================================================================
+== Apache License ==
+=========================================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/qpid/cc/NOTICE b/qpid/cc/NOTICE
new file mode 100644
index 0000000000..05f39ba176
--- /dev/null
+++ b/qpid/cc/NOTICE
@@ -0,0 +1,8 @@
+// ------------------------------------------------------------------
+// NOTICE file corresponding to the section 4d of The Apache License,
+// Version 2.0, in this case for Qpid bin scripts
+// ------------------------------------------------------------------
+
+Apache Qpid
+Copyright 2006-2008 Apache Software Foundation
+
diff --git a/qpid/cpp/LICENSE b/qpid/cpp/LICENSE
index 6b0b1270ff..cff2a5e25d 100644
--- a/qpid/cpp/LICENSE
+++ b/qpid/cpp/LICENSE
@@ -1,3 +1,6 @@
+=========================================================================
+== Apache License ==
+=========================================================================
Apache License
Version 2.0, January 2004
@@ -201,3 +204,31 @@
See the License for the specific language governing permissions and
limitations under the License.
+=========================================================================
+== Boost License ==
+=========================================================================
+
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
diff --git a/qpid/cpp/NOTICE b/qpid/cpp/NOTICE
index cae69a873a..93ad37f21e 100644
--- a/qpid/cpp/NOTICE
+++ b/qpid/cpp/NOTICE
@@ -10,7 +10,6 @@ This product includes software developed by the Apache Software Foundation
Please read the LICENSE file present in the root directory of this
distribution.
-
Aside from contributions to the Apache Qpid project, this software also
includes (binary only):
- None at this time
diff --git a/qpid/cpp/src/cluster.mk b/qpid/cpp/src/cluster.mk
index 934ec0174b..d5be6dfc57 100644
--- a/qpid/cpp/src/cluster.mk
+++ b/qpid/cpp/src/cluster.mk
@@ -6,24 +6,26 @@ lib_LTLIBRARIES += libqpidcluster.la
if CPG
libqpidcluster_la_SOURCES = \
+ qpid/cluster/types.h \
qpid/cluster/Cluster.cpp \
qpid/cluster/Cluster.h \
qpid/cluster/Cpg.cpp \
qpid/cluster/Cpg.h \
qpid/cluster/Dispatchable.h \
qpid/cluster/ClusterPlugin.cpp \
- qpid/cluster/ConnectionInterceptor.h \
- qpid/cluster/ConnectionInterceptor.cpp \
- qpid/cluster/ClassifierHandler.h \
- qpid/cluster/ClassifierHandler.cpp \
- qpid/cluster/ShadowConnectionOutputHandler.h \
+ qpid/cluster/ConnectionCodec.h \
+ qpid/cluster/ConnectionCodec.cpp \
+ qpid/cluster/Connection.h \
+ qpid/cluster/Connection.cpp \
+ qpid/cluster/NoOpConnectionOutputHandler.h \
qpid/cluster/PollableCondition.h \
qpid/cluster/PollableCondition.cpp \
qpid/cluster/PollableQueue.h \
qpid/cluster/WriteEstimate.h \
qpid/cluster/WriteEstimate.cpp \
qpid/cluster/OutputInterceptor.h \
- qpid/cluster/OutputInterceptor.cpp
+ qpid/cluster/OutputInterceptor.cpp \
+ qpid/cluster/ProxyInputHandler.h
libqpidcluster_la_LIBADD= -lcpg libqpidbroker.la
diff --git a/qpid/cpp/src/qpid/Url.h b/qpid/cpp/src/qpid/Url.h
index 20f42db0ad..97b72ea993 100644
--- a/qpid/cpp/src/qpid/Url.h
+++ b/qpid/cpp/src/qpid/Url.h
@@ -76,7 +76,9 @@ struct Url : public std::vector<Address> {
/** Parse url, throw InvalidUrl if invalid. */
explicit Url(const char* url) { parse(url); }
- template<class T> Url& operator=(T s) { parse(s); return *this; }
+ Url& operator=(const Url& u) { this->std::vector<Address>::operator=(u); cache=u.cache; return *this; }
+ Url& operator=(const char* s) { parse(s); return *this; }
+ Url& operator=(const std::string& s) { parse(s); return *this; }
/** Throw InvalidUrl if the URL does not contain any addresses. */
void throwIfEmpty() const;
diff --git a/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp b/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp
index 0b996dedd2..15a8e9663d 100644
--- a/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp
+++ b/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp
@@ -21,16 +21,22 @@
#include "Connection.h"
#include "qpid/log/Statement.h"
#include "qpid/amqp_0_10/exceptions.h"
+#include "qpid/framing/AMQFrame.h"
+#include "qpid/framing/Buffer.h"
+#include "qpid/framing/ProtocolInitiation.h"
namespace qpid {
namespace amqp_0_10 {
using sys::Mutex;
-Connection::Connection(sys::OutputControl& o, broker::Broker& broker, const std::string& id, bool _isClient)
- : frameQueueClosed(false), output(o),
- connection(new broker::Connection(this, broker, id, _isClient)),
- identifier(id), initialized(false), isClient(_isClient), buffered(0) {}
+Connection::Connection(sys::OutputControl& o, const std::string& id, bool _isClient)
+ : frameQueueClosed(false), output(o), identifier(id), initialized(false), isClient(_isClient), buffered(0)
+{}
+
+void Connection::setInputHandler(std::auto_ptr<sys::ConnectionInputHandler> c) {
+ connection = c;
+}
size_t Connection::decode(const char* buffer, size_t size) {
framing::Buffer in(const_cast<char*>(buffer), size);
diff --git a/qpid/cpp/src/qpid/amqp_0_10/Connection.h b/qpid/cpp/src/qpid/amqp_0_10/Connection.h
index f6fb87f928..409ac0b9e3 100644
--- a/qpid/cpp/src/qpid/amqp_0_10/Connection.h
+++ b/qpid/cpp/src/qpid/amqp_0_10/Connection.h
@@ -22,15 +22,19 @@
*
*/
#include "qpid/sys/ConnectionCodec.h"
+#include "qpid/sys/ConnectionInputHandler.h"
#include "qpid/sys/ConnectionOutputHandler.h"
#include "qpid/sys/Mutex.h"
-#include "qpid/broker/Connection.h"
#include <boost/intrusive_ptr.hpp>
-#include <deque>
#include <memory>
+#include <deque>
namespace qpid {
-namespace broker { class Broker; }
+
+namespace sys {
+class ConnectionInputHandlerFactory;
+}
+
namespace amqp_0_10 {
class Connection : public sys::ConnectionCodec,
@@ -42,14 +46,15 @@ class Connection : public sys::ConnectionCodec,
bool frameQueueClosed;
mutable sys::Mutex frameQueueLock;
sys::OutputControl& output;
- boost::intrusive_ptr<broker::Connection> connection;
+ std::auto_ptr<sys::ConnectionInputHandler> connection;
std::string identifier;
bool initialized;
bool isClient;
size_t buffered;
public:
- Connection(sys::OutputControl&, broker::Broker&, const std::string& id, bool isClient = false);
+ Connection(sys::OutputControl&, const std::string& id, bool isClient);
+ void setInputHandler(std::auto_ptr<sys::ConnectionInputHandler> c);
size_t decode(const char* buffer, size_t size);
size_t encode(const char* buffer, size_t size);
bool isClosed() const;
diff --git a/qpid/cpp/src/qpid/broker/Broker.cpp b/qpid/cpp/src/qpid/broker/Broker.cpp
index 4d7c07649b..e983aee5c9 100644
--- a/qpid/cpp/src/qpid/broker/Broker.cpp
+++ b/qpid/cpp/src/qpid/broker/Broker.cpp
@@ -133,7 +133,7 @@ Broker::Broker(const Broker::Options& conf) :
acl(0),
dataDir(conf.noDataDir ? std::string () : conf.dataDir),
links(this),
- factory(*this),
+ factory(new ConnectionFactory(*this)),
sessionManager(
qpid::SessionState::Configuration(
conf.replayFlushLimit*1024, // convert kb to bytes.
@@ -372,7 +372,7 @@ uint16_t Broker::getPort() const {
// TODO: This should iterate over all protocolFactories
void Broker::accept() {
for (unsigned int i = 0; i < protocolFactories.size(); ++i)
- protocolFactories[i]->accept(poller, &factory);
+ protocolFactories[i]->accept(poller, factory.get());
}
@@ -382,7 +382,7 @@ void Broker::connect(
boost::function2<void, int, std::string> failed,
sys::ConnectionCodec::Factory* f)
{
- getProtocolFactory()->connect(poller, host, port, f ? f : &factory, failed);
+ getProtocolFactory()->connect(poller, host, port, f ? f : factory.get(), failed);
}
void Broker::connect(
diff --git a/qpid/cpp/src/qpid/broker/Broker.h b/qpid/cpp/src/qpid/broker/Broker.h
index f7399c375f..bd17d1bb00 100644
--- a/qpid/cpp/src/qpid/broker/Broker.h
+++ b/qpid/cpp/src/qpid/broker/Broker.h
@@ -103,7 +103,7 @@ class Broker : public sys::Runnable, public Plugin::Target,
QueueRegistry queues;
ExchangeRegistry exchanges;
LinkRegistry links;
- ConnectionFactory factory;
+ boost::shared_ptr<sys::ConnectionCodec::Factory> factory;
DtxManager dtxManager;
SessionManager sessionManager;
management::ManagementAgent* managementAgent;
@@ -178,7 +178,10 @@ class Broker : public sys::Runnable, public Plugin::Target,
boost::shared_ptr<sys::ProtocolFactory> getProtocolFactory() const;
/** Expose poller so plugins can register their descriptors. */
- boost::shared_ptr<sys::Poller> getPoller();
+ boost::shared_ptr<sys::Poller> getPoller();
+
+ boost::shared_ptr<sys::ConnectionCodec::Factory> getConnectionFactory() { return factory; }
+ void setConnectionFactory(boost::shared_ptr<sys::ConnectionCodec::Factory> f) { factory = f; }
};
}}
diff --git a/qpid/cpp/src/qpid/broker/Connection.cpp b/qpid/cpp/src/qpid/broker/Connection.cpp
index d65dbaeec7..8ed3ce84c8 100644
--- a/qpid/cpp/src/qpid/broker/Connection.cpp
+++ b/qpid/cpp/src/qpid/broker/Connection.cpp
@@ -49,9 +49,6 @@ namespace broker {
Connection::Connection(ConnectionOutputHandler* out_, Broker& broker_, const std::string& mgmtId_, bool isLink_) :
ConnectionState(out_, broker_),
- receivedFn(boost::bind(&Connection::receivedImpl, this, _1)),
- closedFn(boost::bind(&Connection::closedImpl, this)),
- doOutputFn(boost::bind(&Connection::doOutputImpl, this)),
adapter(*this, isLink_),
isLink(isLink_),
mgmtClosing(false),
@@ -72,8 +69,6 @@ Connection::Connection(ConnectionOutputHandler* out_, Broker& broker_, const std
mgmtObject = new management::Connection(agent, this, parent, mgmtId, !isLink);
agent->addObject(mgmtObject);
}
-
- Plugin::initializeAll(*this); // Let plug-ins update extension points.
}
void Connection::requestIOProcessing(boost::function0<void> callback)
@@ -90,9 +85,7 @@ Connection::~Connection()
links.notifyClosed(mgmtId);
}
-void Connection::received(framing::AMQFrame& frame) { receivedFn(frame); }
-
-void Connection::receivedImpl(framing::AMQFrame& frame){
+void Connection::received(framing::AMQFrame& frame) {
if (frame.getChannel() == 0 && frame.getMethod()) {
adapter.handle(frame);
} else {
@@ -172,9 +165,7 @@ void Connection::idleOut(){}
void Connection::idleIn(){}
-void Connection::closed() { closedFn(); }
-
-void Connection::closedImpl(){ // Physically closed, suspend open sessions.
+void Connection::closed(){ // Physically closed, suspend open sessions.
try {
while (!channels.empty())
ptr_map_ptr(channels.begin())->handleDetach();
@@ -194,9 +185,7 @@ void Connection::closedImpl(){ // Physically closed, suspend open sessions.
bool Connection::hasOutput() { return outputTasks.hasOutput(); }
-bool Connection::doOutput() { return doOutputFn(); }
-
-bool Connection::doOutputImpl() {
+bool Connection::doOutput() {
try{
if (ioCallback)
ioCallback(); // Lend the IO thread for management processing
diff --git a/qpid/cpp/src/qpid/broker/Connection.h b/qpid/cpp/src/qpid/broker/Connection.h
index 1367f3b9ca..8c23e64edf 100644
--- a/qpid/cpp/src/qpid/broker/Connection.h
+++ b/qpid/cpp/src/qpid/broker/Connection.h
@@ -44,7 +44,6 @@
#include "SessionHandler.h"
#include "qpid/management/Manageable.h"
#include "qpid/management/Connection.h"
-#include "qpid/Plugin.h"
#include "qpid/RefCounted.h"
#include <boost/ptr_container/ptr_map.hpp>
@@ -56,7 +55,6 @@ class LinkRegistry;
class Connection : public sys::ConnectionInputHandler,
public ConnectionState,
- public Plugin::Target,
public RefCounted
{
public:
@@ -95,19 +93,10 @@ class Connection : public sys::ConnectionInputHandler,
void notifyConnectionForced(const std::string& text);
void setUserId(const string& uid);
- // Extension points: allow plugins to insert additional functionality.
- boost::function<void(framing::AMQFrame&)> receivedFn;
- boost::function<void ()> closedFn;
- boost::function<bool ()> doOutputFn;
-
private:
typedef boost::ptr_map<framing::ChannelId, SessionHandler> ChannelMap;
typedef std::vector<Queue::shared_ptr>::iterator queue_iterator;
- void receivedImpl(framing::AMQFrame& frame);
- void closedImpl();
- bool doOutputImpl();
-
ChannelMap channels;
framing::AMQP_ClientProxy::Connection* client;
ConnectionHandler adapter;
diff --git a/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp b/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp
index 5de5a0230a..e6d8c49055 100644
--- a/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp
+++ b/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp
@@ -21,11 +21,14 @@
#include "ConnectionFactory.h"
#include "qpid/framing/ProtocolVersion.h"
#include "qpid/amqp_0_10/Connection.h"
+#include "qpid/broker/Connection.h"
namespace qpid {
namespace broker {
using framing::ProtocolVersion;
+typedef std::auto_ptr<amqp_0_10::Connection> ConnectionPtr;
+typedef std::auto_ptr<sys::ConnectionInputHandler> InputPtr;
ConnectionFactory::ConnectionFactory(Broker& b) : broker(b) {}
@@ -33,15 +36,21 @@ ConnectionFactory::~ConnectionFactory() {}
sys::ConnectionCodec*
ConnectionFactory::create(ProtocolVersion v, sys::OutputControl& out, const std::string& id) {
- if (v == ProtocolVersion(0, 10))
- return new amqp_0_10::Connection(out, broker, id);
+ if (v == ProtocolVersion(0, 10)) {
+ ConnectionPtr c(new amqp_0_10::Connection(out, id, false));
+ c->setInputHandler(InputPtr(new broker::Connection(c.get(), broker, id, false)));
+ return c.release();
+ }
return 0;
}
sys::ConnectionCodec*
ConnectionFactory::create(sys::OutputControl& out, const std::string& id) {
// used to create connections from one broker to another
- return new amqp_0_10::Connection(out, broker, id, true);
+ ConnectionPtr c(new amqp_0_10::Connection(out, id, true));
+ c->setInputHandler(InputPtr(new broker::Connection(c.get(), broker, id, true)));
+ return c.release();
}
+
}} // namespace qpid::broker
diff --git a/qpid/cpp/src/qpid/broker/ConnectionFactory.h b/qpid/cpp/src/qpid/broker/ConnectionFactory.h
index 5797495054..c61da81024 100644
--- a/qpid/cpp/src/qpid/broker/ConnectionFactory.h
+++ b/qpid/cpp/src/qpid/broker/ConnectionFactory.h
@@ -27,7 +27,8 @@ namespace qpid {
namespace broker {
class Broker;
-class ConnectionFactory : public sys::ConnectionCodec::Factory {
+class ConnectionFactory : public sys::ConnectionCodec::Factory
+{
public:
ConnectionFactory(Broker& b);
diff --git a/qpid/cpp/src/qpid/cluster/ClassifierHandler.cpp b/qpid/cpp/src/qpid/cluster/ClassifierHandler.cpp
deleted file mode 100644
index b78f795d20..0000000000
--- a/qpid/cpp/src/qpid/cluster/ClassifierHandler.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "ClassifierHandler.h"
-
-#include "qpid/framing/FrameDefaultVisitor.h"
-#include "qpid/framing/AMQFrame.h"
-
-namespace qpid {
-namespace cluster {
-
-using namespace framing;
-
-struct ClassifierHandler::Visitor : public FrameDefaultVisitor {
- Visitor(AMQFrame& f, ClassifierHandler& c)
- : chosen(0), frame(f), classifier(c) { f.getBody()->accept(*this); }
-
- void visit(const ExchangeDeclareBody&) { chosen=&classifier.wiring; }
- void visit(const ExchangeDeleteBody&) { chosen=&classifier.wiring; }
- void visit(const ExchangeBindBody&) { chosen=&classifier.wiring; }
- void visit(const ExchangeUnbindBody&) { chosen=&classifier.wiring; }
- void visit(const QueueDeclareBody&) { chosen=&classifier.wiring; }
- void visit(const QueueDeleteBody&) { chosen=&classifier.wiring; }
- void defaultVisit(const AMQBody&) { chosen=&classifier.other; }
-
- using framing::FrameDefaultVisitor::visit;
- using framing::FrameDefaultVisitor::defaultVisit;
-
- FrameHandler* chosen;
- AMQFrame& frame;
- ClassifierHandler& classifier;
-};
-
-void ClassifierHandler::handle(AMQFrame& f) { Visitor(f, *this).chosen->handle(f); }
-
-}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/cluster/ClassifierHandler.h b/qpid/cpp/src/qpid/cluster/ClassifierHandler.h
deleted file mode 100644
index 696e457c04..0000000000
--- a/qpid/cpp/src/qpid/cluster/ClassifierHandler.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef QPID_CLUSTER_CLASSIFIERHANDLER_H
-#define QPID_CLUSTER_CLASSIFIERHANDLER_H
-
-/*
- *
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "qpid/framing/FrameHandler.h"
-
-namespace qpid {
-namespace cluster {
-
-/**
- * Classify frames and forward to the appropriate handler.
- */
-class ClassifierHandler : public framing::FrameHandler
-{
- public:
- ClassifierHandler(framing::FrameHandler& wiring_,
- framing::FrameHandler& other_)
- : wiring(wiring_), other(other_) {}
-
- void handle(framing::AMQFrame&);
-
- private:
- struct Visitor;
- friend struct Visitor;
- framing::FrameHandler& wiring;
- framing::FrameHandler& other;
-};
-
-}} // namespace qpid::cluster
-
-
-
-#endif /*!QPID_CLUSTER_CLASSIFIERHANDLER_H*/
diff --git a/qpid/cpp/src/qpid/cluster/Cluster.cpp b/qpid/cpp/src/qpid/cluster/Cluster.cpp
index f36d606af8..aea10949e4 100644
--- a/qpid/cpp/src/qpid/cluster/Cluster.cpp
+++ b/qpid/cpp/src/qpid/cluster/Cluster.cpp
@@ -4,7 +4,7 @@
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+n * You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -17,18 +17,17 @@
*/
#include "Cluster.h"
-#include "ConnectionInterceptor.h"
+#include "Connection.h"
#include "qpid/broker/Broker.h"
-#include "qpid/broker/SessionState.h"
-#include "qpid/broker/Connection.h"
#include "qpid/framing/AMQFrame.h"
-#include "qpid/framing/ClusterNotifyBody.h"
-#include "qpid/framing/ClusterConnectionCloseBody.h"
-#include "qpid/framing/ClusterConnectionDoOutputBody.h"
+#include "qpid/framing/ClusterJoinedBody.h"
#include "qpid/log/Statement.h"
#include "qpid/memory.h"
#include "qpid/shared_ptr.h"
+#include "qpid/framing/AMQP_AllOperations.h"
+#include "qpid/framing/AllInvoker.h"
+#include "qpid/framing/Invoker.h"
#include <boost/bind.hpp>
#include <boost/cast.hpp>
@@ -39,22 +38,34 @@
namespace qpid {
namespace cluster {
+
using namespace qpid::framing;
using namespace qpid::sys;
using namespace std;
-using broker::Connection;
+// Handle cluster controls from a given member.
+struct ClusterOperations : public framing::AMQP_AllOperations::ClusterHandler {
+ Cluster& cluster;
+ MemberId member;
+
+ ClusterOperations(Cluster& c, const MemberId& m) : cluster(c), member(m) {}
+
+ void joined(const std::string& url) {
+ cluster.joined(member, url);
+ }
+};
+
ostream& operator <<(ostream& out, const Cluster& cluster) {
return out << cluster.name.str() << "-" << cluster.self;
}
-ostream& operator<<(ostream& out, const Cluster::MemberMap::value_type& m) {
- return out << m.first << "=" << m.second.url;
+ostream& operator<<(ostream& out, const Cluster::UrlMap::value_type& m) {
+ return out << m.first << " at " << m.second;
}
-ostream& operator <<(ostream& out, const Cluster::MemberMap& members) {
- ostream_iterator<Cluster::MemberMap::value_type> o(out, " ");
- copy(members.begin(), members.end(), o);
+ostream& operator <<(ostream& out, const Cluster::UrlMap& urls) {
+ ostream_iterator<Cluster::UrlMap::value_type> o(out, " ");
+ copy(urls.begin(), urls.end(), o);
return out;
}
@@ -74,9 +85,9 @@ Cluster::Cluster(const std::string& name_, const Url& url_, broker::Broker& b) :
mcastQueue(boost::bind(&Cluster::mcastQueueCb, this, _1, _2))
{
broker->addFinalizer(boost::bind(&Cluster::leave, this));
- QPID_LOG(trace, "Joining cluster: " << name_);
+ QPID_LOG(trace, "Node " << self << " joining cluster: " << name_);
cpg.join(name);
- notify();
+ send(AMQFrame(in_place<ClusterJoinedBody>(ProtocolVersion(), url.str())), ConnectionId(self,0));
// Start dispatching from the poller.
cpgDispatchHandle.startWatch(poller);
@@ -84,31 +95,15 @@ Cluster::Cluster(const std::string& name_, const Url& url_, broker::Broker& b) :
mcastQueue.start(poller);
}
-Cluster::~Cluster() {
- for (ShadowConnectionMap::iterator i = shadowConnectionMap.begin();
- i != shadowConnectionMap.end();
- ++i)
- {
- i->second->dirtyClose();
- }
- std::for_each(localConnectionSet.begin(), localConnectionSet.end(), boost::bind(&ConnectionInterceptor::dirtyClose, _1));
-}
-
-void Cluster::initialize(broker::Connection& c) {
- bool isLocal = c.getOutput().get() != &shadowOut;
- if (isLocal)
- localConnectionSet.insert(new ConnectionInterceptor(c, *this));
-}
+Cluster::~Cluster() {}
void Cluster::leave() {
Mutex::ScopedLock l(lock);
if (!broker) return; // Already left.
// Leave is called by from Broker destructor after the poller has
// been shut down. No dispatches can occur.
-
- QPID_LOG(debug, "Leaving cluster " << *this);
cpg.leave(name);
- // broker= is set to 0 when the final config-change is delivered.
+ // broker is set to 0 when the final config-change is delivered.
while(broker) {
Mutex::ScopedUnlock u(lock);
cpg.dispatchAll();
@@ -126,9 +121,9 @@ template <class T> void encodePtr(Buffer& buf, T* ptr) {
buf.putLongLong(value);
}
-void Cluster::send(const AMQFrame& frame, ConnectionInterceptor* connection) {
- QPID_LOG(trace, "MCAST [" << connection << "] " << frame);
- mcastQueue.push(Message(frame, self, connection));
+void Cluster::send(const AMQFrame& frame, const ConnectionId& id) {
+ QPID_LOG(trace, "MCAST [" << id << "] " << frame);
+ mcastQueue.push(Message(frame, id));
}
void Cluster::mcastQueueCb(const MessageQueue::iterator& begin,
@@ -137,48 +132,40 @@ void Cluster::mcastQueueCb(const MessageQueue::iterator& begin,
// Static is OK because there is only one cluster allowed per
// process and only one thread in mcastQueueCb at a time.
static char buffer[64*1024]; // FIXME aconway 2008-07-04: buffer management.
- MessageQueue::iterator i = begin;
- while (i != end) {
- Buffer buf(buffer, sizeof(buffer));
- while (i != end && buf.available() > i->frame.size() + sizeof(uint64_t)) {
- i->frame.encode(buf);
- encodePtr(buf, i->connection);
- ++i;
- }
- iovec iov = { buffer, buf.getPosition() };
- cpg.mcast(name, &iov, 1);
+ Buffer buf(buffer, sizeof(buffer));
+ for (MessageQueue::iterator i = begin; i != end; ++i) {
+ AMQFrame& frame =i->first;
+ ConnectionId id =i->second;
+ if (buf.available() < frame.size() + sizeof(uint64_t))
+ break;
+ frame.encode(buf);
+ encodePtr(buf, id.second);
}
-}
-
-void Cluster::notify() {
- send(AMQFrame(in_place<ClusterNotifyBody>(ProtocolVersion(), url.str())), 0);
+ iovec iov = { buffer, buf.getPosition() };
+ cpg.mcast(name, &iov, 1);
}
size_t Cluster::size() const {
Mutex::ScopedLock l(lock);
- return members.size();
+ return urls.size();
}
-Cluster::MemberList Cluster::getMembers() const {
+std::vector<Url> Cluster::getUrls() const {
Mutex::ScopedLock l(lock);
- MemberList result(members.size());
- std::transform(members.begin(), members.end(), result.begin(),
- boost::bind(&MemberMap::value_type::second, _1));
+ std::vector<Url> result(urls.size());
+ std::transform(urls.begin(), urls.end(), result.begin(), boost::bind(&UrlMap::value_type::second, _1));
return result;
}
-ConnectionInterceptor* Cluster::getShadowConnection(const Cpg::Id& member, void* remotePtr) {
- ShadowConnectionId id(member, remotePtr);
- ShadowConnectionMap::iterator i = shadowConnectionMap.find(id);
- if (i == shadowConnectionMap.end()) { // A new shadow connection.
+boost::intrusive_ptr<Connection> Cluster::getConnection(const ConnectionId& id) {
+ boost::intrusive_ptr<Connection> c = connections[id];
+ if (!c && id.first != self) { // Shadow connection
std::ostringstream os;
- os << name << ":" << member << ":" << remotePtr;
- assert(broker);
- broker::Connection* c = new broker::Connection(&shadowOut, *broker, os.str());
- ShadowConnectionMap::value_type value(id, new ConnectionInterceptor(*c, *this, id));
- i = shadowConnectionMap.insert(value).first;
+ os << id;
+ c = connections[id] = new Connection(*this, shadowOut, os.str(), id);
}
- return i->second;
+ assert(c);
+ return c;
}
void Cluster::deliver(
@@ -189,16 +176,17 @@ void Cluster::deliver(
void* msg,
int msg_len)
{
- Id from(nodeid, pid);
+ MemberId from(nodeid, pid);
try {
Buffer buf(static_cast<char*>(msg), msg_len);
while (buf.available() > 0) {
AMQFrame frame;
if (!frame.decode(buf)) // Not enough data.
throw Exception("Received incomplete cluster event.");
- void* connection;
- decodePtr(buf, connection);
- deliverQueue.push(Message(frame, from, connection));
+ Connection* cp;
+ decodePtr(buf, cp);
+ QPID_LOG(critical, "deliverQ.push " << frame);
+ deliverQueue.push(Message(frame, ConnectionId(from, cp)));
}
}
catch (const std::exception& e) {
@@ -213,23 +201,21 @@ void Cluster::deliverQueueCb(const MessageQueue::iterator& begin,
const MessageQueue::iterator& end)
{
for (MessageQueue::iterator i = begin; i != end; ++i) {
- AMQFrame& frame(i->frame);
- Id from(i->from);
- ConnectionInterceptor* connection = reinterpret_cast<ConnectionInterceptor*>(i->connection);
+ AMQFrame& frame(i->first);
+ ConnectionId connectionId(i->second);
try {
- QPID_LOG(trace, "DLVR [" << from << " " << connection << "] " << frame);
-
+ QPID_LOG(trace, "DLVR [" << connectionId << "]: " << frame);
if (!broker) {
- QPID_LOG(warning, "Unexpected DLVR, already left the cluster.");
+ QPID_LOG(error, "Unexpected DLVR after leaving the cluster.");
return;
}
- if (connection && from != self) // Look up shadow for remote connections
- connection = getShadowConnection(from, connection);
-
- if (frame.getMethod() && frame.getMethod()->amqpClassId() == CLUSTER_CLASS_ID)
- handleMethod(from, connection, *frame.getMethod());
- else
- connection->deliver(frame);
+ if (connectionId.getConnectionPtr()) // Connection control
+ getConnection(connectionId)->deliver(frame);
+ else { // Cluster control
+ ClusterOperations cops(*this, connectionId.getMember());
+ bool invoked = framing::invoke(cops, *frame.getBody()).wasHandled();
+ assert(invoked);
+ }
}
catch (const std::exception& e) {
// FIXME aconway 2008-01-30: exception handling.
@@ -240,54 +226,30 @@ void Cluster::deliverQueueCb(const MessageQueue::iterator& begin,
}
}
-// Handle cluster methods
-// FIXME aconway 2008-07-11: Generate/template a better dispatch mechanism.
-void Cluster::handleMethod(Id from, ConnectionInterceptor* connection, AMQMethodBody& method) {
- assert(method.amqpClassId() == CLUSTER_CLASS_ID);
- switch (method.amqpMethodId()) {
- case CLUSTER_NOTIFY_METHOD_ID: {
- ClusterNotifyBody& notify=static_cast<ClusterNotifyBody&>(method);
- Mutex::ScopedLock l(lock);
- members[from].url=notify.getUrl();
- lock.notifyAll();
- break;
- }
- case CLUSTER_CONNECTION_CLOSE_METHOD_ID: {
- if (!connection->isLocal())
- shadowConnectionMap.erase(connection->getShadowId());
- else
- localConnectionSet.erase(connection);
- connection->deliverClosed();
- break;
- }
- case CLUSTER_CONNECTION_DO_OUTPUT_METHOD_ID: {
- ClusterConnectionDoOutputBody& doOutput = static_cast<ClusterConnectionDoOutputBody&>(method);
- connection->deliverDoOutput(doOutput.getBytes());
- break;
- }
- default:
- assert(0);
- }
+void Cluster::joined(const MemberId& member, const string& url) {
+ Mutex::ScopedLock l(lock);
+ QPID_LOG(debug, member << " has URL " << url);
+ urls[member] = url;
+ lock.notifyAll();
}
void Cluster::configChange(
cpg_handle_t /*handle*/,
cpg_name */*group*/,
- cpg_address *current, int nCurrent,
+ cpg_address */*current*/, int /*nCurrent*/,
cpg_address *left, int nLeft,
- cpg_address */*joined*/, int nJoined)
+ cpg_address *joined, int nJoined)
{
+ QPID_LOG(debug, "Cluster change: " << std::make_pair(joined, nJoined) << std::make_pair(left, nLeft));
Mutex::ScopedLock l(lock);
- for (int i = 0; i < nLeft; ++i)
- members.erase(left[i]);
- for(int j = 0; j < nCurrent; ++j)
- members[current[j]].id = current[j];
- QPID_LOG(debug, "Cluster members: " << nCurrent << " ("<< nLeft << " left, " << nJoined << " joined):"
- << members);
- assert(members.size() == size_t(nCurrent));
- if (members.find(self) == members.end())
+ // We add URLs to the map in joined() we don't keep track of pre-URL members yet.
+ for (int l = 0; l < nLeft; ++l) urls.erase(left[l]);
+
+ if (std::find(left, left+nLeft, self) != left+nLeft) {
broker = 0; // We have left the group, this is the final config change.
- lock.notifyAll(); // Threads waiting for membership changes.
+ QPID_LOG(debug, "Leaving cluster " << *this);
+ }
+ lock.notifyAll(); // Threads waiting for url changes.
}
void Cluster::dispatch(sys::DispatchHandle& h) {
@@ -301,6 +263,16 @@ void Cluster::disconnect(sys::DispatchHandle& h) {
broker->shutdown();
}
+void Cluster::insert(const boost::intrusive_ptr<Connection>& c) {
+ Mutex::ScopedLock l(lock);
+ connections[c->getId()] = c;
+}
+
+void Cluster::erase(ConnectionId id) {
+ Mutex::ScopedLock l(lock);
+ connections.erase(id);
+}
+
}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/cluster/Cluster.h b/qpid/cpp/src/qpid/cluster/Cluster.h
index 2b40193dd3..45bb3ed3c4 100644
--- a/qpid/cpp/src/qpid/cluster/Cluster.h
+++ b/qpid/cpp/src/qpid/cluster/Cluster.h
@@ -19,22 +19,16 @@
*
*/
+#include "qpid/cluster/types.h"
#include "qpid/cluster/Cpg.h"
-#include "qpid/cluster/ShadowConnectionOutputHandler.h"
#include "qpid/cluster/PollableQueue.h"
+#include "qpid/cluster/NoOpConnectionOutputHandler.h"
#include "qpid/broker/Broker.h"
-#include "qpid/broker/Connection.h"
-#include "qpid/sys/Dispatcher.h"
#include "qpid/sys/Monitor.h"
-#include "qpid/sys/Runnable.h"
-#include "qpid/sys/Thread.h"
-#include "qpid/log/Logger.h"
+#include "qpid/framing/AMQP_AllOperations.h"
#include "qpid/Url.h"
-#include "qpid/RefCounted.h"
-#include <boost/optional.hpp>
-#include <boost/function.hpp>
#include <boost/intrusive_ptr.hpp>
#include <map>
@@ -43,24 +37,15 @@
namespace qpid {
namespace cluster {
-class ConnectionInterceptor;
+class Connection;
/**
* Connection to the cluster.
* Keeps cluster membership data.
*/
-class Cluster : private Cpg::Handler, public RefCounted
+class Cluster : public RefCounted, private Cpg::Handler
{
public:
- typedef boost::tuple<Cpg::Id, void*> ShadowConnectionId;
-
- /** Details of a cluster member */
- struct Member {
- Cpg::Id id;
- Url url;
- };
-
- typedef std::vector<Member> MemberList;
/**
* Join a cluster.
@@ -71,11 +56,11 @@ class Cluster : private Cpg::Handler, public RefCounted
virtual ~Cluster();
- /** Initialize interceptors for a new connection */
- void initialize(broker::Connection&);
+ void insert(const boost::intrusive_ptr<Connection>&); // Insert a local connection
+ void erase(ConnectionId); // Erase a connection.
- /** Get the current cluster membership. */
- MemberList getMembers() const;
+ /** Get the URLs of current cluster members. */
+ std::vector<Url> getUrls() const;
/** Number of members in the cluster. */
size_t size() const;
@@ -83,33 +68,27 @@ class Cluster : private Cpg::Handler, public RefCounted
bool empty() const { return size() == 0; }
/** Send frame to the cluster */
- void send(const framing::AMQFrame&, ConnectionInterceptor*);
+ void send(const framing::AMQFrame&, const ConnectionId&);
/** Leave the cluster */
void leave();
- // Cluster frame handing functions
- void notify(const std::string& url);
- void connectionClose();
+ void joined(const MemberId&, const std::string& url);
+
+ broker::Broker& getBroker() { assert(broker); return *broker; }
+ MemberId getSelf() const { return self; }
+
private:
- typedef Cpg::Id Id;
- typedef std::map<Id, Member> MemberMap;
- typedef std::map<ShadowConnectionId, ConnectionInterceptor*> ShadowConnectionMap;
- typedef std::set<ConnectionInterceptor*> LocalConnectionSet;
+ typedef std::map<MemberId, Url> UrlMap;
+ typedef std::map<ConnectionId, boost::intrusive_ptr<cluster::Connection> > ConnectionMap;
/** Message sent over the cluster. */
- struct Message {
- framing::AMQFrame frame; Id from; void* connection;
- Message(const framing::AMQFrame& f, const Id i, void* c)
- : frame(f), from(i), connection(c) {}
- };
+ typedef std::pair<framing::AMQFrame, ConnectionId> Message;
typedef PollableQueue<Message> MessageQueue;
boost::function<void()> shutdownNext;
- void notify(); ///< Notify cluster of my details.
-
/** CPG deliver callback. */
void deliver(
cpg_handle_t /*handle*/,
@@ -142,9 +121,9 @@ class Cluster : private Cpg::Handler, public RefCounted
/** Callback if CPG fd is disconnected. */
void disconnect(sys::DispatchHandle&);
- void handleMethod(Id from, ConnectionInterceptor* connection, framing::AMQMethodBody& method);
+ void handleMethod(MemberId from, cluster::Connection* connection, framing::AMQMethodBody& method);
- ConnectionInterceptor* getShadowConnection(const Cpg::Id&, void*);
+ boost::intrusive_ptr<cluster::Connection> getConnection(const ConnectionId&);
mutable sys::Monitor lock; // Protect access to members.
broker::Broker* broker;
@@ -152,18 +131,17 @@ class Cluster : private Cpg::Handler, public RefCounted
Cpg cpg;
Cpg::Name name;
Url url;
- MemberMap members;
- Id self;
- ShadowConnectionMap shadowConnectionMap;
- LocalConnectionSet localConnectionSet;
- ShadowConnectionOutputHandler shadowOut;
+ UrlMap urls;
+ MemberId self;
+ ConnectionMap connections;
+ NoOpConnectionOutputHandler shadowOut;
sys::DispatchHandle cpgDispatchHandle;
MessageQueue deliverQueue;
MessageQueue mcastQueue;
friend std::ostream& operator <<(std::ostream&, const Cluster&);
- friend std::ostream& operator <<(std::ostream&, const MemberMap::value_type&);
- friend std::ostream& operator <<(std::ostream&, const MemberMap&);
+ friend std::ostream& operator <<(std::ostream&, const UrlMap::value_type&);
+ friend std::ostream& operator <<(std::ostream&, const UrlMap&);
};
}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp b/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp
index 1d07660455..d829683000 100644
--- a/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp
+++ b/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp
@@ -16,10 +16,13 @@
*
*/
-#include "ConnectionInterceptor.h"
+#include "Connection.h"
+#include "ConnectionCodec.h"
-#include "qpid/broker/Broker.h"
#include "qpid/cluster/Cluster.h"
+#include "qpid/cluster/ConnectionCodec.h"
+
+#include "qpid/broker/Broker.h"
#include "qpid/Plugin.h"
#include "qpid/Options.h"
#include "qpid/shared_ptr.h"
@@ -63,36 +66,25 @@ struct ClusterPlugin : public Plugin {
ClusterValues values;
ClusterOptions options;
boost::intrusive_ptr<Cluster> cluster;
+ boost::scoped_ptr<ConnectionCodec::Factory> factory;
ClusterPlugin() : options(values) {}
Options* getOptions() { return &options; }
- void init(broker::Broker& b) {
- if (values.name.empty()) return; // Only if --cluster-name option was specified.
+ void initialize(Plugin::Target& target) {
+ broker::Broker* broker = dynamic_cast<broker::Broker*>(&target);
+ if (!broker || values.name.empty()) return; // Only if --cluster-name option was specified.
if (cluster) throw Exception("Cluster plugin cannot be initialized twice in one process.");
- cluster = new Cluster(values.name, values.getUrl(b.getPort()), b);
- b.addFinalizer(boost::bind(&ClusterPlugin::shutdown, this));
- }
-
- template <class T> void init(T& t) {
- if (cluster) cluster->initialize(t);
- }
-
- template <class T> bool init(Plugin::Target& target) {
- T* t = dynamic_cast<T*>(&target);
- if (t) init(*t);
- return t;
+ cluster = new Cluster(values.name, values.getUrl(broker->getPort()), *broker);
+ broker->addFinalizer(boost::bind(&ClusterPlugin::shutdown, this));
+ broker->setConnectionFactory(
+ boost::shared_ptr<sys::ConnectionCodec::Factory>(
+ new ConnectionCodec::Factory(broker->getConnectionFactory(), *cluster)));
}
void earlyInitialize(Plugin::Target&) {}
- void initialize(Plugin::Target& target) {
- if (init<broker::Broker>(target)) return;
- if (!cluster) return; // Remaining plugins only valid if cluster initialized.
- if (init<broker::Connection>(target)) return;
- }
-
void shutdown() { cluster = 0; }
};
diff --git a/qpid/cpp/src/qpid/cluster/Connection.cpp b/qpid/cpp/src/qpid/cluster/Connection.cpp
new file mode 100644
index 0000000000..b82b4565c3
--- /dev/null
+++ b/qpid/cpp/src/qpid/cluster/Connection.cpp
@@ -0,0 +1,94 @@
+/*
+ *
+ * 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.
+ *
+ */
+#include "Connection.h"
+#include "qpid/framing/AMQFrame.h"
+#include "qpid/framing/Invoker.h"
+#include "qpid/framing/AllInvoker.h"
+#include "qpid/framing/ClusterConnectionDeliverCloseBody.h"
+#include "qpid/log/Statement.h"
+
+#include <boost/current_function.hpp>
+
+namespace qpid {
+namespace cluster {
+
+using namespace framing;
+
+Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out,
+ const std::string& wrappedId, ConnectionId myId)
+ : cluster(c), self(myId), output(*this, out),
+ connection(&output, cluster.getBroker(), wrappedId)
+{}
+
+Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out,
+ const std::string& wrappedId, MemberId myId)
+ : cluster(c), self(myId, this), output(*this, out),
+ connection(&output, cluster.getBroker(), wrappedId)
+{}
+
+Connection::~Connection() {}
+
+// Forward all received frames to the cluster, continue handling on delivery.
+void Connection::received(framing::AMQFrame& f) {
+ cluster.send(f, self);
+}
+
+// Don't doOutput in the
+bool Connection::doOutput() { return output.doOutput(); }
+
+// Handle frames delivered from cluster.
+void Connection::deliver(framing::AMQFrame& f) {
+ // Handle connection controls, deliver other frames to connection.
+ if (!framing::invoke(*this, *f.getBody()).wasHandled())
+ connection.received(f);
+}
+
+void Connection::closed() {
+ try {
+ // Called when the local network connection is closed. We still
+ // need to process any outstanding cluster frames for this
+ // connection to ensure our sessions are up-to-date. We defer
+ // closing the Connection object till deliverClosed(), but replace
+ // its output handler with a null handler since the network output
+ // handler will be deleted.
+ //
+ connection.setOutputHandler(&discardHandler);
+ cluster.send(AMQFrame(in_place<ClusterConnectionDeliverCloseBody>()), self);
+ }
+ catch (const std::exception& e) {
+ QPID_LOG(error, QPID_MSG("While closing connection: " << e.what()));
+ }
+}
+
+void Connection::deliverClose () {
+ connection.closed();
+ cluster.erase(self);
+}
+
+// Delivery of doOutput allows us to run the real connection doOutput()
+// which stocks up the write buffers with data.
+//
+void Connection::deliverDoOutput(size_t requested) {
+ output.deliverDoOutput(requested);
+}
+
+}} // namespace qpid::cluster
+
diff --git a/qpid/cpp/src/qpid/cluster/ConnectionInterceptor.h b/qpid/cpp/src/qpid/cluster/Connection.h
index 9216921067..648ec1a1d0 100644
--- a/qpid/cpp/src/qpid/cluster/ConnectionInterceptor.h
+++ b/qpid/cpp/src/qpid/cluster/Connection.h
@@ -1,5 +1,5 @@
-#ifndef QPID_CLUSTER_CONNECTIONINTERCEPTOR_H
-#define QPID_CLUSTER_CONNECTIONINTERCEPTOR_H
+#ifndef QPID_CLUSTER_CONNECTION_H
+#define QPID_CLUSTER_CONNECTION_H
/*
*
@@ -22,67 +22,80 @@
*
*/
+#include "types.h"
#include "Cluster.h"
#include "WriteEstimate.h"
#include "OutputInterceptor.h"
+
#include "qpid/broker/Connection.h"
+#include "qpid/amqp_0_10/Connection.h"
+#include "qpid/sys/ConnectionInputHandler.h"
#include "qpid/sys/ConnectionOutputHandler.h"
namespace qpid {
+
namespace framing { class AMQFrame; }
+
namespace cluster {
/**
* Plug-in associated with broker::Connections, both local and shadow.
*/
-class ConnectionInterceptor {
+class Connection :
+ public RefCounted,
+ public sys::ConnectionInputHandler,
+ public sys::ConnectionOutputHandler,
+ public framing::AMQP_AllOperations::ClusterConnectionHandler
+
+{
public:
- ConnectionInterceptor(broker::Connection&, Cluster&,
- Cluster::ShadowConnectionId shadowId=Cluster::ShadowConnectionId(0,0));
- ~ConnectionInterceptor();
+ /** Local connection, use this in ConnectionId */
+ Connection(Cluster&, sys::ConnectionOutputHandler& out, const std::string& id, MemberId);
+ /** Shadow connection */
+ Connection(Cluster&, sys::ConnectionOutputHandler& out, const std::string& id, ConnectionId);
+ ~Connection();
- Cluster::ShadowConnectionId getShadowId() const { return shadowId; }
+ ConnectionId getId() const { return self; }
+ bool isLocal() const { return self.second == this; }
- bool isShadow() const { return shadowId != Cluster::ShadowConnectionId(0,0); }
- bool isLocal() const { return !isShadow(); }
- bool getClosed() const { return isClosed; }
-
// self-delivery of intercepted extension points.
void deliver(framing::AMQFrame& f);
- void deliverClosed();
+ void deliverClose();
void deliverDoOutput(size_t requested);
- void dirtyClose();
-
- Cluster& getCluster() { return cluster; }
+ void codecDeleted();
- private:
- struct NullConnectionHandler : public qpid::sys::ConnectionOutputHandler {
- void close() {}
- void send(framing::AMQFrame&) {}
- void activateOutput() {}
- };
+ Cluster& getCluster() { return cluster; }
+
+ // ConnectionOutputHandler methods
+ void close() {}
+ void send(framing::AMQFrame&) {}
+ void activateOutput() {}
+ virtual size_t getBuffered() const { assert(0); return 0; }
- // Functions to intercept to Connection extension points.
+ // ConnectionInputHandler methods
void received(framing::AMQFrame&);
void closed();
bool doOutput();
- void activateOutput();
+ bool hasOutput() { return connection.hasOutput(); }
+ void idleOut() { idleOut(); }
+ void idleIn() { idleIn(); }
- void sendDoOutput();
+ // ConnectionInputHandlerFactory
+ sys::ConnectionInputHandler* create(sys::ConnectionOutputHandler* out, const std::string& id, bool isClient);
- boost::function<void (framing::AMQFrame&)> receivedNext;
- boost::function<void ()> closedNext;
+ broker::Connection& getBrokerConnection() { return connection; }
+ private:
+ void sendDoOutput();
- boost::intrusive_ptr<broker::Connection> connection;
Cluster& cluster;
- NullConnectionHandler discardHandler;
- bool isClosed;
- Cluster::ShadowConnectionId shadowId;
+ ConnectionId self;
+ NoOpConnectionOutputHandler discardHandler;
WriteEstimate writeEstimate;
OutputInterceptor output;
+ broker::Connection connection;
};
}} // namespace qpid::cluster
-#endif /*!QPID_CLUSTER_CONNECTIONINTERCEPTOR_H*/
+#endif /*!QPID_CLUSTER_CONNECTION_H*/
diff --git a/qpid/cpp/src/qpid/cluster/ConnectionCodec.cpp b/qpid/cpp/src/qpid/cluster/ConnectionCodec.cpp
new file mode 100644
index 0000000000..cb396cd10c
--- /dev/null
+++ b/qpid/cpp/src/qpid/cluster/ConnectionCodec.cpp
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.
+ *
+ */
+#include "ConnectionCodec.h"
+#include "Connection.h"
+#include "ProxyInputHandler.h"
+#include "qpid/broker/Connection.h"
+#include "qpid/memory.h"
+
+namespace qpid {
+namespace cluster {
+
+sys::ConnectionCodec*
+ConnectionCodec::Factory::create(framing::ProtocolVersion v, sys::OutputControl& out, const std::string& id) {
+ if (v == framing::ProtocolVersion(0, 10))
+ return new ConnectionCodec(out, id, cluster);
+ return 0;
+}
+
+sys::ConnectionCodec*
+ConnectionCodec::Factory::create(sys::OutputControl& out, const std::string& id) {
+ // FIXME aconway 2008-08-27: outbound connections need to be made
+ // with proper qpid::client code for failover, get rid of this
+ // broker-side hack.
+ return next->create(out, id);
+}
+
+ConnectionCodec::ConnectionCodec(sys::OutputControl& out, const std::string& id, Cluster& cluster)
+ : codec(out, id, false),
+ interceptor(new Connection(cluster, codec, id, cluster.getSelf()))
+{
+ std::auto_ptr<sys::ConnectionInputHandler> ih(new ProxyInputHandler(interceptor));
+ codec.setInputHandler(ih);
+ cluster.insert(interceptor);
+}
+
+ConnectionCodec::~ConnectionCodec() {}
+
+// ConnectionCodec functions delegate to the codecOutput
+size_t ConnectionCodec::decode(const char* buffer, size_t size) { return codec.decode(buffer, size); }
+size_t ConnectionCodec::encode(const char* buffer, size_t size) { return codec.encode(buffer, size); }
+bool ConnectionCodec::canEncode() { return codec.canEncode(); }
+void ConnectionCodec::closed() { codec.closed(); }
+bool ConnectionCodec::isClosed() const { return codec.isClosed(); }
+framing::ProtocolVersion ConnectionCodec::getVersion() const { return codec.getVersion(); }
+
+}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/cluster/ConnectionCodec.h b/qpid/cpp/src/qpid/cluster/ConnectionCodec.h
new file mode 100644
index 0000000000..cbc3dcdfe6
--- /dev/null
+++ b/qpid/cpp/src/qpid/cluster/ConnectionCodec.h
@@ -0,0 +1,77 @@
+#ifndef QPID_CLUSTER_CONNCTIONCODEC_H
+#define QPID_CLUSTER_CONNCTIONCODEC_H
+
+/*
+ *
+ * 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.
+ *
+ */
+
+#include "qpid/amqp_0_10/Connection.h"
+#include "qpid/cluster/Connection.h"
+#include <boost/shared_ptr.hpp>
+#include <boost/intrusive_ptr.hpp>
+
+namespace qpid {
+
+namespace broker {
+class Connection;
+}
+
+namespace cluster {
+class Cluster;
+
+/**
+ * Encapsulates the standard amqp_0_10::ConnectionCodec and sets up
+ * a cluster::Connection for the connection.
+ *
+ * The ConnectionCodec is deleted by the network layer when the
+ * connection closes. The cluster::Connection needs to be kept
+ * around until all cluster business on the connection is complete.
+ *
+ */
+class ConnectionCodec : public sys::ConnectionCodec {
+ public:
+ struct Factory : public sys::ConnectionCodec::Factory {
+ boost::shared_ptr<sys::ConnectionCodec::Factory> next;
+ Cluster& cluster;
+ Factory(boost::shared_ptr<sys::ConnectionCodec::Factory> f, Cluster& c) : next(f), cluster(c) {}
+ sys::ConnectionCodec* create(framing::ProtocolVersion, sys::OutputControl&, const std::string& id);
+ sys::ConnectionCodec* create(sys::OutputControl&, const std::string& id);
+ };
+
+ ConnectionCodec(sys::OutputControl& out, const std::string& id, Cluster& c);
+ ~ConnectionCodec();
+
+ // ConnectionCodec functions delegate to the codecOutput
+ size_t decode(const char* buffer, size_t size);
+ size_t encode(const char* buffer, size_t size);
+ bool canEncode();
+ void closed();
+ bool isClosed() const;
+ framing::ProtocolVersion getVersion() const;
+
+
+ private:
+ amqp_0_10::Connection codec;
+ boost::intrusive_ptr<cluster::Connection> interceptor;
+};
+
+}} // namespace qpid::cluster
+
+#endif /*!QPID_CLUSTER_CONNCTIONCODEC_H*/
diff --git a/qpid/cpp/src/qpid/cluster/ConnectionInterceptor.cpp b/qpid/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
deleted file mode 100644
index efcab1b731..0000000000
--- a/qpid/cpp/src/qpid/cluster/ConnectionInterceptor.cpp
+++ /dev/null
@@ -1,102 +0,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.
- *
- */
-#include "ConnectionInterceptor.h"
-#include "qpid/framing/ClusterConnectionCloseBody.h"
-#include "qpid/framing/ClusterConnectionDoOutputBody.h"
-#include "qpid/framing/AMQFrame.h"
-#include <boost/current_function.hpp>
-
-
-namespace qpid {
-namespace cluster {
-
-using namespace framing;
-
-template <class T, class U, class V> void shift(T& a, U& b, const V& c) { a = b; b = c; }
-
-ConnectionInterceptor::ConnectionInterceptor(
- broker::Connection& conn, Cluster& clust, Cluster::ShadowConnectionId shadowId_)
- : connection(&conn), cluster(clust), isClosed(false), shadowId(shadowId_), output(*this, *conn.getOutput().get())
-{
- connection->addFinalizer(boost::bind(operator delete, this));
- connection->setOutputHandler(&output),
- // Attach my functions to Connection extension points.
- shift(receivedNext, connection->receivedFn, boost::bind(&ConnectionInterceptor::received, this, _1));
- shift(closedNext, connection->closedFn, boost::bind(&ConnectionInterceptor::closed, this));
- shift(output.doOutputNext, connection->doOutputFn, boost::bind(&OutputInterceptor::doOutput, &output));
-}
-
-ConnectionInterceptor::~ConnectionInterceptor() {
- assert(connection == 0);
-}
-
-// Forward all received frames to the cluster, continue handling on delivery.
-void ConnectionInterceptor::received(framing::AMQFrame& f) {
- if (isClosed) return;
- cluster.send(f, this);
-}
-
-// Continue normal handling of delivered frames.
-void ConnectionInterceptor::deliver(framing::AMQFrame& f) {
- receivedNext(f);
-}
-
-void ConnectionInterceptor::closed() {
- if (isClosed) return;
- try {
- // Called when the local network connection is closed. We still
- // need to process any outstanding cluster frames for this
- // connection to ensure our sessions are up-to-date. We defer
- // closing the Connection object till deliverClosed(), but replace
- // its output handler with a null handler since the network output
- // handler will be deleted.
- //
- connection->setOutputHandler(&discardHandler);
- cluster.send(AMQFrame(in_place<ClusterConnectionCloseBody>()), this);
- isClosed = true;
- }
- catch (const std::exception& e) {
- QPID_LOG(error, QPID_MSG("While closing connection: " << e.what()));
- }
-}
-
-void ConnectionInterceptor::deliverClosed() {
- closedNext();
- // Drop reference so connection will be deleted, which in turn
- // will delete this via finalizer added in ctor.
- connection = 0;
-}
-
-void ConnectionInterceptor::dirtyClose() {
- // Not closed via cluster self-delivery but closed locally. Used
- // when local broker is shut down without a clean cluster shutdown.
- // Release the connection, it will delete this.
- connection = 0;
-}
-
-// Delivery of doOutput allows us to run the real connection doOutput()
-// which stocks up the write buffers with data.
-//
-void ConnectionInterceptor::deliverDoOutput(size_t requested) {
- output.deliverDoOutput(requested);
-}
-
-}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/cluster/Cpg.cpp b/qpid/cpp/src/qpid/cluster/Cpg.cpp
index 2ffd3509bf..ce678015a2 100644
--- a/qpid/cpp/src/qpid/cluster/Cpg.cpp
+++ b/qpid/cpp/src/qpid/cluster/Cpg.cpp
@@ -18,7 +18,6 @@
#include "Cpg.h"
#include "qpid/sys/Mutex.h"
-// Note cpg is currently unix-specific. Refactor if availble on other platforms.
#include "qpid/sys/posix/PrivatePosix.h"
#include "qpid/log/Statement.h"
@@ -170,27 +169,50 @@ std::string Cpg::cantMcastMsg(const Name& group) {
return "Cannot mcast to CPG group "+group.str();
}
-Cpg::Id Cpg::self() const {
+MemberId Cpg::self() const {
unsigned int nodeid;
check(cpg_local_get(handle, &nodeid), "Cannot get local CPG identity");
- return Id(nodeid, getpid());
+ return MemberId(nodeid, getpid());
}
-ostream& operator<<(ostream& o, std::pair<cpg_address*,int> a) {
- ostream_iterator<Cpg::Id> i(o, " ");
- std::copy(a.first, a.first+a.second, i);
- return o;
+ostream& operator <<(ostream& out, const MemberId& id) {
+ return out << std::hex << id.first << ":" << std::dec << id.second;
}
-ostream& operator <<(ostream& out, const Cpg::Id& id) {
- return out << id.getNodeId() << "-" << id.getPid();
+ostream& operator<<(ostream& o, const ConnectionId& c) {
+ return o << c.first << "-" << c.second;
}
-ostream& operator <<(ostream& out, const cpg_name& name) {
- return out << string(name.value, name.length);
+ostream& operator<<(ostream& o, const cpg_name& name) {
+ return o << string(name.value, name.length);
}
}} // namespace qpid::cluster
+// In proper namespace for ADL.
+
+std::ostream& operator<<(std::ostream& o, const ::cpg_address& a) {
+ const char* reasonString;
+ switch (a.reason) {
+ case CPG_REASON_JOIN: reasonString = "joined"; break;
+ case CPG_REASON_LEAVE: reasonString = "left";break;
+ case CPG_REASON_NODEDOWN: reasonString = "node-down";break;
+ case CPG_REASON_NODEUP: reasonString = "node-up";break;
+ case CPG_REASON_PROCDOWN: reasonString = "process-down";break;
+ default:
+ assert(0);
+ reasonString = "";
+ }
+ return o << qpid::cluster::MemberId(a.nodeid, a.pid) << " " << reasonString;
+}
+
+namespace std {
+ostream& operator<<(ostream& o, std::pair<cpg_address*,int> a) {
+ for (cpg_address* p = a.first; p < a.first+a.second; ++p)
+ o << *p << " ";
+ return o;
+}
+}
+
diff --git a/qpid/cpp/src/qpid/cluster/Cpg.h b/qpid/cpp/src/qpid/cluster/Cpg.h
index 96fd692a77..fdc451fbbc 100644
--- a/qpid/cpp/src/qpid/cluster/Cpg.h
+++ b/qpid/cpp/src/qpid/cluster/Cpg.h
@@ -19,12 +19,12 @@
*
*/
+#include "qpid/cluster/types.h"
+#include "qpid/cluster/Dispatchable.h"
+
#include "qpid/Exception.h"
#include "qpid/sys/IOHandle.h"
-#include "qpid/cluster/Dispatchable.h"
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
#include <boost/scoped_ptr.hpp>
#include <cassert>
@@ -65,14 +65,6 @@ class Cpg : public sys::IOHandle {
std::string str() const { return std::string(value, length); }
};
- // boost::tuple gives us == and < for free.
- struct Id : public boost::tuple<uint32_t, uint32_t> {
- Id(uint32_t n=0, uint32_t p=0) : boost::tuple<uint32_t, uint32_t>(n, p) {}
- Id(const cpg_address& addr) : boost::tuple<uint32_t, uint32_t>(addr.nodeid, addr.pid) {}
- uint32_t getNodeId() const { return boost::get<0>(*this); }
- uint32_t getPid() const { return boost::get<1>(*this); }
- };
-
static std::string str(const cpg_name& n) {
return std::string(n.value, n.length);
}
@@ -127,7 +119,7 @@ class Cpg : public sys::IOHandle {
cpg_handle_t getHandle() const { return handle; }
- Id self() const;
+ MemberId self() const;
int getFd();
@@ -166,9 +158,7 @@ class Cpg : public sys::IOHandle {
bool isShutdown;
};
-std::ostream& operator <<(std::ostream& out, const cpg_name& name);
-std::ostream& operator <<(std::ostream& out, const Cpg::Id& id);
-std::ostream& operator <<(std::ostream& out, const std::pair<cpg_address*,int> addresses);
+std::ostream& operator <<(std::ostream& out, const MemberId& id);
inline bool operator==(const cpg_name& a, const cpg_name& b) {
return a.length==b.length && strncmp(a.value, b.value, a.length) == 0;
@@ -177,5 +167,12 @@ inline bool operator!=(const cpg_name& a, const cpg_name& b) { return !(a == b);
}} // namespace qpid::cluster
+// In proper namespaces for ADL
+std::ostream& operator <<(std::ostream& out, const cpg_name& name);
+std::ostream& operator<<(std::ostream& o, const cpg_address& a);
+namespace std {
+std::ostream& operator <<(std::ostream& out, std::pair<cpg_address*,int> addresses);
+}
+
#endif /*!CPG_H*/
diff --git a/qpid/cpp/src/qpid/cluster/ShadowConnectionOutputHandler.h b/qpid/cpp/src/qpid/cluster/NoOpConnectionOutputHandler.h
index 6d429535e6..3c24dd71f2 100644
--- a/qpid/cpp/src/qpid/cluster/ShadowConnectionOutputHandler.h
+++ b/qpid/cpp/src/qpid/cluster/NoOpConnectionOutputHandler.h
@@ -1,5 +1,5 @@
-#ifndef QPID_CLUSTER_SHADOWCONNECTIONOUTPUTHANDLER_H
-#define QPID_CLUSTER_SHADOWCONNECTIONOUTPUTHANDLER_H
+#ifndef QPID_CLUSTER_NOOPCONNECTIONOUTPUTHANDLER_H
+#define QPID_CLUSTER_NOOPCONNECTIONOUTPUTHANDLER_H
/*
*
@@ -30,10 +30,10 @@ namespace framing { class AMQFrame; }
namespace cluster {
/**
- * Output handler for frames sent to shadow connections.
+ * Output handler for frames sent to noop connections.
* Simply discards frames.
*/
-class ShadowConnectionOutputHandler : public sys::ConnectionOutputHandler
+class NoOpConnectionOutputHandler : public sys::ConnectionOutputHandler
{
public:
virtual void send(framing::AMQFrame&) {}
@@ -43,4 +43,4 @@ class ShadowConnectionOutputHandler : public sys::ConnectionOutputHandler
}} // namespace qpid::cluster
-#endif /*!QPID_CLUSTER_SHADOWCONNECTIONOUTPUTHANDLER_H*/
+#endif /*!QPID_CLUSTER_NOOPCONNECTIONOUTPUTHANDLER_H*/
diff --git a/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp b/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
index 84d3a6ad69..6c77d2747a 100644
--- a/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
+++ b/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
@@ -19,9 +19,10 @@
*
*/
#include "OutputInterceptor.h"
-#include "ConnectionInterceptor.h"
-#include "qpid/framing/ClusterConnectionDoOutputBody.h"
+#include "Connection.h"
+#include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h"
#include "qpid/framing/AMQFrame.h"
+#include "qpid/log/Statement.h"
#include <boost/current_function.hpp>
@@ -30,7 +31,7 @@ namespace cluster {
using namespace framing;
-OutputInterceptor::OutputInterceptor(ConnectionInterceptor& p, sys::ConnectionOutputHandler& h)
+OutputInterceptor::OutputInterceptor(cluster::Connection& p, sys::ConnectionOutputHandler& h)
: parent(p), next(h), sent(), moreOutput(), doingOutput()
{}
@@ -57,8 +58,6 @@ bool OutputInterceptor::doOutput() {
// which stocks up the write buffers with data.
//
void OutputInterceptor::deliverDoOutput(size_t requested) {
- if (parent.getClosed()) return;
-
Locker l(lock);
size_t buf = next.getBuffered();
if (parent.isLocal())
@@ -68,7 +67,7 @@ void OutputInterceptor::deliverDoOutput(size_t requested) {
sent = 0;
do {
sys::Mutex::ScopedUnlock u(lock);
- moreOutput = doOutputNext(); // Calls send()
+ moreOutput = parent.getBrokerConnection().doOutput();
} while (sent < requested && moreOutput);
sent += buf; // Include buffered data in the sent total.
@@ -88,8 +87,8 @@ void OutputInterceptor::startDoOutput() {
// Send a doOutput request if one is not already in flight.
void OutputInterceptor::sendDoOutput() {
// Call with lock held.
- if (parent.isShadow() || parent.getClosed())
- return;
+ // FIXME aconway 2008-08-28: used to have || parent.getClosed())
+ if (!parent.isLocal()) return;
doingOutput = true;
size_t request = writeEstimate.sending(getBuffered());
@@ -98,8 +97,8 @@ void OutputInterceptor::sendDoOutput() {
// Send it anyway to keep the doOutput chain going until we are sure there's no more output
// (in deliverDoOutput)
//
- parent.getCluster().send(AMQFrame(in_place<ClusterConnectionDoOutputBody>(
- framing::ProtocolVersion(), request)), &parent);
+ parent.getCluster().send(AMQFrame(in_place<ClusterConnectionDeliverDoOutputBody>(
+ framing::ProtocolVersion(), request)), parent.getId());
QPID_LOG(trace, &parent << "Send doOutput request for " << request);
}
diff --git a/qpid/cpp/src/qpid/cluster/OutputInterceptor.h b/qpid/cpp/src/qpid/cluster/OutputInterceptor.h
index b39f2a2be9..548ec32b5b 100644
--- a/qpid/cpp/src/qpid/cluster/OutputInterceptor.h
+++ b/qpid/cpp/src/qpid/cluster/OutputInterceptor.h
@@ -31,14 +31,14 @@ namespace qpid {
namespace framing { class AMQFrame; }
namespace cluster {
-class ConnectionInterceptor;
+class Connection;
/**
* Interceptor for connection OutputHandler, manages outgoing message replication.
*/
class OutputInterceptor : public sys::ConnectionOutputHandler {
public:
- OutputInterceptor(ConnectionInterceptor& p, sys::ConnectionOutputHandler& h);
+ OutputInterceptor(cluster::Connection& p, sys::ConnectionOutputHandler& h);
// sys::ConnectionOutputHandler functions
void send(framing::AMQFrame& f);
@@ -51,9 +51,7 @@ class OutputInterceptor : public sys::ConnectionOutputHandler {
// Intercept doOutput requests on Connection.
bool doOutput();
- boost::function<bool ()> doOutputNext;
-
- ConnectionInterceptor& parent;
+ cluster::Connection& parent;
private:
typedef sys::Mutex::ScopedLock Locker;
diff --git a/qpid/cpp/src/qpid/cluster/PollableQueue.h b/qpid/cpp/src/qpid/cluster/PollableQueue.h
index 0bba2ba790..29891da344 100644
--- a/qpid/cpp/src/qpid/cluster/PollableQueue.h
+++ b/qpid/cpp/src/qpid/cluster/PollableQueue.h
@@ -90,7 +90,7 @@ template <class T> void PollableQueue<T>::dispatch(sys::DispatchHandle& h) {
batch.swap(queue);
condition.clear();
ScopedUnlock u(lock);
- callback(batch.begin(), batch.end()); // Process the batch outside the lock.
+ callback(batch.begin(), batch.end()); // Process outside the lock to allow concurrent push.
h.rewatch();
}
diff --git a/qpid/cpp/src/qpid/cluster/ProxyInputHandler.h b/qpid/cpp/src/qpid/cluster/ProxyInputHandler.h
new file mode 100644
index 0000000000..228f8d092d
--- /dev/null
+++ b/qpid/cpp/src/qpid/cluster/ProxyInputHandler.h
@@ -0,0 +1,57 @@
+#ifndef QPID_CLUSTER_PROXYINPUTHANDLER_H
+#define QPID_CLUSTER_PROXYINPUTHANDLER_H
+
+/*
+ *
+ * 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.
+ *
+ */
+
+#include "qpid/sys/ConnectionInputHandler.h"
+#include <boost/intrusive_ptr.hpp>
+
+namespace qpid {
+
+namespace framing { class AMQFrame; }
+
+namespace cluster {
+
+/**
+ * Proxies ConnectionInputHandler functions and ensures target.closed()
+ * is called, on deletion if not before.
+ */
+class ProxyInputHandler : public sys::ConnectionInputHandler
+{
+ public:
+ ProxyInputHandler(boost::intrusive_ptr<cluster::Connection> t) : target(t) {}
+ ~ProxyInputHandler() { closed(); }
+
+ void received(framing::AMQFrame& f) { target->received(f); }
+ void closed() { if (target) target->closed(); target = 0; }
+ void idleOut() { target->idleOut(); }
+ void idleIn() { target->idleIn(); }
+ bool doOutput() { return target->doOutput(); }
+ bool hasOutput() { return target->hasOutput(); }
+
+ private:
+ boost::intrusive_ptr<cluster::Connection> target;
+};
+
+}} // namespace qpid::cluster
+
+#endif /*!QPID_CLUSTER_PROXYINPUTHANDLER_H*/
diff --git a/qpid/cpp/src/qpid/cluster/types.h b/qpid/cpp/src/qpid/cluster/types.h
new file mode 100644
index 0000000000..4646cd9174
--- /dev/null
+++ b/qpid/cpp/src/qpid/cluster/types.h
@@ -0,0 +1,58 @@
+#ifndef QPID_CLUSTER_TYPES_H
+#define QPID_CLUSTER_TYPES_H
+
+/*
+ *
+ * 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.
+ *
+ */
+#include <utility>
+#include <iosfwd>
+#include <stdint.h>
+
+extern "C" {
+#include <openais/cpg.h>
+}
+
+namespace qpid {
+namespace cluster {
+
+class Connection;
+
+/** first=node-id, second=pid */
+struct MemberId : std::pair<uint32_t, uint32_t> {
+ MemberId(uint32_t node=0, uint32_t pid=0) : std::pair<uint32_t,uint32_t>(node, pid) {}
+ MemberId(const cpg_address& caddr) : std::pair<uint32_t,uint32_t>(caddr.nodeid, caddr.pid) {}
+ uint32_t getNode() const { return first; }
+ uint32_t getPid() const { return second; }
+};
+
+inline bool operator==(const cpg_address& caddr, const MemberId& id) { return id == MemberId(caddr); }
+
+std::ostream& operator<<(std::ostream&, const MemberId&);
+
+struct ConnectionId : public std::pair<MemberId, Connection*> {
+ ConnectionId(const MemberId& m=MemberId(), Connection* c=0) : std::pair<MemberId, Connection*> (m,c) {}
+ MemberId getMember() const { return first; }
+ Connection* getConnectionPtr() const { return second; }
+};
+std::ostream& operator<<(std::ostream&, const ConnectionId&);
+
+}} // namespace qpid::cluster
+
+#endif /*!QPID_CLUSTER_TYPES_H*/
diff --git a/qpid/cpp/src/qpid/sys/ConnectionCodec.h b/qpid/cpp/src/qpid/sys/ConnectionCodec.h
index efc6839b60..b1b047d2cc 100644
--- a/qpid/cpp/src/qpid/sys/ConnectionCodec.h
+++ b/qpid/cpp/src/qpid/sys/ConnectionCodec.h
@@ -22,14 +22,14 @@
*
*/
#include "qpid/framing/ProtocolVersion.h"
-#include "OutputControl.h"
-#include <memory>
-#include <map>
namespace qpid {
namespace sys {
+class InputHandlerFactory;
+class OutputControl;
+
/**
* Interface of coder/decoder for a connection of a specific protocol
* version.
diff --git a/qpid/cpp/src/qpid/sys/ConnectionInputHandler.h b/qpid/cpp/src/qpid/sys/ConnectionInputHandler.h
index a2c18d6d9a..9a5b9f75a5 100644
--- a/qpid/cpp/src/qpid/sys/ConnectionInputHandler.h
+++ b/qpid/cpp/src/qpid/sys/ConnectionInputHandler.h
@@ -33,6 +33,7 @@ namespace sys {
public TimeoutHandler, public OutputTask
{
public:
+
virtual void closed() = 0;
};
diff --git a/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h b/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h
index 2b309b5758..9bb7e13686 100644
--- a/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h
+++ b/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h
@@ -42,7 +42,8 @@ class ConnectionInputHandlerFactory : private boost::noncopyable
*@param id identify the connection for management purposes.
*/
virtual ConnectionInputHandler* create(ConnectionOutputHandler* out,
- const std::string& id) = 0;
+ const std::string& id,
+ bool isClient) = 0;
virtual ~ConnectionInputHandlerFactory(){}
};
diff --git a/qpid/cpp/src/tests/ForkedBroker.h b/qpid/cpp/src/tests/ForkedBroker.h
index a7869ff602..07e69a0735 100644
--- a/qpid/cpp/src/tests/ForkedBroker.h
+++ b/qpid/cpp/src/tests/ForkedBroker.h
@@ -53,12 +53,12 @@ class ForkedBroker {
}
~ForkedBroker() {
- try { stop(); } catch(const std::exception& e) {
- QPID_LOG(error, QPID_MSG("Stopping forked broker: " << e.what()));
+ try { kill(); } catch(const std::exception& e) {
+ QPID_LOG(error, QPID_MSG("Killing forked broker: " << e.what()));
}
}
- void stop() {
+ void kill() {
using qpid::ErrnoException;
if (pid == 0) return;
if (::kill(pid, SIGINT) < 0) throw ErrnoException("kill failed");
diff --git a/qpid/cpp/src/tests/cluster_test.cpp b/qpid/cpp/src/tests/cluster_test.cpp
index 7140cc73bd..3f09143fff 100644
--- a/qpid/cpp/src/tests/cluster_test.cpp
+++ b/qpid/cpp/src/tests/cluster_test.cpp
@@ -69,8 +69,8 @@ struct ClusterFixture : public vector<uint16_t> {
void add();
void setup();
void kill(size_t n) {
- if (n) forkedBrokers[n-1]->stop();
- else broker0.shutdown();
+ if (n) forkedBrokers[n-1].kill();
+ else broker0->broker->shutdown();
}
};
@@ -139,6 +139,14 @@ QPID_AUTO_TEST_CASE(testForkedBroker) {
BOOST_CHECK_EQUAL("direct", c.session.exchangeQuery("amq.direct").getType());
}
+QPID_AUTO_TEST_CASE(testSingletonCluster) {
+ // Test against a singleton cluster, verify basic operation.
+ ClusterFixture cluster(1);
+ Client c(cluster[0]);
+ BOOST_CHECK(c.session.queueQuery("q").getQueue().empty());
+ BOOST_CHECK(c.session.exchangeQuery("ex").getType().empty());
+}
+
QPID_AUTO_TEST_CASE(testWiringReplication) {
ClusterFixture cluster(3);
Client c0(cluster[0]);
diff --git a/qpid/cpp/xml/cluster.xml b/qpid/cpp/xml/cluster.xml
index 8d6b5a241e..f5afe34e4a 100644
--- a/qpid/cpp/xml/cluster.xml
+++ b/qpid/cpp/xml/cluster.xml
@@ -25,19 +25,17 @@
<class name = "cluster" code = "0x80" label="Qpid clustering extensions.">
<doc>Qpid extension class to allow clustered brokers to communicate.</doc>
- <control name = "notify" code="0x1">
- <role name="server" implement="MUST" />
+ <control name = "joined" code="0x1">
<field name="url" type="str16" />
</control>
+ </class>
- <control name="connection-close" code="0x2">
- <role name="server" implement="MUST" />
+ <class name="cluster-connection" code="0x81" label="Qpid clustering extensions.">
+ <control name="deliver-close" code="0x2">
</control>
- <control name="connection-do-output" code="0x3">
- <role name="server" implement="MUST" />
+ <control name="deliver-do-output" code="0x3">
<field name="bytes" type="uint32"/>
</control>
-
</class>
</amqp>
diff --git a/qpid/etc/LICENSE b/qpid/etc/LICENSE
new file mode 100644
index 0000000000..bc46b77047
--- /dev/null
+++ b/qpid/etc/LICENSE
@@ -0,0 +1,206 @@
+=========================================================================
+== Apache License ==
+=========================================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/qpid/etc/NOTICE b/qpid/etc/NOTICE
new file mode 100644
index 0000000000..05f39ba176
--- /dev/null
+++ b/qpid/etc/NOTICE
@@ -0,0 +1,8 @@
+// ------------------------------------------------------------------
+// NOTICE file corresponding to the section 4d of The Apache License,
+// Version 2.0, in this case for Qpid bin scripts
+// ------------------------------------------------------------------
+
+Apache Qpid
+Copyright 2006-2008 Apache Software Foundation
+
diff --git a/qpid/gentools/LICENSE b/qpid/gentools/LICENSE
new file mode 100644
index 0000000000..43fa6abd19
--- /dev/null
+++ b/qpid/gentools/LICENSE
@@ -0,0 +1,202 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/qpid/gentools/NOTICE b/qpid/gentools/NOTICE
new file mode 100644
index 0000000000..09e9ae4902
--- /dev/null
+++ b/qpid/gentools/NOTICE
@@ -0,0 +1,2 @@
+This product includes software developed by The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/qpid/gentools/README.txt b/qpid/gentools/README.txt
new file mode 100644
index 0000000000..eb364ece53
--- /dev/null
+++ b/qpid/gentools/README.txt
@@ -0,0 +1,102 @@
+--------
+Velocity
+--------
+
+Welcome to Velocity. Velocity is a general purpose template engine
+written in Java. For more information about Velocity, please look at the
+HTML documentation in the docs/ directory, as well as the Velocity
+web site
+
+ http://jakarta.apache.org/velocity/index.html
+
+Here is a description of what each of the top level directories
+contains. Please consult the documentation in each of the lower level
+directories for information that is specific to their contents.
+
+bin/ This is a temporary build directory.
+build/ This is where the build scripts live.
+docs/ This is where the documentation lives.
+examples/ This is where the examples live.
+src/ This is where all of the source code to Velocity lives.
+test/ This is where all of the tests live.
+xdocs/ This is the .xml files for building the .html files
+ related to the website and documentation.
+
+REQUIREMENTS
+------------
+
+The Java 2 SDK is required to build Velocity.
+
+For users that wish to use Log4J as the logging
+system, version 1.1 or newer of Log4J is required.
+
+
+INCLUDED PRE-BUILT JARS
+-----------------------
+If you are using an offical Velocity release distribution,
+you will find two pre-built Velocity jars in the top level
+directory.
+
+PLEASE NOTE : Starting with the 1.2 release, we include two jars
+ with the distribution.
+
+1) velocity-<version>.jar : The Velocity jar that does not include
+any external dependencies needed by Velocity, such as the
+jakarta-commons-collection classes, Jakarta Avalon Logkit, or
+Jakarta ORO. We do this to allow you to use whatever version of
+collections, logkit, etc that you wish w/o fear of collision.
+These jars are included in the distribution, in
+the build/lib directory, or at the respective project sites.
+
+2) velocity-dep-<version>.jar : This is a Velocity jar that includes
+all dependencies that were included with previous distribution
+jars. It is intended as a convenience to allow you to drop
+this 1.3 (or later) distribution in place of existing 1.1 or 1.2-dep
+ distributions.
+
+Please see the developers guide for more information.
+
+BUILDING VELOCITY
+-----------------
+
+In order to get started with Velocity, you may want to build it.
+
+Building Velocity is easy. All components necessary to build Velocity are
+included, except for the Java 2 SDK and the fabulous Ant build tool
+from the Jakarta project.
+
+http://jakarta.apache.org/ant/
+
+Note that you must use Ant version 1.4 or later.
+
+To build Velocity's jar, change directory into the build/ directory and
+simply type :
+
+ant jar
+
+This will create a bin/ directory containing the Velocity .jar file. Be
+sure to update your classpath to include Velocity's .jar file, or when using a
+modern servlet container, put it in the WEB-INF/lib directory.
+
+If you wish to build a Velocity jar that contains all dependencies, we have
+provided an optional build target for our convenience :
+
+ant jar-dep
+
+This will build a complete Velocity jar with dependencies included, and it can
+be found in the /bin directory as
+
+velocity-dep-<version>.jar
+
+TRYING THE EXAMPLES
+-------------------
+
+After building Velocity, you can also buld the examples that are included
+with the Velocity distribution. These examples show how to use Velocity
+in your Java applications and Servlets. There also are examples of
+how to use Anakia, a XML transformation engine and an example of a servlet-
+based forum application.
+
+For more information, please see the README.txt in the examples/ directory.
+
+-The Velocity Team
diff --git a/qpid/gentools/lib/LICENSE b/qpid/gentools/lib/LICENSE
index 43fa6abd19..e69de29bb2 100644
--- a/qpid/gentools/lib/LICENSE
+++ b/qpid/gentools/lib/LICENSE
@@ -1,202 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
diff --git a/qpid/gentools/lib/NOTICE b/qpid/gentools/lib/NOTICE
index 09e9ae4902..e69de29bb2 100644
--- a/qpid/gentools/lib/NOTICE
+++ b/qpid/gentools/lib/NOTICE
@@ -1,2 +0,0 @@
-This product includes software developed by The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/qpid/gentools/lib/README.txt b/qpid/gentools/lib/README.txt
index eb364ece53..e69de29bb2 100644
--- a/qpid/gentools/lib/README.txt
+++ b/qpid/gentools/lib/README.txt
@@ -1,102 +0,0 @@
---------
-Velocity
---------
-
-Welcome to Velocity. Velocity is a general purpose template engine
-written in Java. For more information about Velocity, please look at the
-HTML documentation in the docs/ directory, as well as the Velocity
-web site
-
- http://jakarta.apache.org/velocity/index.html
-
-Here is a description of what each of the top level directories
-contains. Please consult the documentation in each of the lower level
-directories for information that is specific to their contents.
-
-bin/ This is a temporary build directory.
-build/ This is where the build scripts live.
-docs/ This is where the documentation lives.
-examples/ This is where the examples live.
-src/ This is where all of the source code to Velocity lives.
-test/ This is where all of the tests live.
-xdocs/ This is the .xml files for building the .html files
- related to the website and documentation.
-
-REQUIREMENTS
-------------
-
-The Java 2 SDK is required to build Velocity.
-
-For users that wish to use Log4J as the logging
-system, version 1.1 or newer of Log4J is required.
-
-
-INCLUDED PRE-BUILT JARS
------------------------
-If you are using an offical Velocity release distribution,
-you will find two pre-built Velocity jars in the top level
-directory.
-
-PLEASE NOTE : Starting with the 1.2 release, we include two jars
- with the distribution.
-
-1) velocity-<version>.jar : The Velocity jar that does not include
-any external dependencies needed by Velocity, such as the
-jakarta-commons-collection classes, Jakarta Avalon Logkit, or
-Jakarta ORO. We do this to allow you to use whatever version of
-collections, logkit, etc that you wish w/o fear of collision.
-These jars are included in the distribution, in
-the build/lib directory, or at the respective project sites.
-
-2) velocity-dep-<version>.jar : This is a Velocity jar that includes
-all dependencies that were included with previous distribution
-jars. It is intended as a convenience to allow you to drop
-this 1.3 (or later) distribution in place of existing 1.1 or 1.2-dep
- distributions.
-
-Please see the developers guide for more information.
-
-BUILDING VELOCITY
------------------
-
-In order to get started with Velocity, you may want to build it.
-
-Building Velocity is easy. All components necessary to build Velocity are
-included, except for the Java 2 SDK and the fabulous Ant build tool
-from the Jakarta project.
-
-http://jakarta.apache.org/ant/
-
-Note that you must use Ant version 1.4 or later.
-
-To build Velocity's jar, change directory into the build/ directory and
-simply type :
-
-ant jar
-
-This will create a bin/ directory containing the Velocity .jar file. Be
-sure to update your classpath to include Velocity's .jar file, or when using a
-modern servlet container, put it in the WEB-INF/lib directory.
-
-If you wish to build a Velocity jar that contains all dependencies, we have
-provided an optional build target for our convenience :
-
-ant jar-dep
-
-This will build a complete Velocity jar with dependencies included, and it can
-be found in the /bin directory as
-
-velocity-dep-<version>.jar
-
-TRYING THE EXAMPLES
--------------------
-
-After building Velocity, you can also buld the examples that are included
-with the Velocity distribution. These examples show how to use Velocity
-in your Java applications and Servlets. There also are examples of
-how to use Anakia, a XML transformation engine and an example of a servlet-
-based forum application.
-
-For more information, please see the README.txt in the examples/ directory.
-
--The Velocity Team
diff --git a/qpid/java/010ExcludeList b/qpid/java/010ExcludeList
index 8e7f8d253c..7810d42211 100644
--- a/qpid/java/010ExcludeList
+++ b/qpid/java/010ExcludeList
@@ -67,4 +67,5 @@ org.apache.qpid.test.unit.topic.TopicSessionTest#testNonMatchingMessagesDoNotFil
org.apache.qpid.server.security.acl.SimpleACLTest#testClientPublishInvalidQueueSuccess
// InVM Broker tests
org.apache.qpid.test.client.timeouts.SyncWaitDelayTest#*
-
+// QPID-1262, QPID-1119 : This test fails occasionally due to potential protocol issue.
+org.apache.qpid.test.client.timeouts.SyncWaitTimeoutDelayTest#*
diff --git a/qpid/java/010ExcludeList-noPrefetch b/qpid/java/010ExcludeList-noPrefetch
index 102b874da2..dca931b55b 100644
--- a/qpid/java/010ExcludeList-noPrefetch
+++ b/qpid/java/010ExcludeList-noPrefetch
@@ -57,3 +57,5 @@ org.apache.qpid.server.security.acl.SimpleACLTest#testClientPublishInvalidQueueS
// InVM Broker tests
org.apache.qpid.test.client.timeouts.SyncWaitDelayTest#*
+// QPID-1262, QPID-1119 : This test fails occasionally due to potential protocol issue.
+org.apache.qpid.test.client.timeouts.SyncWaitTimeoutDelayTest#*
diff --git a/qpid/java/010ExcludeList-store b/qpid/java/010ExcludeList-store
index d8bb289992..d4bc8b7b71 100644
--- a/qpid/java/010ExcludeList-store
+++ b/qpid/java/010ExcludeList-store
@@ -60,3 +60,5 @@ org.apache.qpid.server.security.acl.SimpleACLTest#testClientPublishInvalidQueueS
// InVM Broker tests
org.apache.qpid.test.client.timeouts.SyncWaitDelayTest#*
+// QPID-1262, QPID-1119 : This test fails occasionally due to potential protocol issue.
+org.apache.qpid.test.client.timeouts.SyncWaitTimeoutDelayTest#*
diff --git a/qpid/java/08ExcludeList b/qpid/java/08ExcludeList
index 8af1f14a03..3e8bdc8ed9 100644
--- a/qpid/java/08ExcludeList
+++ b/qpid/java/08ExcludeList
@@ -9,3 +9,5 @@ org.apache.qpid.test.testcases.FailoverTest#*
org.apache.qpid.test.client.failover.FailoverTest#test4MinuteFailover
// QPID-1225 : Temporary remove this test until the problem has been addressed
org.apache.qpid.server.security.acl.SimpleACLTest#testClientPublishInvalidQueueSuccess
+// QPID-1262, QPID-1119 : This test fails occasionally due to potential protocol issue.
+org.apache.qpid.test.client.timeouts.SyncWaitTimeoutDelayTest#*
diff --git a/qpid/java/08ExcludeList-nonvm b/qpid/java/08ExcludeList-nonvm
index 52250db44e..e80106f9f4 100644
--- a/qpid/java/08ExcludeList-nonvm
+++ b/qpid/java/08ExcludeList-nonvm
@@ -28,3 +28,5 @@ org.apache.qpid.server.security.acl.SimpleACLTest#testClientPublishInvalidQueueS
// InVM Broker tests
org.apache.qpid.test.client.timeouts.SyncWaitDelayTest#*
+// QPID-1262, QPID-1119 : This test fails occasionally due to potential protocol issue.
+org.apache.qpid.test.client.timeouts.SyncWaitTimeoutDelayTest#*
diff --git a/qpid/java/KEYS b/qpid/java/KEYS
index fabfa79997..e69de29bb2 100644
--- a/qpid/java/KEYS
+++ b/qpid/java/KEYS
@@ -1,32 +0,0 @@
-pub 2048R/18806464 2006-11-14
-uid Rajith Attapattu <rajith@apache.org>
-sig 3 18806464 2006-11-14 Rajith Attapattu <rajith@apache.org>
-uid Rajith Attapattu <rajith77@gmail.com>
-sig 3 18806464 2006-11-14 Rajith Attapattu <rajith@apache.org>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.2.1 (GNU/Linux)
-
-mQELBEVaPcABCAC+iLSVxk/TZ2i5Kq4KhdYdBdpXizwRsKdCq9m9DwD20yke0rZL
-067ka5z4gA2prOUUCJ51G/CFhDgngiK0awnhcMgdNZzMQoOIJC044qgRLeg12IvI
-bzdtzK+DknPW3MC5QbmuJiozBPokyhyHR/C+889f2lR8OTjSGagLwjtHf0oEuEn4
-RdTBWWzNZclKe4J6UIbi3VG5kgUmThCm12TmtABmJmXpeNl3wpyYNPxZkU1huKNl
-Pi0Buu1SroWoIlwR8n2DNvDIU8PvzmtrfZoDBMopC1a6lBiZX9tKwZLUDb28AgaB
-XelJ+L+nkaoLjbNgNxGRMT7N99hWXsOcWlUVAAYptCVSYWppdGggQXR0YXBhdHR1
-IDxyYWppdGg3N0BnbWFpbC5jb20+iQE2BBMBAgAgBQJFWj3AAhsDBgsJCAcDAgQV
-AggDBBYCAwECHgECF4AACgkQdt2xaBiAZGS/AQf/fCrR7bLqAhiI9ojuOgTfwzRv
-9Hf3FcNdRCnVzmRFzE4WGHSG7R92xLL8avtiPEdC7p80d3+bf+QKGSJ/Ym4a0JqE
-KeX08brWOtIfQQK7wd7UgCJ3ufWcbQgnHzhgc7oY00FZAmQfv8TF8Uxqpe6dKXep
-4S3RN1c9ygg643ey7u85knAk+rs1OevZ+xl/IsLN6rSnQ1B8uIJUCct8+5YuGxd7
-VHCAgDEri0zf7+CMWxVpOJgcegn9Iy8rfmif8BUs0620xvNRha03of2UQZau0WzB
-MIMkSgOUhSBdsYNYe8TU9SfJGXabB4R6xDimMDbOXs75ypQMoPiEsf9urx7T6rQk
-UmFqaXRoIEF0dGFwYXR0dSA8cmFqaXRoQGFwYWNoZS5vcmc+iQE2BBMBAgAgBQJF
-Wj7qAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQdt2xaBiAZGQEYQf/SocY
-SONVEePlZtFlLmsebZLZ8sn+HZBPepcJf81eK7YdXcca7QSeY3Q6vwshbfZsUOJZ
-fu+6gaD1MnPtBLF4RWjLBW1OOmxLJPtv5bNifjciuhuvRgBA7y3xWenfNgV4FeKk
-qX8ArRYJQVgy7X5Lv3ccbXcaNq6ajT2xDi0krMkn0TtU1vdkDSK56PRzAwWxA/X+
-4MKQZF/6964or2rz91iX2OnylEj38q+F7/dOaasD/EZpjAh8nipqVBVL3Rcy2gFy
-7EkTao4tOSo1JVrHW7lgfEBxKVSrgHyhnSxx3Z773edp2qnjZPAcv0qiEawszhkI
-vIuNSo3oTbrOW9w2tA==
-=FCqB
------END PGP PUBLIC KEY BLOCK-----
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java
index 8ad2ace1b2..f3b54034e7 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java
@@ -198,23 +198,31 @@ public class Main
{
System.out.println(e.getMessage());
_brokerLogger.error("Initialisation Error : " + e.getMessage());
-
+ shutdown(1);
}
catch (ConfigurationException e)
{
System.out.println("Error configuring message broker: " + e);
_brokerLogger.error("Error configuring message broker: " + e);
e.printStackTrace();
+ shutdown(1);
}
- catch (Exception e)
+ catch (Throwable e)
{
- System.out.println("Error intialising message broker: " + e);
- _brokerLogger.error("Error intialising message broker: " + e);
+ System.out.println("Error initialising message broker: " + e);
+ _brokerLogger.error("Error initialising message broker: " + e);
e.printStackTrace();
+ shutdown(1);
}
}
}
+ protected void shutdown(int status)
+ {
+ ApplicationRegistry.removeAll();
+ System.exit(status);
+ }
+
protected void startup() throws InitException, ConfigurationException, Exception
{
final String QpidHome = System.getProperty(QPID_HOME);
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
index 90d7109df8..03ccbe7ce4 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
@@ -161,6 +161,8 @@ public interface AMQQueue extends Managable, Comparable<AMQQueue>
void deliverAsync();
+ void stop();
+
/**
* ExistingExclusiveSubscription signals a failure to create a subscription, because an exclusive subscription
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
index 29c3f68286..1184ba1d19 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
@@ -1102,12 +1102,17 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener
}
_deleteTaskList.clear();
- ReferenceCountingExecutorService.getInstance().releaseExecutorService();
+ stop();
}
return getMessageCount();
}
+ public void stop()
+ {
+ ReferenceCountingExecutorService.getInstance().releaseExecutorService();
+ }
+
public void deliverAsync()
{
_stateChangeCount.incrementAndGet();
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
index b25a56344e..71f6c8ed44 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
@@ -301,11 +301,20 @@ public class VirtualHost implements Accessable
public void close() throws Exception
{
+ //Stop the Queues processing
+ if (_queueRegistry != null)
+ {
+ for (AMQQueue queue : _queueRegistry.getQueues())
+ {
+ queue.stop();
+ }
+ }
+
//Stop Housekeeping
if (_houseKeepingTimer != null)
{
_houseKeepingTimer.cancel();
- }
+ }
//Stop Connections
_connectionRegistry.close();
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
index 6f4c26945c..d05e90823c 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
@@ -486,7 +486,8 @@ public class ConnectionURLTest extends TestCase
assertNotNull(curl.getBrokerDetails(0));
assertEquals(BrokerDetails.SOCKET, curl.getBrokerDetails(0).getTransport());
assertEquals("VM-Unique-socketID", curl.getBrokerDetails(0).getHost());
- assertEquals("URL does not toString as expected", url, curl.toString());
+ assertEquals("URL does not toString as expected",
+ url.replace(":guest", ":********"), curl.toString());
}
catch (URLSyntaxException e)
{
diff --git a/qpid/java/common/Composite.tpl b/qpid/java/common/Composite.tpl
index 283fa24641..84b66a7d31 100644
--- a/qpid/java/common/Composite.tpl
+++ b/qpid/java/common/Composite.tpl
@@ -170,7 +170,13 @@ if not f.empty:
}
${
if pack > 0:
- out(" packing_flags |= $(f.flag_mask(pack));")
+ if f.empty:
+ out(" if (value)\\n")
+ out(" packing_flags |= $(f.flag_mask(pack));\\n")
+ out(" else\\n")
+ out(" packing_flags &= ~$(f.flag_mask(pack));")
+ else:
+ out(" packing_flags |= $(f.flag_mask(pack));")
}
this.dirty = true;
return this;
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java b/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
index 7494745457..814d6e73c9 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
@@ -192,4 +192,35 @@ public class FileUtils
throw new RuntimeException(e);
}
}
+
+ /*
+ * Deletes a given file
+ */
+ public static void deleteFile(String filePath) throws IOException
+ {
+ delete(new File(filePath), false);
+ }
+
+ /**
+ * Delete a given file, if a directory is specified and recursive set then delete the whole tree
+ * @param filePath the File object to start at
+ * @param recursive boolean to recurse if a directory is specified.
+ * @throws IOException
+ */
+ public static void delete(File filePath, boolean recursive) throws IOException
+ {
+ if (filePath.isDirectory())
+ {
+ if (recursive)
+ {
+ for (File subFile : filePath.listFiles())
+ {
+ delete(subFile, true);
+ }
+ }
+ }
+
+ filePath.delete();
+ }
+
}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/GenTest.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/GenTest.java
new file mode 100644
index 0000000000..512a0a29a6
--- /dev/null
+++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/GenTest.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.transport;
+
+import junit.framework.TestCase;
+
+/**
+ * GenTest
+ *
+ */
+
+public class GenTest extends TestCase
+{
+
+ public void testBooleans()
+ {
+ QueueDeclare qd = new QueueDeclare().queue("test-queue").durable(false);
+ assertEquals(qd.getQueue(), "test-queue");
+ assertFalse("durable should be false", qd.getDurable());
+ qd.setDurable(true);
+ assertTrue("durable should be true", qd.getDurable());
+ qd.setDurable(false);
+ assertFalse("durable should be false again", qd.getDurable());
+ }
+
+}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java b/qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java
new file mode 100644
index 0000000000..6681c1a5b6
--- /dev/null
+++ b/qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java
@@ -0,0 +1,133 @@
+/*
+ *
+ * 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.util;
+
+import junit.framework.TestCase;
+
+import java.io.File;
+import java.io.IOException;
+
+public class FileUtilsTest extends TestCase
+{
+ public void testDelete()
+ {
+ File test = new File("FileUtilsTest-testDelete");
+ try
+ {
+ test.createNewFile();
+ }
+ catch (IOException e)
+ {
+ fail(e.getMessage());
+ }
+
+ assertTrue("File does not exists", test.exists());
+ assertTrue("File is not a file", test.isFile());
+
+ try
+ {
+ FileUtils.deleteFile("FileUtilsTest-testDelete");
+ }
+ catch (IOException e)
+ {
+ fail(e.getMessage());
+ }
+
+ assertTrue("File exists after delete", !test.exists());
+ }
+
+ public void testRecursiveDelete()
+ {
+ String directoryName = "FileUtilsTest-testRecursiveDelete";
+ File test = new File(directoryName);
+
+ assertTrue("Directory exists", !test.exists());
+
+ test.mkdir();
+
+ createSubDir(directoryName, 2, 4);
+
+ try
+ {
+ FileUtils.deleteFile("FileUtilsTest-testDelete");
+ }
+ catch (IOException e)
+ {
+ fail(e.getMessage());
+ }
+
+ assertTrue("File does not exist after file delete", test.exists());
+
+ try
+ {
+ FileUtils.delete(test, false);
+ }
+ catch (IOException e)
+ {
+ fail(e.getMessage());
+ }
+
+ assertTrue("File does not exist after non recursive delete", test.exists());
+
+ try
+ {
+ FileUtils.delete(test, true);
+ }
+ catch (IOException e)
+ {
+ fail(e.getMessage());
+ }
+ assertTrue("File exist after recursive delete", !test.exists());
+
+ }
+
+ private void createSubDir(String path, int directories, int files)
+ {
+ File directory = new File(path);
+
+ assertTrue("Directory" + path + " does not exists", directory.exists());
+
+ for (int dir = 0; dir < directories; dir++)
+ {
+ String subDirName = path + File.separatorChar + "sub" + dir;
+ File subDir = new File(subDirName);
+
+ subDir.mkdir();
+
+ createSubDir(subDirName, directories - 1, files);
+ }
+
+ for (int file = 0; file < files; file++)
+ {
+ String subDirName = path + File.separatorChar + "file" + file;
+ File subFile = new File(subDirName);
+ try
+ {
+ subFile.createNewFile();
+ }
+ catch (IOException e)
+ {
+ fail(e.getMessage());
+ }
+ }
+ }
+
+}
diff --git a/qpid/java/resources/LICENSE b/qpid/java/resources/LICENSE
index 6b0b1270ff..c5134ef3d2 100644
--- a/qpid/java/resources/LICENSE
+++ b/qpid/java/resources/LICENSE
@@ -1,3 +1,6 @@
+=========================================================================
+== Apache License ==
+=========================================================================
Apache License
Version 2.0, January 2004
@@ -201,3 +204,321 @@
See the License for the specific language governing permissions and
limitations under the License.
+
+=========================================================================
+== SL4Fj (MIT) License ==
+=========================================================================
+
+SLF4J source code and binaries are distributed under the following license.
+Copyright (c) 2004-2005 SLF4J.ORG
+Copyright (c) 2004-2005 QOS.ch
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
+SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
+=========================================================================
+== Public Domain License for Backport of JSR 166 ==
+=========================================================================
+
+Copyright-Only Dedication (based on United States law) or Public Domain Certification
+
+The person or persons who have associated work with this document (the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of his knowledge, the work of authorship identified is in the public domain of the country from which the work is published, or (b) hereby dedicates whatever copyright the dedicators holds in the work of authorship identified below (the "Work") to the public domain. A certifier, moreover, dedicates any copyright interest he may have in the associated work, and for these purposes, is described as a "dedicator" below.
+
+A certifier has taken reasonable steps to verify the copyright status of this work. Certifier recognizes that his good faith efforts may not shield him from liability if in fact the work certified is not in the public domain.
+
+Dedicator makes this dedication for the benefit of the public at large and to the detriment of the Dedicator's heirs and successors. Dedicator intends this dedication to be an overt act of relinquishment in perpetuity of all present and future rights under copyright law, whether vested or contingent, in the Work. Dedicator understands that such relinquishment of all rights includes the relinquishment of all rights to enforce (by lawsuit or otherwise) those copyrights in the Work.
+
+Dedicator recognizes that, once placed in the public domain, the Work may be freely reproduced, distributed, transmitted, used, modified, built upon, or otherwise exploited by anyone for any purpose, commercial or non-commercial, and in any way, including by methods that have not yet been invented or conceived.
+
+=========================================================================
+== Eclipse Public License ==
+=========================================================================
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+
+
+=========================================================================
+== ICU License ==
+=========================================================================
+ICU License - ICU 1.8.1 and later
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2006 International Business Machines Corporation and others
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
+
+All trademarks and registered trademarks mentioned herein are the property of their respective owners.
+
+
+=========================================================================
+== AMQP License ==
+=========================================================================
+Copyright Notice
+ ================
+ (c) Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc.,
+ iMatix Corporation, IONA\ufffd Technologies, Red Hat, Inc.,
+ TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
+
+ License
+ =======
+ JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix
+ Corporation, IONA Technologies, Red Hat, Inc., TWIST Process Innovations, and
+ 29West Inc. (collectively, the "Authors") each hereby grants to you a worldwide,
+ perpetual, royalty-free, nontransferable, nonexclusive license to
+ (i) copy, display, distribute and implement the Advanced Messaging Queue Protocol
+ ("AMQP") Specification and (ii) the Licensed Claims that are held by
+ the Authors, all for the purpose of implementing the Advanced Messaging
+ Queue Protocol Specification. Your license and any rights under this
+ Agreement will terminate immediately without notice from
+ any Author if you bring any claim, suit, demand, or action related to
+ the Advanced Messaging Queue Protocol Specification against any Author.
+ Upon termination, you shall destroy all copies of the Advanced Messaging
+ Queue Protocol Specification in your possession or control.
+
+ As used hereunder, "Licensed Claims" means those claims of a patent or
+ patent application, throughout the world, excluding design patents and
+ design registrations, owned or controlled, or that can be sublicensed
+ without fee and in compliance with the requirements of this
+ Agreement, by an Author or its affiliates now or at any
+ future time and which would necessarily be infringed by implementation
+ of the Advanced Messaging Queue Protocol Specification. A claim is
+ necessarily infringed hereunder only when it is not possible to avoid
+ infringing it because there is no plausible non-infringing alternative
+ for implementing the required portions of the Advanced Messaging Queue
+ Protocol Specification. Notwithstanding the foregoing, Licensed Claims
+ shall not include any claims other than as set forth above even if
+ contained in the same patent as Licensed Claims; or that read solely
+ on any implementations of any portion of the Advanced Messaging Queue
+ Protocol Specification that are not required by the Advanced Messaging
+ Queue Protocol Specification, or that, if licensed, would require a
+ payment of royalties by the licensor to unaffiliated third parties.
+ Moreover, Licensed Claims shall not include (i) any enabling technologies
+ that may be necessary to make or use any Licensed Product but are not
+ themselves expressly set forth in the Advanced Messaging Queue Protocol
+ Specification (e.g., semiconductor manufacturing technology, compiler
+ technology, object oriented technology, networking technology, operating
+ system technology, and the like); or (ii) the implementation of other
+ published standards developed elsewhere and merely referred to in the
+ body of the Advanced Messaging Queue Protocol Specification, or
+ (iii) any Licensed Product and any combinations thereof the purpose or
+ function of which is not required for compliance with the Advanced
+ Messaging Queue Protocol Specification. For purposes of this definition,
+ the Advanced Messaging Queue Protocol Specification shall be deemed to
+ include both architectural and interconnection requirements essential
+ for interoperability and may also include supporting source code artifacts
+ where such architectural, interconnection requirements and source code
+ artifacts are expressly identified as being required or documentation to
+ achieve compliance with the Advanced Messaging Queue Protocol Specification.
+
+ As used hereunder, "Licensed Products" means only those specific portions
+ of products (hardware, software or combinations thereof) that implement
+ and are compliant with all relevant portions of the Advanced Messaging
+ Queue Protocol Specification.
+
+ The following disclaimers, which you hereby also acknowledge as to any
+ use you may make of the Advanced Messaging Queue Protocol Specification:
+
+ THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
+ AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+ IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
+ CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
+ SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
+ MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD PARTY
+ PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+ THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
+ INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
+ USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
+ PROTOCOL SPECIFICATION.
+
+ The name and trademarks of the Authors may NOT be used in any manner,
+ including advertising or publicity pertaining to the Advanced Messaging
+ Queue Protocol Specification or its contents without specific, written
+ prior permission. Title to copyright in the Advanced Messaging Queue
+ Protocol Specification will at all times remain with the Authors.
+
+ No other rights are granted by implication, estoppel or otherwise.
+
+ Upon termination of your license or rights under this Agreement, you
+ shall destroy all copies of the Advanced Messaging Queue Protocol
+ Specification in your possession or control.
+
+ Trademarks
+ ==========
+ "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
+ Octagon Symbol are trademarks of JPMorgan Chase & Co.
+
+ IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
+
+ IONA, IONA Technologies, and the IONA logos are trademarks of IONA
+ Technologies PLC and/or its subsidiaries.
+
+ LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
+ trademarks of Red Hat, Inc. in the US and other countries.
+
+ Java, all Java-based trademarks and OpenOffice.org are trademarks of
+ Sun Microsystems, Inc. in the United States, other countries, or both.
+
+ Other company, product, or service names may be trademarks or service
+ marks of others.
+
+ Links to full AMQP specification:
+ =================================
+ http://www.envoytech.org/spec/amq/
+ http://www.iona.com/opensource/amqp/
+ http://www.redhat.com/solutions/specifications/amqp/
+ http://www.twiststandards.org/tiki-index.php?page=AMQ
+ http://www.imatix.com/amqp
+
+ JZlib 0.0.* were released under the GNU LGPL license. Later, we have switched
+ over to a BSD-style license.
+
+
+ =========================================================================
+ == JCraft License ==
+ =========================================================================
+
+ ------------------------------------------------------------------------------
+ Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+ INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/qpid/java/resources/NOTICE b/qpid/java/resources/NOTICE
index 79768ab677..7bb6f764b7 100644
--- a/qpid/java/resources/NOTICE
+++ b/qpid/java/resources/NOTICE
@@ -1,142 +1,37 @@
-// ------------------------------------------------------------------
-// NOTICE file corresponding to the section 4d of The Apache License,
-// Version 2.0, in this case for Qpid Common Utilities
-// ------------------------------------------------------------------
-
Apache Qpid
Copyright 2006-2008 Apache Software Foundation
-
This product includes software developed at
Apache Software Foundation (http://www.apache.org/)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Unnamed - relaxngDatatype:relaxngDatatype:jar:20020414 (http://sourceforge.net/projects/relaxng)
-License: BSD License (http://www.opensource.org/licenses/bsd-license.php)
-
-This product includes/uses software, Apache MINA Core API (http://directory.apache.org/projects/mina/)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Unnamed - isorelax:isorelax:jar:20020414
-License: MIT license (http://www.opensource.org/licenses/mit-license.html)
-
-This product includes/uses software, SLF4J API Module (http://www.slf4j.org),
-developed by QOS.ch (http://www.qos.ch)
-License: MIT License (http://www.slf4j.org/license.html)
-
-This product includes/uses software, Commons Collections - commons-collections:commons-collections:jar:3.1,
-developed by Apache Software Foundation (http://www.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Commons Digester - commons-digester:commons-digester:jar:1.6
-developed by Apache Software Foundation (http://www.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Commons CLI - commons-cli:commons-cli:jar:1.0
-Ideveloped by Apache Software Foundation (http://www.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Unnamed - msv:msv:jar:20020414
-developed by (https://msv.dev.java.net/)
-License:
-
-This product includes/uses software, Codec (http://jakarta.apache.org/commons/codec/),
-developed by The Apache Software Foundation (http://jakarta.apache.org)
-License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Commons Logging - commons-logging:commons-logging:jar:1.0
-developed by Apache Software Foundation (http://www.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Backport of JSR 166 (http://www.mathcs.emory.edu/dcl/util/backport-util-concurrent/),
-developed by Dawid Kurzyniec (http://www.mathcs.emory.edu/~dawidk/)
-License: Public Domain (http://creativecommons.org/licenses/publicdomain)
-This product includes/uses software, Commons Lang - commons-lang:commons-lang:jar:2.1
-developed by Apache Software Foundation (http://www.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
+Message logging is provided by the SLF4J library package,
+which is open source software, written by Ceki Gülcü, and
+copyright by SLF4J.ORG and QOS.ch. The original software is
+available from
-This product includes/uses software, Apache MINA SSL Filter (http://directory.apache.org/subprojects/mina/mina-filter-ssl)
-developed by Apache Software Foundation (http://www.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
+ http://www.slf4j.org/
-This product includes/uses software, Unnamed - xerces:xercesImpl:jar:2.2.1
-developed by The Apache Software Foundation (http://jakarta.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
+Concurrency utlitity classes are provided by the backport-util-concurrent
+library package, which is open source software, written by
+Dawid Kurzyniec, and copyright by Distributed Computing Laboratory,
+Emory University. The original software is available from
-This product includes/uses software, - javax.servlet:servlet-api:jar:2.3
+ http://dcl.mathcs.emory.edu/util/backport-util-concurrent/
-This product includes/uses software, Xalan - xalan:xalan:jar:2.7.0
-developed by Apache Software Foundation (http://www.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
+Data compression support is provided by the JZLib library package,
+which is open source software, written by JCraft, and copyright
+by JCraft. The original software is available from
-This product includes/uses software, Commons Configuration (http://jakarta.apache.org/commons/),
-developed by The Apache Software Foundation (http://jakarta.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
+ http://www.jcraft.com/jzlib/
-This product includes/uses software, Apache MINA Java5 Extensions (http://directory.apache.org/subprojects/mina/mina-java5)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
+Spring framework is provided by the Spring framework library
+package, which is open source software, written by Rod Johnson
+et al, and copyright by Springframework.org. The original
+software is available from
-This product includes/uses software, Jaxen - jaxen:jaxen:jar:1.0-FCS
-License: Apache License (http://jaxen.org/faq.html)
+ http://www.springframework.org/
-This product includes/uses software, BeanUtils (http://jakarta.apache.org/commons/beanutils/)
-developed by The Apache Software Foundation (http://jakarta.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, XML Commons External Components XML APIs (http://xml.apache.org/commons/#external),
-developed by Apache Software Foundation (http://www.apache.org/)
-License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-This product includes/uses software, Commons Beanutils Core - commons-beanutils:commons-beanutils-core:jar:1.7.0
-developed by The Apache Software Foundation (http://jakarta.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Commons Logging API - commons-logging:commons-logging-api:jar:1.0.4
-developed by The Apache Software Foundation (http://jakarta.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Dom4j - dom4j:dom4j:jar:1.4
-developed by MetaStuff, Ltd. (http://www.dom4j.org/)
-License: BSD License (http://www.dom4j.org/license.html)
-
-This product includes/uses software, Saxon - saxpath:saxpath:jar:1.0-FCS
-developed by Michael Kay (http://saxon.sourceforge.net/)
-License: Mozilla Public License v1.0, (http://www.opensource.org/licenses/mozilla1.0.php)
-
-This product includes/uses software, Felix (http://felix.apache.org)
-developed by Apache Software Foundation (http://www.apache.org)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product uses/references the following software from Eclipse.
-License: Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html)
-(Note: the versions are ommited and only the name is specified.)
-org.eclipse.jface
-org.eclipse.core.*
-org.eclipse.equinox.*
-org.eclipse.osgi
-org.eclipse.swt
-Source available from : http://archive.eclipse.org/eclipse/downloads/drops/R-3.2-200606291905/index.php
-
-This product includes/uses software, ICU4J - ICU4J 3.4.4
-developed by the ICU Project (http://icu-project.org/)
-License: http://source.icu-project.org/repos/icu/icu/trunk/license.html
This product includes software developed at
The OSGi Alliance (http://www.osgi.org/).
Copyright 2006 The OSGi Alliance.
Licensed under the Apache License 2.0.
-
-This product includes/uses software, Javacc - javacc.jar
-License: BSD License (https://javacc.dev.java.net/)
-
-This product includes/uses software, SLF4J API Module (http://www.slf4j.org),
-developed by QOS.ch (http://www.qos.ch)
-Source included with binary builds at : http://slf4j.org/dist
-License: MIT License (http://www.slf4j.org/license.html)
-
-This product includes/uses software, JUnit Toolkit (http://sourceforge.net/projects/junit-toolkit/)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-This product includes/uses software, Apache Log4j (http://logging.apache.org/log4j/1.2)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java
index 232295811c..92a142e402 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java
@@ -48,6 +48,7 @@ public class SlowMessageStore implements MessageStore
public void configure(VirtualHost virtualHost, String base, Configuration config) throws Exception
{
+ _logger.info("Starting SlowMessageStore on Virtualhost:" + virtualHost.getName());
Configuration delays = config.subset(base + "." + DELAYS);
configureDelays(delays);
@@ -119,14 +120,28 @@ public class SlowMessageStore implements MessageStore
{
if (delay > 0)
{
+ long start = System.nanoTime();
try
{
+
Thread.sleep(delay);
}
catch (InterruptedException e)
{
_logger.warn("Interrupted : " + e);
}
+
+ long slept = (System.nanoTime() - start) / 1000000;
+
+ if (slept >= delay)
+ {
+ _logger.info("Done sleep for:" + slept+":"+delay);
+ }
+ else
+ {
+ _logger.info("Only sleep for:" + slept + " re-sleeping");
+ doDelay(delay - slept);
+ }
}
}
diff --git a/qpid/review/LICENSE b/qpid/review/LICENSE
new file mode 100644
index 0000000000..bc46b77047
--- /dev/null
+++ b/qpid/review/LICENSE
@@ -0,0 +1,206 @@
+=========================================================================
+== Apache License ==
+=========================================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/qpid/review/NOTICE b/qpid/review/NOTICE
new file mode 100644
index 0000000000..54c534c30b
--- /dev/null
+++ b/qpid/review/NOTICE
@@ -0,0 +1,8 @@
+// ------------------------------------------------------------------
+// NOTICE file corresponding to the section 4d of The Apache License,
+// Version 2.0, in this case for Qpid code review scripts
+// ------------------------------------------------------------------
+
+Apache Qpid
+Copyright 2006-2008 Apache Software Foundation
+
diff --git a/qpid/review/jiraRSS2wiki.xsl b/qpid/review/jiraRSS2wiki.xsl
index 6ebc86d0de..bd4933cfb4 100644
--- a/qpid/review/jiraRSS2wiki.xsl
+++ b/qpid/review/jiraRSS2wiki.xsl
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ - 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.
+ -
+ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"></xsl:output>
<xsl:template match="/">
diff --git a/qpid/review/svnlog2wiki.xsl b/qpid/review/svnlog2wiki.xsl
index 45fade4cda..b705115cfd 100644
--- a/qpid/review/svnlog2wiki.xsl
+++ b/qpid/review/svnlog2wiki.xsl
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ -
+ - 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.
+ -
+ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"></xsl:output>
<xsl:template match="/">
diff --git a/qpid/specs/LICENSE b/qpid/specs/LICENSE
new file mode 100644
index 0000000000..f8c0d5d1ba
--- /dev/null
+++ b/qpid/specs/LICENSE
@@ -0,0 +1,325 @@
+=========================================================================
+== Apache License ==
+=========================================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+=========================================================================
+== AMQP License ==
+=========================================================================
+Copyright Notice
+ ================
+ (c) Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc.,
+ iMatix Corporation, IONA\ufffd Technologies, Red Hat, Inc.,
+ TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
+
+ License
+ =======
+ JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix
+ Corporation, IONA Technologies, Red Hat, Inc., TWIST Process Innovations, and
+ 29West Inc. (collectively, the "Authors") each hereby grants to you a worldwide,
+ perpetual, royalty-free, nontransferable, nonexclusive license to
+ (i) copy, display, distribute and implement the Advanced Messaging Queue Protocol
+ ("AMQP") Specification and (ii) the Licensed Claims that are held by
+ the Authors, all for the purpose of implementing the Advanced Messaging
+ Queue Protocol Specification. Your license and any rights under this
+ Agreement will terminate immediately without notice from
+ any Author if you bring any claim, suit, demand, or action related to
+ the Advanced Messaging Queue Protocol Specification against any Author.
+ Upon termination, you shall destroy all copies of the Advanced Messaging
+ Queue Protocol Specification in your possession or control.
+
+ As used hereunder, "Licensed Claims" means those claims of a patent or
+ patent application, throughout the world, excluding design patents and
+ design registrations, owned or controlled, or that can be sublicensed
+ without fee and in compliance with the requirements of this
+ Agreement, by an Author or its affiliates now or at any
+ future time and which would necessarily be infringed by implementation
+ of the Advanced Messaging Queue Protocol Specification. A claim is
+ necessarily infringed hereunder only when it is not possible to avoid
+ infringing it because there is no plausible non-infringing alternative
+ for implementing the required portions of the Advanced Messaging Queue
+ Protocol Specification. Notwithstanding the foregoing, Licensed Claims
+ shall not include any claims other than as set forth above even if
+ contained in the same patent as Licensed Claims; or that read solely
+ on any implementations of any portion of the Advanced Messaging Queue
+ Protocol Specification that are not required by the Advanced Messaging
+ Queue Protocol Specification, or that, if licensed, would require a
+ payment of royalties by the licensor to unaffiliated third parties.
+ Moreover, Licensed Claims shall not include (i) any enabling technologies
+ that may be necessary to make or use any Licensed Product but are not
+ themselves expressly set forth in the Advanced Messaging Queue Protocol
+ Specification (e.g., semiconductor manufacturing technology, compiler
+ technology, object oriented technology, networking technology, operating
+ system technology, and the like); or (ii) the implementation of other
+ published standards developed elsewhere and merely referred to in the
+ body of the Advanced Messaging Queue Protocol Specification, or
+ (iii) any Licensed Product and any combinations thereof the purpose or
+ function of which is not required for compliance with the Advanced
+ Messaging Queue Protocol Specification. For purposes of this definition,
+ the Advanced Messaging Queue Protocol Specification shall be deemed to
+ include both architectural and interconnection requirements essential
+ for interoperability and may also include supporting source code artifacts
+ where such architectural, interconnection requirements and source code
+ artifacts are expressly identified as being required or documentation to
+ achieve compliance with the Advanced Messaging Queue Protocol Specification.
+
+ As used hereunder, "Licensed Products" means only those specific portions
+ of products (hardware, software or combinations thereof) that implement
+ and are compliant with all relevant portions of the Advanced Messaging
+ Queue Protocol Specification.
+
+ The following disclaimers, which you hereby also acknowledge as to any
+ use you may make of the Advanced Messaging Queue Protocol Specification:
+
+ THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
+ AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+ IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
+ CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
+ SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
+ MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD PARTY
+ PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+ THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
+ INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
+ USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
+ PROTOCOL SPECIFICATION.
+
+ The name and trademarks of the Authors may NOT be used in any manner,
+ including advertising or publicity pertaining to the Advanced Messaging
+ Queue Protocol Specification or its contents without specific, written
+ prior permission. Title to copyright in the Advanced Messaging Queue
+ Protocol Specification will at all times remain with the Authors.
+
+ No other rights are granted by implication, estoppel or otherwise.
+
+ Upon termination of your license or rights under this Agreement, you
+ shall destroy all copies of the Advanced Messaging Queue Protocol
+ Specification in your possession or control.
+
+ Trademarks
+ ==========
+ "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
+ Octagon Symbol are trademarks of JPMorgan Chase & Co.
+
+ IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
+
+ IONA, IONA Technologies, and the IONA logos are trademarks of IONA
+ Technologies PLC and/or its subsidiaries.
+
+ LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
+ trademarks of Red Hat, Inc. in the US and other countries.
+
+ Java, all Java-based trademarks and OpenOffice.org are trademarks of
+ Sun Microsystems, Inc. in the United States, other countries, or both.
+
+ Other company, product, or service names may be trademarks or service
+ marks of others.
+
+ Links to full AMQP specification:
+ =================================
+ http://www.envoytech.org/spec/amq/
+ http://www.iona.com/opensource/amqp/
+ http://www.redhat.com/solutions/specifications/amqp/
+ http://www.twiststandards.org/tiki-index.php?page=AMQ
+ http://www.imatix.com/amqp
diff --git a/qpid/specs/NOTICE b/qpid/specs/NOTICE
new file mode 100644
index 0000000000..0e59eb3131
--- /dev/null
+++ b/qpid/specs/NOTICE
@@ -0,0 +1,7 @@
+// ------------------------------------------------------------------
+// NOTICE file corresponding to the section 4d of The Apache License,
+// Version 2.0,
+// ------------------------------------------------------------------
+
+Apache Qpid
+Copyright 2006-2008 Apache Software Foundation