Initial check-in of new Apache.NMS.XMS provider implementation.
authorJim Gomes <jgomes@apache.org>
Wed, 6 Jan 2016 02:19:56 +0000 (02:19 +0000)
committerJim Gomes <jgomes@apache.org>
Wed, 6 Jan 2016 02:19:56 +0000 (02:19 +0000)
Big thanks to Stéphane Ramet for the implementation!
Fixes [AMQNET-185]. (See https://issues.apache.org/jira/browse/AMQNET-185)

102 files changed:
Apache.NMS.XMS.Test.nunit [new file with mode: 0644]
LICENSE.txt [new file with mode: 0644]
NOTICE.txt [new file with mode: 0644]
README.txt [new file with mode: 0644]
keyfile/NMSKey.snk [new file with mode: 0644]
nant-common.xml [new file with mode: 0644]
nant.build [new file with mode: 0644]
package.ps1 [new file with mode: 0644]
src/main/csharp/BytesMessage.cs [new file with mode: 0644]
src/main/csharp/Connection.cs [new file with mode: 0644]
src/main/csharp/ConnectionFactory.cs [new file with mode: 0644]
src/main/csharp/ConnectionMetaData.cs [new file with mode: 0644]
src/main/csharp/Destination.cs [new file with mode: 0644]
src/main/csharp/InitialContext.cs [new file with mode: 0644]
src/main/csharp/MapMessage.cs [new file with mode: 0644]
src/main/csharp/Message.cs [new file with mode: 0644]
src/main/csharp/MessageConsumer.cs [new file with mode: 0644]
src/main/csharp/MessageProducer.cs [new file with mode: 0644]
src/main/csharp/MessageProperties.cs [new file with mode: 0644]
src/main/csharp/ObjectMessage.cs [new file with mode: 0644]
src/main/csharp/Queue.cs [new file with mode: 0644]
src/main/csharp/QueueBrowser.cs [new file with mode: 0644]
src/main/csharp/Session.cs [new file with mode: 0644]
src/main/csharp/StreamMessage.cs [new file with mode: 0644]
src/main/csharp/TemporaryQueue.cs [new file with mode: 0644]
src/main/csharp/TemporaryTopic.cs [new file with mode: 0644]
src/main/csharp/TextMessage.cs [new file with mode: 0644]
src/main/csharp/Topic.cs [new file with mode: 0644]
src/main/csharp/Util/Dispatcher.cs [new file with mode: 0644]
src/main/csharp/Util/ExceptionUtil.cs [new file with mode: 0644]
src/main/csharp/Util/IntrospectionSupport.cs [new file with mode: 0644]
src/main/csharp/Util/UriAttributeAttribute.cs [new file with mode: 0644]
src/main/csharp/Util/XMSConvert.cs [new file with mode: 0644]
src/main/csharp/Util/XMSEnum.cs [new file with mode: 0644]
src/main/csharp/_TODO_.txt [new file with mode: 0644]
src/main/ndoc/NamespaceSummary.xml [new file with mode: 0644]
src/main/sandcastle/feedback_content.xml [new file with mode: 0644]
src/test/csharp/AsyncConsumeTest.cs [new file with mode: 0644]
src/test/csharp/BadConsumeTest.cs [new file with mode: 0644]
src/test/csharp/BytesMessageTest.cs [new file with mode: 0644]
src/test/csharp/Commands/BytesMessage.cs [new file with mode: 0644]
src/test/csharp/Commands/Destination.cs [new file with mode: 0644]
src/test/csharp/Commands/MapMessage.cs [new file with mode: 0644]
src/test/csharp/Commands/Message.cs [new file with mode: 0644]
src/test/csharp/Commands/ObjectMessage.cs [new file with mode: 0644]
src/test/csharp/Commands/Queue.cs [new file with mode: 0644]
src/test/csharp/Commands/StreamMessage.cs [new file with mode: 0644]
src/test/csharp/Commands/TempDestination.cs [new file with mode: 0644]
src/test/csharp/Commands/TempQueue.cs [new file with mode: 0644]
src/test/csharp/Commands/TempTopic.cs [new file with mode: 0644]
src/test/csharp/Commands/TextMessage.cs [new file with mode: 0644]
src/test/csharp/Commands/Topic.cs [new file with mode: 0644]
src/test/csharp/ConnectionTest.cs [new file with mode: 0644]
src/test/csharp/ConsumerTest.cs [new file with mode: 0644]
src/test/csharp/DurableTest.cs [new file with mode: 0644]
src/test/csharp/EndianBinaryReaderTest.cs [new file with mode: 0644]
src/test/csharp/EndianBinaryWriterTest.cs [new file with mode: 0644]
src/test/csharp/EndianTest.cs [new file with mode: 0644]
src/test/csharp/ForeignMessageTransformationTest.cs [new file with mode: 0644]
src/test/csharp/MapMessageTest.cs [new file with mode: 0644]
src/test/csharp/MessageSelectorTest.cs [new file with mode: 0644]
src/test/csharp/MessageTest.cs [new file with mode: 0644]
src/test/csharp/MessageTransformerTest.cs [new file with mode: 0644]
src/test/csharp/NMSPropertyTest.cs [new file with mode: 0644]
src/test/csharp/NMSTest.cs [new file with mode: 0644]
src/test/csharp/NMSTestSupport.cs [new file with mode: 0644]
src/test/csharp/NMSTracer.cs [new file with mode: 0644]
src/test/csharp/PrimitiveMapTest.cs [new file with mode: 0644]
src/test/csharp/ProducerTest.cs [new file with mode: 0644]
src/test/csharp/RedeliveryPolicyTest.cs [new file with mode: 0644]
src/test/csharp/RequestResponseTest.cs [new file with mode: 0644]
src/test/csharp/StreamMessageTest.cs [new file with mode: 0644]
src/test/csharp/TempDestinationDeletionTest.cs [new file with mode: 0644]
src/test/csharp/TempDestinationTest.cs [new file with mode: 0644]
src/test/csharp/TextMessageTest.cs [new file with mode: 0644]
src/test/csharp/TransactionTest.cs [new file with mode: 0644]
src/test/csharp/XMSAsyncConsumeTest.cs [new file with mode: 0644]
src/test/csharp/XMSBadConsumeTest.cs [new file with mode: 0644]
src/test/csharp/XMSBytesMessageTest.cs [new file with mode: 0644]
src/test/csharp/XMSConnectionTest.cs [new file with mode: 0644]
src/test/csharp/XMSConsumerTest.cs [new file with mode: 0644]
src/test/csharp/XMSDurableTest.cs [new file with mode: 0644]
src/test/csharp/XMSForeignMessageTransformationTest.cs [new file with mode: 0644]
src/test/csharp/XMSMapMessageTest.cs [new file with mode: 0644]
src/test/csharp/XMSMessageSelectorTest.cs [new file with mode: 0644]
src/test/csharp/XMSMessageTest.cs [new file with mode: 0644]
src/test/csharp/XMSMessageTransformerTest.cs [new file with mode: 0644]
src/test/csharp/XMSNMSPropertyTest.cs [new file with mode: 0644]
src/test/csharp/XMSProducerTest.cs [new file with mode: 0644]
src/test/csharp/XMSRequestResponseTest.cs [new file with mode: 0644]
src/test/csharp/XMSStreamMessageTest.cs [new file with mode: 0644]
src/test/csharp/XMSTempDestinationDeletionTest.cs [new file with mode: 0644]
src/test/csharp/XMSTempDestinationTest.cs [new file with mode: 0644]
src/test/csharp/XMSTestSupport.cs [new file with mode: 0644]
src/test/csharp/XMSTextMessageTest.cs [new file with mode: 0644]
src/test/csharp/XMSTransactionTest.cs [new file with mode: 0644]
src/test/csharp/XMSXmlMessageTest.cs [new file with mode: 0644]
src/test/csharp/XmlMessageTest.cs [new file with mode: 0644]
vs2013-xms-test.csproj [new file with mode: 0644]
vs2013-xms.csproj [new file with mode: 0644]
vs2013-xms.sln [new file with mode: 0644]
xmsprovider-test.config [new file with mode: 0644]

diff --git a/Apache.NMS.XMS.Test.nunit b/Apache.NMS.XMS.Test.nunit
new file mode 100644 (file)
index 0000000..54bccec
--- /dev/null
@@ -0,0 +1,7 @@
+<NUnitProject>\r
+  <Settings activeconfig="Default" />\r
+  <Config name="Default" binpathtype="Auto">\r
+    <!--<assembly path="Apache.NMS.Test.dll" />-->\r
+    <assembly path="Apache.NMS.XMS.Test.dll" />\r
+  </Config>\r
+</NUnitProject>
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644 (file)
index 0000000..6f22588
--- /dev/null
@@ -0,0 +1,764 @@
+\r
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+APACHE ACTIVEMQ DEPENDENCIES:\r
+\r
+The Apache ActiveMQ message broker includes a number of dependencies, many \r
+of them optional, with separate copyright notices and license terms. Your \r
+use of the source code for the these subcomponents is subject to the terms \r
+and conditions of the following licenses. \r
+\r
+For the backport-util-concurrent library:\r
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">\r
+<html><head><title>Creative Commons Public Domain</title>\r
+\r
+<body>\r
+\r
+<p align="center"><em>Copyright-Only Dedication (based on United States law) or Public Domain Certification</em></p>\r
+\r
+        <p>The\r
+person or persons who have associated work with this document (the\r
+"Dedicator" or "Certifier") hereby either (a) certifies that, to the\r
+best of his knowledge, the work of authorship identified is in the\r
+public domain of the country from which the work is published, or (b)\r
+hereby dedicates whatever copyright the dedicators holds in the work of\r
+authorship identified below (the "Work") to the public domain. A\r
+certifier, morever, dedicates any copyright interest he may have in the\r
+associated work, and for these purposes, is described as a "dedicator"\r
+below.</p>\r
+\r
+        <p>A certifier has taken reasonable steps to verify\r
+the copyright status of this work. Certifier recognizes that his good\r
+faith efforts may not shield him from liability if in fact the work\r
+certified is not in the public domain.</p>\r
+\r
+        <p>Dedicator makes\r
+this dedication for the benefit of the public at large and to the\r
+detriment of the Dedicator's heirs and successors. Dedicator intends\r
+this dedication to be an overt act of relinquishment in perpetuity of\r
+all present and future rights under copyright law, whether vested or\r
+contingent, in the Work. Dedicator understands that such relinquishment\r
+of all rights includes the relinquishment of all rights to enforce (by\r
+lawsuit or otherwise) those copyrights in the Work.</p>\r
+\r
+        <p>Dedicator\r
+recognizes that, once placed in the public domain, the Work may be\r
+freely reproduced, distributed, transmitted, used, modified, built\r
+upon, or otherwise exploited by anyone for any purpose, commercial or\r
+non-commercial, and in any way, including by methods that have not yet\r
+been invented or conceived.</p>\r
+    </div>\r
+</div>\r
+</body></html>\r
+\r
+For the mx4j, mx4j-remote, and mx4j-tools library:\r
+\r
+         The MX4J License, Version 1.0\r
+\r
+         Copyright (c) 2001-2004 by the MX4J contributors.  All rights reserved.\r
+\r
+         Redistribution and use in source and binary forms, with or without\r
+         modification, are permitted provided that the following conditions\r
+         are met:\r
+\r
+         1. Redistributions of source code must retain the above copyright\r
+            notice, this list of conditions and the following disclaimer.\r
+\r
+         2. Redistributions in binary form must reproduce the above copyright\r
+            notice, this list of conditions and the following disclaimer in\r
+            the documentation and/or other materials provided with the\r
+            distribution.\r
+\r
+         3. The end-user documentation included with the redistribution,\r
+            if any, must include the following acknowledgment:\r
+               "This product includes software developed by the\r
+                MX4J project (http://mx4j.sourceforge.net)."\r
+            Alternately, this acknowledgment may appear in the software itself,\r
+            if and wherever such third-party acknowledgments normally appear.\r
+\r
+         4. The name "MX4J" must not be used to endorse or promote\r
+            products derived from this software without prior written\r
+            permission.\r
+            For written permission, please contact\r
+            biorn_steedom [at] users [dot] sourceforge [dot] net\r
+\r
+         5. Products derived from this software may not be called "MX4J",\r
+            nor may "MX4J" appear in their name, without prior written\r
+            permission of Simone Bordet.\r
+\r
+         THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED\r
+         WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r
+         OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
+         DISCLAIMED.  IN NO EVENT SHALL THE MX4J CONTRIBUTORS\r
+         BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+         LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\r
+         USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
+         ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\r
+         OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\r
+         OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
+         SUCH DAMAGE.\r
+         ====================================================================\r
+\r
+         This software consists of voluntary contributions made by many\r
+         individuals on behalf of the MX4J project.  For more information on\r
+         MX4J, please see\r
+         <a href="http://mx4j.sourceforge.net" target="_top">the MX4J website</a>.\r
+\r
+For the jetty and jetty-util library:\r
+\r
+\r
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+For the xmlpull library:\r
+\r
+XMLPULL API IS FREE\r
+-------------------\r
+\r
+All of the XMLPULL API source code, compiled code, and documentation \r
+contained in this distribution *except* for tests (see separate LICENSE_TESTS.txt)\r
+are in the Public Domain.\r
+\r
+XMLPULL API comes with NO WARRANTY or guarantee of fitness for any purpose.\r
+\r
+Initial authors:\r
+\r
+  Stefan Haustein\r
+  Aleksander Slominski\r
+\r
+2001-12-12\r
+\r
+For the spring library:\r
+\r
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+For the xstream library:\r
+\r
+(BSD Style License)\r
+\r
+Copyright (c) 2003-2004, Joe Walnes\r
+All rights reserved.\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions are met:\r
+\r
+Redistributions of source code must retain the above copyright notice, this list of\r
+conditions and the following disclaimer. Redistributions in binary form must reproduce\r
+the above copyright notice, this list of conditions and the following disclaimer in\r
+the documentation and/or other materials provided with the distribution.\r
+\r
+Neither the name of XStream nor the names of its contributors may be used to endorse\r
+or promote products derived from this software without specific prior written\r
+permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY\r
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\r
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\r
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\r
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY\r
+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\r
+DAMAGE.\r
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644 (file)
index 0000000..d8ded15
--- /dev/null
@@ -0,0 +1,12 @@
+=========================================================================\r
+==  NOTICE file corresponding to the section 4 d of                    ==\r
+==  the Apache License, Version 2.0,                                   ==\r
+==  in this case for the Apache ActiveMQ distribution.                 ==\r
+=========================================================================\r
+\r
+Apache ActiveMQ\r
+Copyright 2005-2006 The Apache Software Foundation\r
+\r
+This product includes software developed by\r
+The Apache Software Foundation (http://www.apache.org/).\r
+\r
diff --git a/README.txt b/README.txt
new file mode 100644 (file)
index 0000000..6c5d2cf
--- /dev/null
@@ -0,0 +1,47 @@
+=======================================================================\r
+Welcome to:\r
+ * Apache.NMS.XMS : Apache NMS for IBM XMS Client Library\r
+=======================================================================\r
+\r
+For more information see http://activemq.apache.org/nms\r
+\r
+=======================================================================\r
+Building With NAnt 0.86 see http://nant.sourceforge.net/\r
+=======================================================================\r
+\r
+NAnt version 0.86 or newer is required to build Apache.NMS.XMS.  Version 0.90\r
+or newer is highly recommended.\r
+To build the code using NAnt, run:\r
+\r
+  nant\r
+\r
+The NMS documentation can be generated into three different formats using\r
+Microsoft's Sandcastle open source product. The Sandcastle Styles project\r
+was used to enhance the output generated from the current release of Sandcastle.\r
+\r
+The Sandcastle project is located here:\r
+\r
+http://sandcastle.codeplex.com/\r
+\r
+The Sandcastle Styles project is located here:\r
+\r
+http://sandcastlestyles.codeplex.com/\r
+\r
+To generate the documentation, run:\r
+\r
+  nant sandcastle-all\r
+\r
+=======================================================================\r
+Building With Visual Studio 2013\r
+=======================================================================\r
+\r
+First build the project with nant, this will download and install \r
+all the 3rd party dependencies for you.\r
+\r
+Open the solution File.  Build using "Build"->"Build Solution" \r
+menu option.\r
+\r
+The resulting DLLs will be in build\${framework}\debug or the \r
+build\${framework}\release directories depending on your settings \r
+under "Build"->"Configuration Manager"\r
+\r
diff --git a/keyfile/NMSKey.snk b/keyfile/NMSKey.snk
new file mode 100644 (file)
index 0000000..fdd5b24
Binary files /dev/null and b/keyfile/NMSKey.snk differ
diff --git a/nant-common.xml b/nant-common.xml
new file mode 100644 (file)
index 0000000..3e5a8fc
--- /dev/null
@@ -0,0 +1,658 @@
+<?xml version="1.0"?>\r
+<!--\r
+    Licensed to the Apache Software Foundation (ASF) under one or more\r
+    contributor license agreements.  See the NOTICE file distributed with\r
+    this work for additional information regarding copyright ownership.\r
+    The ASF licenses this file to You under the Apache License, Version 2.0\r
+    (the "License"); you may not use this file except in compliance with\r
+    the License.  You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+-->\r
+<project xmlns="http://nant.sourceforge.net/release/0.85/nant.xsd">\r
+\r
+    <!-- ============================================================================================ -->\r
+    <!--    P R O P E R T Y    D E F I N I T I O N S                                                  -->\r
+    <!-- ============================================================================================ -->\r
+\r
+    <!-- global project settings -->\r
+    <property name="project.cls.compliant"   value="true" unless="${property::exists('project.cls.compliant')}" />\r
+    <property name="project.release.type"    value="SNAPSHOT" unless="${property::exists('project.release.type')}" />\r
+    <property name="project.version.full"    value="${project.version + if(project.release.type == 'snapshot', '-' + project.release.type, '')}" dynamic="true" />\r
+    <property name="project.startyear"       value="2005" />\r
+    <property name="build.dir"               value="${basedir}/build" />\r
+    <property name="doc.dir"                 value="${build.dir}/doc" />\r
+    <property name="lib.dir"                 value="${path::combine(basedir, 'lib')}" dynamic="true" />\r
+    <property name="lib.family.dir"          value="${path::combine(lib.dir, framework::get-family(framework::get-target-framework()))}" dynamic="true" />\r
+    <property name="lib.framework.dir"       value="${path::combine(lib.family.dir, version::to-string(framework::get-version(framework::get-target-framework())))}" dynamic="true" />\r
+    <property name="package.dir"             value="${basedir}/package" />\r
+    <property name="src.package.name"        value="${project.name + '-' + project.version + if(project.release.type == 'SNAPSHOT', '-' + project.release.type, '') + '-src.zip'}" />\r
+    <property name="bin.package.name"        value="${project.name + '-' + project.version + if(project.release.type == 'SNAPSHOT', '-' + project.release.type, '') + '-bin.zip'}" />\r
+\r
+    <!-- default configuration -->\r
+    <property name="build.defines"           value="" />\r
+    <property name="build.noskip"            value="false" />\r
+    <property name="build.skip"              value="false" />\r
+    <property name="build.skip.release"      value="false" unless="${property::exists('build.skip.release')}" />\r
+    <property name="download.skip"           value="false" unless="${property::exists('download.skip')}"/>\r
+    <property name="install.skip"            value="false" unless="${property::exists('install.skip')}"/>\r
+    <property name="compile.skip"            value="false" unless="${property::exists('compile.skip')}" />\r
+    <property name="current.build.config"    value="${if(project.release.type == 'release', 'release', 'debug')}" overwrite="false" />\r
+    <property name="current.build.framework" value="${framework::get-target-framework()}" overwrite="false" />\r
+    <property name="current.build.defines"   value="${build.defines}" />\r
+    <property name="build.framework.strings" value="net-2.0,net-3.5,net-4.0,mono-2.0,mono-4.0,netcf-2.0,netcf-3.5" unless="${property::exists('build.framework.strings')}"/>\r
+    <property name="current.build.framework.assembly.dir" value="${framework::get-assembly-directory(framework::get-target-framework())}" dynamic="true" />\r
+\r
+    <property name="build.config.strings"    value="${if(property::exists('configuration'), configuration, if(build.skip.release == 'true', 'debug', 'debug,release'))}" dynamic="true" />\r
+\r
+    <!-- Figure out the user's HOME directory -->\r
+    <property name="user.home" value="${environment::get-variable('HOME')}"\r
+            if="${environment::variable-exists('HOME') and platform::is-unix()}"\r
+            unless="${property::exists('user.home')}" />\r
+    <property name="user.home" value="${environment::get-variable('USERPROFILE')}"\r
+            if="${environment::variable-exists('USERPROFILE') and platform::is-windows()}"\r
+            unless="${property::exists('user.home')}" />\r
+    <fail message="The HOME environment variable is not defined.  Please set it to your home directory."\r
+            unless="${property::exists('user.home')}" if="${platform::is-unix()}" />\r
+    <fail message="The USERPROFILE environment variable is not defined.  Please set it to your home directory."\r
+            unless="${property::exists('user.home')}" if="${platform::is-windows()}" />\r
+\r
+    <!-- Figure out the NANT repositories -->\r
+    <property name="nant.remote.repo" value="${environment::get-variable('NANT_REMOTE_REPO')}"\r
+            if="${environment::variable-exists('NANT_REMOTE_REPO')}"\r
+            unless="${property::exists('nant.remote.repo')}" />\r
+    <property name="nant.local.repo" value="${environment::get-variable('NANT_REPO')}/local"\r
+            if="${environment::variable-exists('NANT_REPO')}"\r
+            unless="${property::exists('nant.local.repo')}" />\r
+    <property name="nant.local.repo" value="${user.home}/.nant/repository/local"\r
+            unless="${property::exists('nant.local.repo')}" />\r
+\r
+    <!-- Figure out the keyfile location -->\r
+    <property name="snk.file" value="${environment::get-variable('ACTIVEMQ_DOTNET_SNK')}"\r
+            if="${environment::variable-exists('ACTIVEMQ_DOTNET_SNK')}"\r
+            unless="${property::exists('snk.file')}" />\r
+    <property name="snk.file" value="${basedir}/keyfile/NMSKey.snk"\r
+            if="${not property::exists('snk.file')}" />\r
+\r
+    <!-- ============================================================================================ -->\r
+    <!--      I N I T I A L I Z A T I O N     T A R G E T S                                           -->\r
+    <!-- ============================================================================================ -->\r
+\r
+    <target name="init" description="Initializes build properties">\r
+        <!-- enabled the release or debug configuration -->\r
+        <call target="set-${current.build.config}-configuration" />\r
+\r
+        <!-- Check to see if our build setup for the target framework -->\r
+        <if test="${not(target::exists('set-'+current.build.framework+'-framework-configuration'))}">\r
+            <fail message="The '${current.build.framework}' framework is not supported by this version of ActiveMQ .NET" />\r
+        </if>\r
+        <call target="set-${current.build.framework}-framework-configuration" />\r
+\r
+        <!-- Check to see current platform supports the target framework -->\r
+        <if test="${framework::exists(current.build.framework)}">\r
+            <property name="build.skip" value="false" />\r
+        </if>\r
+        <if test="${not framework::exists(current.build.framework)}">\r
+            <if test="${build.noskip}">\r
+                <fail message="${current.build.framework.name} is not available." />\r
+            </if>\r
+            <if test="${not(build.noskip)}">\r
+                <echo message="${current.build.framework.name} is not available. Build skipped." />\r
+                <property name="build.skip" value="true" />\r
+            </if>\r
+        </if>\r
+\r
+        <!-- Check to see if we should skip this build framework. -->\r
+        <if test="${not(build.skip)}">\r
+            <if test="${property::exists('build.'+current.build.framework+'.skip')}">\r
+                <property name="build.skip" value="true" />\r
+                <echo message="The '${current.build.framework}' framework is not supported by this version of ActiveMQ .NET" />\r
+            </if>\r
+        </if>\r
+\r
+        <property name="current.build.keysign" value="${current.build.framework.sign}" />\r
+        <property name="build.bin.dir" value="${build.dir}/${current.build.framework}/${current.build.config}" />\r
+        <if test="${not(build.skip)}">\r
+            <echo message="Doing ${if(current.build.keysign,'a signed','an unsigned')} ${current.build.config} build for the ${current.build.framework.name} framework" />\r
+            <mkdir dir="${build.bin.dir}" />\r
+        </if>\r
+        <call target="dependency-init" />\r
+    </target>\r
+\r
+    <!-- Generate four-digit build number -->\r
+    <target name="generate-build-number">\r
+        <if test="${not property::exists('project.version.numeric')}">\r
+            <script language="C#">\r
+                <imports>\r
+                    <import namespace="System.Globalization" />\r
+                    <import namespace="System.Threading" />\r
+                </imports>\r
+                <code>\r
+                    <!-- Format for assembly revision is the number of days from the year the project 'started', property project.startyear.  -->\r
+                    <![CDATA[\r
+                        public static void ScriptMain(Project project)\r
+                        {\r
+                            int startYear = Convert.ToInt32(project.Properties["project.startyear"]);\r
+                            DateTime start = new DateTime(startYear, 1, 1);\r
+                            TimeSpan ts = DateTime.Now - start;\r
+                            project.Properties["project.version.numeric"] = project.Properties["project.version"].ToString() + "." + ts.Days.ToString();\r
+                        }\r
+                    ]]>\r
+                </code>\r
+            </script>\r
+        </if>\r
+    </target>\r
+\r
+    <!-- Generate assemblyinfo.cs files -->\r
+    <target name="generate-assemblyinfo" depends="generate-build-number" description="Generate the assembly info for the path in assemblyinfo.filename">\r
+        <asminfo output="${assemblyinfo.filename}" language="CSharp">\r
+            <imports>\r
+                <import namespace="System" />\r
+                <import namespace="System.Reflection" />\r
+                <import namespace="System.Runtime.InteropServices" />\r
+            </imports>\r
+            <attributes>\r
+                <attribute type="ComVisibleAttribute" value="false" />\r
+                <attribute type="CLSCompliantAttribute" value="${project.cls.compliant}" />\r
+                <attribute type="AssemblyTitleAttribute" value="${project.short_description}" />\r
+                <attribute type="AssemblyDescriptionAttribute" value="${project.description}" />\r
+                <attribute type="AssemblyConfigurationAttribute" value="${project.release.type}" />\r
+                <attribute type="AssemblyCompanyAttribute" value="http://activemq.apache.org/nms" />\r
+                <attribute type="AssemblyProductAttribute" value="${project.short_description}" />\r
+                <attribute type="AssemblyCopyrightAttribute" value="Copyright (C) ${project.startyear}-${datetime::get-year(datetime::now())} Apache Software Foundation" />\r
+                <attribute type="AssemblyTrademarkAttribute" value="" />\r
+                <attribute type="AssemblyCultureAttribute" value="" />\r
+                <attribute type="AssemblyVersionAttribute" value="${project.version.numeric}" />\r
+                <attribute type="AssemblyInformationalVersionAttribute" value="${project.version}" />\r
+            </attributes>\r
+        </asminfo>\r
+    </target>\r
+\r
+    <!-- ============================================================================================ -->\r
+    <!--    C O N F I G U R A T I O N     T A R G E T S                                               -->\r
+    <!-- ============================================================================================ -->\r
+\r
+    <target name="set-noskip-configuration" description="Disable skipping builds">\r
+        <property name="project.noskip" value="true" />\r
+    </target>\r
+\r
+    <target name="set-debug-configuration" description="Enabled 'debug' builds">\r
+        <property name="current.build.config" value="debug" />\r
+        <property name="current.build.config.debug" value="true" />\r
+        <property name="current.build.config.release" value="false" />\r
+        <property name="current.build.defines" value="${build.defines}DEBUG,TRACE," dynamic="true" />\r
+        <property name="csc.debug" value="Full" />\r
+        <property name="csc.optimize" value="false" />\r
+    </target>\r
+\r
+    <target name="set-release-configuration" description="Enabled 'release' builds">\r
+        <property name="current.build.config" value="release" />\r
+        <property name="current.build.config.release" value="true" />\r
+        <property name="current.build.config.debug" value="false" />\r
+        <property name="csc.debug" value="Full" />\r
+        <property name="csc.optimize" value="true" />\r
+    </target>\r
+\r
+    <target name="set-net-2.0-framework-configuration">\r
+        <property name="current.build.framework" value="net-2.0" />\r
+        <property name="current.build.framework.name" value=".NET 2.0" />\r
+        <property name="current.build.defines" value="${build.defines}NET,NET_2_0" dynamic="true" />\r
+        <property name="current.build.framework.sign" value="true" />\r
+        <property name="link.sdkdoc.version" value="SDK_v2_0" />\r
+        <property name="link.sdkdoc.web" value="true" />\r
+        <if test="${framework::exists(current.build.framework)}">\r
+            <property name="nant.settings.currentframework" value="${current.build.framework}" />\r
+        </if>\r
+        <!-- Use the .NET 3.5 compiler for improved language features.  Still targets same runtime. -->\r
+        <if test="${framework::exists('net-3.5')}">\r
+            <property name="nant.settings.currentframework" value="net-3.5" />\r
+        </if>\r
+    </target>\r
+\r
+    <target name="set-net-3.5-framework-configuration">\r
+        <property name="current.build.framework" value="net-3.5" />\r
+        <property name="current.build.framework.name" value=".NET 3.5" />\r
+        <property name="current.build.defines" value="${build.defines}NET,NET_2_0,NET_3_5" dynamic="true" />\r
+        <property name="current.build.framework.sign" value="true" />\r
+        <property name="link.sdkdoc.version" value="SDK_v6_1" />\r
+        <property name="link.sdkdoc.web" value="true" />\r
+        <if test="${framework::exists(current.build.framework)}">\r
+            <property name="nant.settings.currentframework" value="${current.build.framework}" />\r
+        </if>\r
+    </target>\r
+\r
+    <target name="set-net-4.0-framework-configuration">\r
+        <property name="current.build.framework" value="net-4.0" />\r
+        <property name="current.build.framework.name" value=".NET 4.0" />\r
+        <property name="current.build.defines" value="${build.defines}NET,NET_2_0,NET_3_5,NET_4_0" dynamic="true" />\r
+        <property name="current.build.framework.sign" value="true" />\r
+        <property name="link.sdkdoc.version" value="SDK_v7_0" />\r
+        <property name="link.sdkdoc.web" value="true" />\r
+        <if test="${framework::exists(current.build.framework)}">\r
+            <property name="nant.settings.currentframework" value="${current.build.framework}" />\r
+        </if>\r
+    </target>\r
+\r
+    <target name="set-netcf-2.0-framework-configuration">\r
+        <property name="current.build.framework" value="netcf-2.0" />\r
+        <property name="current.build.framework.name" value=".NET Compact Framework 2.0" />\r
+        <property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_2_0" dynamic="true" />\r
+        <property name="current.build.framework.sign" value="true" />\r
+        <property name="link.sdkdoc.version" value="SDK_v1_1" />\r
+        <property name="link.sdkdoc.web" value="true" />\r
+        <if test="${framework::exists(current.build.framework)}">\r
+            <property name="nant.settings.currentframework" value="${current.build.framework}" />\r
+        </if>\r
+    </target>\r
+\r
+    <target name="set-netcf-3.5-framework-configuration">\r
+        <property name="current.build.framework" value="netcf-3.5" />\r
+        <property name="current.build.framework.name" value=".NET Compact Framework 3.5" />\r
+        <property name="current.build.defines" value="${build.defines}PocketPC,NETCF,NETCF_3_5" dynamic="true" />\r
+        <property name="current.build.framework.sign" value="true" />\r
+        <property name="link.sdkdoc.version" value="SDK_v3_5" />\r
+        <property name="link.sdkdoc.web" value="true" />\r
+        <if test="${framework::exists(current.build.framework)}">\r
+            <property name="nant.settings.currentframework" value="${current.build.framework}" />\r
+        </if>\r
+    </target>\r
+\r
+    <target name="set-mono-2.0-framework-configuration">\r
+        <property name="current.build.framework" value="mono-2.0" />\r
+        <property name="current.build.framework.name" value="Mono 2.0" />\r
+        <property name="current.build.defines" value="${build.defines}MONO,MONO_2_0" dynamic="true" />\r
+        <property name="current.build.framework.sign" value="true" />\r
+        <property name="link.sdkdoc.version" value="SDK_v1_1" />\r
+        <property name="link.sdkdoc.web" value="true" />\r
+        <if test="${framework::exists(current.build.framework)}">\r
+            <property name="nant.settings.currentframework" value="${current.build.framework}" />\r
+        </if>\r
+    </target>\r
+\r
+    <target name="set-mono-4.0-framework-configuration">\r
+        <property name="current.build.framework" value="mono-4.0" />\r
+        <property name="current.build.framework.name" value="Mono 4.0" />\r
+        <property name="current.build.defines" value="${build.defines}MONO,MONO_4_0" dynamic="true" />\r
+        <property name="current.build.framework.sign" value="true" />\r
+        <property name="link.sdkdoc.version" value="SDK_v1_1" />\r
+        <property name="link.sdkdoc.web" value="true" />\r
+        <if test="${framework::exists(current.build.framework)}">\r
+            <property name="nant.settings.currentframework" value="${current.build.framework}" />\r
+        </if>\r
+    </target>\r
+\r
+    <!-- ============================================================================================ -->\r
+    <!--     C O M P I L E    T A R G E T S                                                           -->\r
+    <!-- ============================================================================================ -->\r
+\r
+    <target name="compile-all" description="Compile all build configurations for all runtime configurations">\r
+        <echo message="Compiling all build configurations for all runtime configurations." />\r
+        <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">\r
+            <foreach item="String" in="${build.config.strings}" delim="," property="current.build.config">\r
+                <call target="compile-target" />\r
+            </foreach>\r
+        </foreach>\r
+    </target>\r
+\r
+    <target name="compile-target" depends="init, download-vendor, conditional-compile" />\r
+\r
+    <target name="conditional-compile" depends="init" unless="${build.skip or compile.skip}"\r
+            description="Conditionaly compiles all the modules if build framework and type are supported">\r
+        <call target="compile" />\r
+    </target>\r
+\r
+    <target name="compile" description="Compile everything">\r
+        <call target="compile-main" cascade="false" />\r
+        <call target="compile-test" cascade="false" />\r
+    </target>\r
+\r
+    <target name="compile-main" depends="init" description="Build the main library">\r
+        <echo message="Building the ${project.name} library" />\r
+        <property name="assemblyinfo.filename" value="src/main/csharp/CommonAssemblyInfo.cs" />\r
+        <call target="generate-assemblyinfo" />\r
+\r
+        <csc if="${current.build.keysign}" keyfile="${snk.file}" target="library"\r
+                define="${current.build.defines}" warnaserror="false" debug="${csc.debug}" optimize="${csc.optimize}"\r
+                output="${build.bin.dir}/${project.name}.dll" doc="${build.bin.dir}/${project.name}.xml">\r
+            <nowarn>\r
+                <warning number="1591" /> <!-- do not report warnings for missing XML comments -->\r
+            </nowarn>\r
+            <sources failonempty="true">\r
+                <include name="src/main/csharp/**.cs" />\r
+            </sources>\r
+            <references refid="dependencies" />\r
+        </csc>\r
+        <csc if="${not current.build.keysign}" target="library"\r
+                define="${current.build.defines}" warnaserror="false" debug="${csc.debug}" optimize="${csc.optimize}"\r
+                output="${build.bin.dir}/${project.name}.dll" doc="${build.bin.dir}/${project.name}.xml">\r
+            <nowarn>\r
+                <warning number="1591" /> <!-- do not report warnings for missing XML comments -->\r
+            </nowarn>\r
+            <sources failonempty="true">\r
+                <include name="src/main/csharp/**.cs" />\r
+            </sources>\r
+            <references refid="dependencies" />\r
+        </csc>\r
+        <call target="copy-content" />\r
+    </target>\r
+\r
+    <!-- Compile the nms-test module -->\r
+    <target name="compile-test" depends="compile-main" description="Build the test library">\r
+        <echo message="Building the ${project.name}.Test library" />\r
+        <property name="assemblyinfo.filename" value="src/test/csharp/CommonAssemblyInfo.cs" />\r
+        <call target="generate-assemblyinfo" />\r
+\r
+        <csc if="${current.build.keysign}" keyfile="${snk.file}" target="library"\r
+                define="${current.build.defines}" warnaserror="false" debug="${csc.debug}" optimize="${csc.optimize}"\r
+                output="${build.bin.dir}/${project.name}.Test.dll" doc="${build.bin.dir}/${project.name}.Test.xml">\r
+            <nowarn>\r
+                <warning number="1591" /> <!-- do not report warnings for missing XML comments -->\r
+                <warning number="3016" /> <!-- do not report warnings for array parameters  -->\r
+            </nowarn>\r
+            <sources failonempty="true">\r
+                <include name="src/test/csharp/**.cs" />\r
+            </sources>\r
+            <references refid="test.dependencies" />\r
+        </csc>\r
+        <csc if="${not current.build.keysign}" target="library"\r
+                define="${current.build.defines}" warnaserror="false" debug="${csc.debug}" optimize="${csc.optimize}"\r
+                output="${build.bin.dir}/${project.name}.Test.dll" doc="${build.bin.dir}/${project.name}.Test.xml">\r
+            <nowarn>\r
+                <warning number="1591" /> <!-- do not report warnings for missing XML comments -->\r
+                <warning number="3016" /> <!-- do not report warnings for array parameters  -->\r
+            </nowarn>\r
+            <sources failonempty="true">\r
+                <include name="src/test/csharp/**.cs" />\r
+            </sources>\r
+            <references refid="test.dependencies" />\r
+        </csc>\r
+        <call target="copy-content" />\r
+    </target>\r
+\r
+    <target name="copy-content">\r
+        <foreach item="File" property="content.filename">\r
+            <in>\r
+                <items refid="content.filenames" />\r
+            </in>\r
+            <do>\r
+                <copy todir="${build.bin.dir}" file="${content.filename}" if="${not file::up-to-date(content.filename, '${build.bin.dir}/${content.filename}')}" />\r
+            </do>\r
+        </foreach>\r
+    </target>\r
+\r
+    <!-- ============================================================================================ -->\r
+    <!--      I N S T A L L     T A R G E T S                                                         -->\r
+    <!-- ============================================================================================ -->\r
+\r
+    <target name="install-all" description="Install all build configurations for all runtime configurations">\r
+        <echo message="Installing all build configurations for all runtime configurations." />\r
+        <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">\r
+            <foreach item="String" in="${build.config.strings}" delim="," property="current.build.config">\r
+                <call target="install" />\r
+            </foreach>\r
+        </foreach>\r
+    </target>\r
+\r
+    <!-- Install the modules to the local repo -->\r
+    <target name="install" depends="init, compile-target, conditional-install"\r
+            description="Install the artifacts into the nant repo" />\r
+\r
+    <target name="conditional-install" unless="${build.skip or install.skip}"\r
+            description="Install the artifacts into the nant repo">\r
+        <property name="path" value="${project.group}/${project.name}/${project.version.full}/${current.build.framework}/${current.build.config}" />\r
+        <foreach item="File" property="install.filename">\r
+            <in>\r
+                <items refid="install.filenames" />\r
+            </in>\r
+            <do>\r
+                <property name="repo.task.artifact" value="${path}/${path::get-file-name(install.filename)}" />\r
+                <property name="repo.task.src" value="${install.filename}" />\r
+                <property name="repo.task.dest" value="${nant.local.repo}/${repo.task.artifact}" />\r
+                <mkdir dir="${directory::get-parent-directory(repo.task.dest)}" />\r
+                <copy file="${repo.task.src}" tofile="${repo.task.dest}" />\r
+            </do>\r
+        </foreach>\r
+    </target>\r
+\r
+    <!-- ============================================================================================ -->\r
+    <!--      R E P O    D O W N L O A D     T A R G E T S                                            -->\r
+    <!-- ============================================================================================ -->\r
+\r
+    <target name="download-vendor-all" description="Download vendor files for all runtime configurations">\r
+        <echo message="Downloading vendor files for all runtime configurations." />\r
+        <property name="current.build.config" value="release" />\r
+        <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">\r
+            <call target="download-vendor" />\r
+        </foreach>\r
+    </target>\r
+\r
+    <target name="download-vendor" depends="vendor-init, conditional-download"\r
+                description="Download the vendor artifacts from the nant repo" />\r
+\r
+    <target name="conditional-download" unless="${build.skip or download.skip}"\r
+                description="Download the artifacts from the nant repo">\r
+        <!-- Iterate over the defined vendor filesets. -->\r
+        <foreach item="String" in="${vendor.fileset.names}" delim="," property="current.vendor">\r
+            <property name="vendor.name" value="${property::get-value(current.vendor + '.name')}" />\r
+            <property name="vendor.group" value="${property::get-value(current.vendor + '.group')}" />\r
+            <property name="vendor.version" value="${property::get-value(current.vendor + '.version')}" />\r
+            <property name="vendor.filenames" value="${property::get-value(current.vendor + '.filenames')}" />\r
+            <property name="local.repo.vendor.path" value="${nant.local.repo}/${vendor.group}/${vendor.name}/${vendor.version}/${current.build.framework}/${current.build.config}" />\r
+            <property name="lib.path" value="lib/${vendor.name}/${current.build.framework}" />\r
+            <!--\r
+            Update the LIB folder with the latest version of the file.  If there is a newer version\r
+            installed in the local repository, then that version will be copied into the LIB folder.\r
+            -->\r
+            <foreach item="String" in="${vendor.filenames}" delim="," property="repo.task.artifact">\r
+                <property name="lib.task.dest" value="${lib.path}/${repo.task.artifact}" />\r
+                <mkdir dir="${directory::get-parent-directory(lib.task.dest)}" />\r
+                <property name="repo.task.src" value="${local.repo.vendor.path}/${repo.task.artifact}" />\r
+                <copy file="${repo.task.src}" tofile="${lib.task.dest}" if="${file::exists(repo.task.src)}" />\r
+                <if test="${not file::exists(lib.task.dest)}">\r
+                    <echo message="Required dependent assembly ${repo.task.artifact} from ${vendor.name} for ${current.build.framework} is not available. Build skipped." />\r
+                    <property name="build.skip" value="true" />\r
+                </if>\r
+            </foreach>\r
+        </foreach>\r
+    </target>\r
+\r
+    <!-- ============================================================================================ -->\r
+    <!--      T E S T     T A R G E T S                                                               -->\r
+    <!-- ============================================================================================ -->\r
+\r
+    <target name="test" depends="test-debug" description="Alias test target to test-debug" />\r
+\r
+    <target name="test-all" depends="test-debug, test-release" description="Test all build configurations for all runtime configurations" />\r
+\r
+    <target name="test-debug" depends="" description="Test debug build configurations for all runtime configurations">\r
+        <property name="current.build.config" value="debug" />\r
+        <call target="test-frameworks" />\r
+    </target>\r
+\r
+    <target name="test-release" depends="" description="Test release build configurations for all runtime configurations">\r
+        <property name="current.build.config" value="release" />\r
+        <call target="test-frameworks" />\r
+    </target>\r
+\r
+    <target name="test-frameworks">\r
+        <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">\r
+            <call target="init" />\r
+            <if test="${not build.skip}">\r
+                <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">\r
+                    <arg value="${NUnit.Projectfile}" />\r
+                    <arg value="-labels" />\r
+                    <arg value="-exclude=Manual,LongRunning" />\r
+                    <arg value="-xml=Nunit.TestOutput.xml" />\r
+                </exec>\r
+            </if>\r
+        </foreach>\r
+    </target>\r
+\r
+    <!-- ============================================================================================ -->\r
+    <!--      M I S C E L L A N E O U S    T A R G E T S                                              -->\r
+    <!-- ============================================================================================ -->\r
+\r
+    <target name="build" depends="default" description="Build the project." />\r
+\r
+    <target name="rebuild" depends="clean,build" description="Rebuild the project." />\r
+\r
+    <target name="clean" description="Deletes build">\r
+        <if test="${target::exists('clean-init')}">\r
+            <call target="clean-init" />\r
+        </if>\r
+        <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">\r
+            <foreach item="String" in="${build.config.strings}" delim="," property="current.build.config">\r
+                <call target="clean-proj" />\r
+            </foreach>\r
+        </foreach>\r
+    </target>\r
+\r
+    <target name="clean-proj" depends="init" description="Deletes specific project build">\r
+        <property name="clean.dir" value="build/${current.build.framework}/${current.build.config}" />\r
+        <delete dir="${clean.dir}" if="${directory::exists(clean.dir)}" />\r
+        <property name="clean.dir" value="package/${current.build.config}" />\r
+        <delete dir="${clean.dir}" if="${directory::exists(clean.dir)}" />\r
+    </target>\r
+\r
+    <target name="package" description="Bundle the source and binary distributions.">\r
+        <mkdir dir="${package.dir}"\r
+                if="${not directory::exists(package.dir)}" />\r
+        <zip zipfile="${package.dir}/${bin.package.name}">\r
+            <fileset refid="bin.package.contents"/>\r
+        </zip>\r
+        <zip zipfile="${package.dir}/${src.package.name}">\r
+            <fileset refid="src.package.contents"/>\r
+        </zip>\r
+    </target>\r
+\r
+    <target name="doc" depends="build">\r
+        <mkdir dir="${doc.dir}" />\r
+        <ndoc failonerror="false">\r
+            <assemblies basedir="${build.bin.dir}">\r
+                <include name="${project.name}.dll" />\r
+            </assemblies>\r
+            <summaries basedir="${basedir}/src/main/ndoc">\r
+                <include name="NamespaceSummary.xml" />\r
+            </summaries>\r
+            <documenters>\r
+                <documenter name="MSDN">\r
+                    <property name="OutputDirectory" value="${doc.dir}" />\r
+                    <property name="HtmlHelpName" value="${project.name}" />\r
+                    <property name="HtmlHelpCompilerFilename" value="hhc.exe" />\r
+                    <property name="IncludeFavorites" value="False" />\r
+                    <property name="Title" value="${project.short_description}" />\r
+                    <property name="SplitTOCs" value="False" />\r
+                    <property name="DefaulTOC" value="" />\r
+                    <!--\r
+                    <property name="ShowVisualBasic" value="True" />\r
+                    <property name="ShowMissingSummaries" value="True" />\r
+                    <property name="ShowMissingRemarks" value="True" />\r
+                    <property name="ShowMissingParams" value="True" />\r
+                    <property name="ShowMissingReturns" value="True" />\r
+                    <property name="ShowMissingValues" value="True" />\r
+                    -->\r
+                    <property name="DocumentInternals" value="False" />\r
+                    <property name="DocumentProtected" value="True" />\r
+                    <property name="DocumentPrivates" value="False" />\r
+                    <property name="DocumentEmptyNamespaces" value="False" />\r
+                    <property name="IncludeAssemblyVersion" value="True" />\r
+                    <property name="CopyrightText" value="" />\r
+                    <property name="CopyrightHref" value="" />\r
+                </documenter>\r
+            </documenters>\r
+        </ndoc>\r
+    </target>\r
+\r
+    <target name="sandcastle" depends="set-release-configuration, init, conditional-compile">\r
+        <!-- Directories -->\r
+        <property name="sandcastle.style" value="vs2005" unless="${property::exists('sandcastle.style')}" />\r
+        <property name="documentation.dir" value="${build.bin.dir}" />\r
+        <property name="bin.intern.dir" value="${build.bin.dir}" />\r
+        <property name="bin.extern.dir" value="${basedir}\lib\NUnit\net-2.0" />\r
+        <property name="sandcastle.dir" value="${environment::get-variable('DXROOT')}" />\r
+        <property name="sandcastle.workingdir" value="${build.dir}\doc\${sandcastle.style}" />\r
+        <property name="sandcastle.output.dir" value="${sandcastle.workingdir}\Output" />\r
+\r
+        <!-- Executables -->\r
+        <property name="sandcastle.mrefbuilder.exe" value="${sandcastle.dir}\productiontools\mrefbuilder.exe" />\r
+        <property name="sandcastle.buildassembler.exe" value="${sandcastle.dir}\productiontools\buildassembler.exe" />\r
+        <property name="sandcastle.xsltransform.exe" value="${sandcastle.dir}\productiontools\xsltransform.exe" />\r
+        <property name="sandcastle.productiontransforms.dir" value="${sandcastle.dir}\ProductionTransforms" />\r
+\r
+        <!-- Create or Cleanup Working Directory -->\r
+        <mkdir dir="${sandcastle.workingdir}"\r
+                if="${not directory::exists(sandcastle.workingdir)}" />\r
+        <delete>\r
+            <fileset basedir="${sandcastle.workingdir}">\r
+                <include name="**\*" />\r
+            </fileset>\r
+        </delete>\r
+\r
+        <!-- Copy configuration file, and hard code references -->\r
+        <copy file="${sandcastle.dir}/Presentation/${sandcastle.style}/Configuration/Sandcastle.config"\r
+                tofile="${sandcastle.workingdir}/Sandcastle.config">\r
+            <filterchain>\r
+                <replacestring from="&quot;..\..\" to="&quot;${sandcastle.dir}\" />\r
+                <replacestring from="&quot;..\" to="&quot;${sandcastle.dir}\Examples\" />\r
+                <replacestring from="&quot;.\comments.xml" to="&quot;${documentation.dir}\${project.name}.xml" />\r
+                <replacestring from="&quot;%DXROOT%\Presentation\${sandcastle.style}\content\feedback_content.xml&quot;" to="&quot;${basedir}/src/main/sandcastle/feedback_content.xml&quot;" />\r
+            </filterchain>\r
+        </copy>\r
+\r
+        <!-- Run MRefBuilder (introspection on assemblies) to create basic Reflection XML -->\r
+        <exec program="${sandcastle.mrefbuilder.exe}" workingdir="${sandcastle.workingdir}">\r
+            <arg value="${bin.intern.dir}/${project.name}.dll" />\r
+            <arg value="/out:reflection.int.xml" />\r
+            <arg value="/dep:${bin.extern.dir}\*.dll" />\r
+        </exec>\r
+\r
+        <!-- Create Reflection XML -->\r
+        <exec program="${sandcastle.xsltransform.exe}" workingdir="${sandcastle.workingdir}">\r
+            <arg value="/xsl:&quot;${sandcastle.productiontransforms.dir}\ApplyVSDocModel.xsl&quot;" if="${sandcastle.style != 'prototype'}" />\r
+            <arg value="/xsl:&quot;${sandcastle.productiontransforms.dir}\ApplyPrototypeDocModel.xsl&quot;" if="${sandcastle.style == 'prototype'}" />\r
+            <arg value="/xsl:&quot;${sandcastle.productiontransforms.dir}\AddFriendlyFilenames.xsl&quot;" /> <!-- if="${sandcastle.style != 'prototype'}" /> -->\r
+            <arg value="/xsl:&quot;${sandcastle.productiontransforms.dir}\AddGuidFilenames.xsl&quot;" if="${sandcastle.style == 'disabled'}" />\r
+            <arg value="reflection.int.xml" />\r
+            <arg value="/out:reflection.xml" />\r
+            <arg value="/arg:IncludeAllMembersTopic=true" />\r
+            <arg value="/arg:IncludeInheritedOverloadTopics=true" />\r
+        </exec>\r
+\r
+        <!-- Create Manifest (list of Topics) -->\r
+        <exec program="${sandcastle.xsltransform.exe}" workingdir="${sandcastle.workingdir}">\r
+            <arg value="/xsl:&quot;${sandcastle.productiontransforms.dir}\ReflectionToManifest.xsl&quot;" />\r
+            <arg value="reflection.xml" />\r
+            <arg value="/out:manifest.xml" />\r
+        </exec>\r
+\r
+        <!-- Create Output Environment -->\r
+        <mkdir dir="${sandcastle.output.dir}" />\r
+        <mkdir dir="${sandcastle.output.dir}/html" />\r
+        <copy todir="${sandcastle.output.dir}">\r
+            <fileset basedir="${sandcastle.dir}/Presentation/${sandcastle.style}">\r
+                <include name="icons/*" />\r
+                <include name="media/*" />\r
+                <include name="scripts/*" />\r
+                <include name="styles/*" />\r
+            </fileset>\r
+        </copy>\r
+\r
+        <!-- Run BuildAssembler (create html topic files) -->\r
+        <exec program="${sandcastle.buildassembler.exe}" workingdir="${sandcastle.workingdir}">\r
+            <arg value="/config:Sandcastle.config" />\r
+            <arg value="manifest.xml" />\r
+        </exec>\r
+    </target>\r
+\r
+    <target name="sandcastle-all" description="Generate all formats of the Sandcastle documentation files.">\r
+        <foreach item="String" in="vs2005,prototype,hana" delim="," property="sandcastle.style">\r
+            <call target="sandcastle" />\r
+        </foreach>\r
+    </target>\r
+</project>\r
diff --git a/nant.build b/nant.build
new file mode 100644 (file)
index 0000000..0912aa5
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0"?>\r
+<!--\r
+    Licensed to the Apache Software Foundation (ASF) under one or more\r
+    contributor license agreements.  See the NOTICE file distributed with\r
+    this work for additional information regarding copyright ownership.\r
+    The ASF licenses this file to You under the Apache License, Version 2.0\r
+    (the "License"); you may not use this file except in compliance with\r
+    the License.  You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+-->\r
+<project name="Apache.NMS.XMS" default="default" xmlns="http://nant.sourceforge.net/release/0.85/nant.xsd">\r
+       <!-- ============================================================================================ -->\r
+       <!--      I N I T I A L I Z A T I O N                                                             -->\r
+       <!-- ============================================================================================ -->\r
+       <property name="basedir" value="${project::get-base-directory()}" />\r
+       <property name="project.name" value="Apache.NMS.XMS" />\r
+       <property name="project.group" value="org.apache.activemq" />\r
+       <property name="project.version" value="1.8.0" unless="${property::exists('project.version')}" />\r
+       <property name="project.release.type" value="SNAPSHOT" unless="${property::exists('project.release.type')}" />\r
+       <property name="project.short_description" value="Apache NMS for XMS Class Library" />\r
+       <property name="project.description" value="Apache NMS for XMS Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for XMS" />\r
+       <!-- The XMS module is not CLS compliant yet -->\r
+       <property name="project.cls.compliant" value="false" />\r
+       <!-- Repository organized as: organization/module/version/plaform/artifact, platform might be something like 'all' or 'net-4.0/release' -->\r
+       <property name="nunit.dll" value="${basedir}/lib/NUnit/${current.build.framework}/nunit.framework.dll" dynamic="true" />\r
+       <property name="Apache.NMS.dll" value="${basedir}/lib/Apache.NMS/${current.build.framework}/Apache.NMS.dll" dynamic="true" />\r
+       <property name="Apache.NMS.pdb" value="${basedir}/lib/Apache.NMS/${current.build.framework}/Apache.NMS.pdb" dynamic="true" />\r
+       <!--<property name="Apache.NMS.Test.dll" value="${basedir}/lib/Apache.NMS/${current.build.framework}//Apache.NMS.Test.dll" dynamic="true" />-->\r
+       <!--<property name="Apache.NMS.Test.pdb" value="${basedir}/lib/Apache.NMS/${current.build.framework}/Apache.NMS.Test.pdb" dynamic="true" />-->\r
+       <property name="IBM.XMS.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Impl.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Impl.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Core.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Core.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Util.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Util.dll" dynamic="true" />\r
+       <property name="IBM.XMS.NLS.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.NLS.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Provider.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Provider.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Client.Impl.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Client.Impl.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Client.WMQ.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Client.WMQ.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Admin.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Admin.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Admin.Objects.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Admin.Objects.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Comms.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Comms.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Comms.RMM.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Comms.RMM.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Comms.SSL.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Comms.SSL.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Formats.JMF.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Formats.JMF.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Formats.MFP.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Formats.MFP.dll" dynamic="true" />\r
+       <property name="IBM.XMS.Match.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.Match.dll" dynamic="true" />\r
+       <property name="IBM.XMS.SIB.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.SIB.dll" dynamic="true" />\r
+       <property name="IBM.XMS.WCF.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.WCF.dll" dynamic="true" />\r
+       <property name="IBM.XMS.WCF.NLS.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.WCF.NLS.dll" dynamic="true" />\r
+       <property name="IBM.XMS.WMQI.dll" value="${basedir}/lib/IBM.XMS/${current.build.framework}/IBM.XMS.WMQI.dll" dynamic="true" />\r
+       <property name="NUnit.Projectfile" value="Apache.NMS.XMS.Test.nunit" />\r
+       <!-- Skip certain frameworks, since IBM XMS client is not supported on those platforms. -->\r
+       <property name="build.netcf-2.0.skip" value="true" />\r
+       <property name="build.netcf-3.5.skip" value="true" />\r
+       <property name="build.mono-2.0.skip" value="true" />\r
+       <!-- Possibly supported (cf. http://stackoverflow.com/questions/10138267/ibm-mqs-net-xms-and-mono) but not tested -->\r
+       <property name="build.mono-4.0.skip" value="true" />\r
+       <!-- Possibly supported (cf. http://stackoverflow.com/questions/10138267/ibm-mqs-net-xms-and-mono) but not tested -->\r
+       <property name="build.net-2.0.skip" value="true" />\r
+       <!-- Possibly supported but not tested -->\r
+       <property name="build.net-3.5.skip" value="true" />\r
+       <!-- Possibly supported but not tested -->\r
+       <target name="vendor-init" description="Initializes Vendor library from local repository.">\r
+               <!--\r
+                  Vendor specific info.  The prefix of 'vendor.apache.org' is taken from the property\r
+                  'vendor.fileset.names'.  This comma-delimited list is iterated, and properties with\r
+                  well-known suffixes are used to access and copy down vendor file dependencies.\r
+               -->\r
+               <property name="vendor.fileset.names" value="vendor.apache.org,vendor.nunit.org,vendor.ibm.org" />\r
+               <!-- Property grouping for 'vendor.apache.org' -->\r
+               <property name="vendor.apache.org.name" value="Apache.NMS" />\r
+               <property name="vendor.apache.org.group" value="org.apache.activemq" />\r
+               <property name="vendor.apache.org.version" value="1.8.0" />\r
+               <property name="vendor.apache.org.filenames" value="Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb" />\r
+               <!-- Property grouping for 'vendor.nunit.org' -->\r
+               <property name="vendor.nunit.org.name" value="NUnit" />\r
+               <property name="vendor.nunit.org.group" value="org.nunit" />\r
+               <property name="vendor.nunit.org.version" value="2.5.8" />\r
+               <property name="vendor.nunit.org.filenames" value="nunit.framework.dll" />\r
+               <!-- Property grouping for 'vendor.ibm.org' -->\r
+               <property name="vendor.ibm.org.name" value="IBM.XMS" />\r
+               <property name="vendor.ibm.org.group" value="org.ibm.xms" />\r
+               <property name="vendor.ibm.org.version" value="8.0.0" />\r
+               <property name="vendor.ibm.org.filenames" value="IBM.XMS.dll,IBM.XMS.Impl.dll,IBM.XMS.Core.dll,IBM.XMS.Util.dll,IBM.XMS.NLS.dll,IBM.XMS.Provider.dll,IBM.XMS.Client.Impl.dll,IBM.XMS.Client.WMQ.dll,IBM.XMS.Admin.dll,IBM.XMS.Admin.Objects.dll,IBM.XMS.Comms.dll,IBM.XMS.Comms.RMM.dll,IBM.XMS.Comms.SSL.dll,IBM.XMS.Formats.JMF.dll,IBM.XMS.Formats.MFP.dll,IBM.XMS.Match.dll,IBM.XMS.SIB.dll,IBM.XMS.WCF.dll,IBM.XMS.WCF.NLS.dll,IBM.XMS.WMQI.dll" />\r
+       </target>\r
+       <target name="dependency-init" description="Initializes build dependencies">\r
+               <assemblyfileset failonempty="true" id="dependencies">\r
+                       <include name="${current.build.framework.assembly.dir}/mscorlib.dll" />\r
+                       <include name="${current.build.framework.assembly.dir}/System.dll" />\r
+                       <include name="${current.build.framework.assembly.dir}/System.Xml.dll" />\r
+                       <include name="${IBM.XMS.dll}" />\r
+                       <include name="${IBM.XMS.Impl.dll}" />\r
+                       <include name="${IBM.XMS.Core.dll}" />\r
+                       <include name="${IBM.XMS.Util.dll}" />\r
+                       <include name="${IBM.XMS.NLS.dll}" />\r
+                       <include name="${IBM.XMS.Provider.dll}" />\r
+                       <include name="${IBM.XMS.Client.Impl.dll}" />\r
+                       <include name="${IBM.XMS.Client.WMQ.dll}" />\r
+                       <include name="${IBM.XMS.Admin.dll}" />\r
+                       <include name="${IBM.XMS.Admin.Objects.dll}" />\r
+                       <include name="${IBM.XMS.Comms.dll}" />\r
+                       <include name="${IBM.XMS.Comms.RMM.dll}" />\r
+                       <include name="${IBM.XMS.Comms.SSL.dll}" />\r
+                       <include name="${IBM.XMS.Formats.JMF.dll}" />\r
+                       <include name="${IBM.XMS.Formats.MFP.dll}" />\r
+                       <include name="${IBM.XMS.Match.dll}" />\r
+                       <include name="${IBM.XMS.SIB.dll}" />\r
+                       <include name="${IBM.XMS.WCF.dll}" />\r
+                       <include name="${IBM.XMS.WCF.NLS.dll}" />\r
+                       <include name="${IBM.XMS.WMQI.dll}" />\r
+                       <include name="${Apache.NMS.dll}" />\r
+               </assemblyfileset>\r
+               <assemblyfileset failonempty="true" id="test.dependencies">\r
+                       <include name="${current.build.framework.assembly.dir}/mscorlib.dll" />\r
+                       <include name="${current.build.framework.assembly.dir}/System.dll" />\r
+                       <include name="${current.build.framework.assembly.dir}/System.Xml.dll" />\r
+                       <include name="${IBM.XMS.dll}" />\r
+                       <include name="${IBM.XMS.Impl.dll}" />\r
+                       <include name="${IBM.XMS.Core.dll}" />\r
+                       <include name="${IBM.XMS.Util.dll}" />\r
+                       <include name="${IBM.XMS.NLS.dll}" />\r
+                       <include name="${IBM.XMS.Provider.dll}" />\r
+                       <include name="${IBM.XMS.Client.Impl.dll}" />\r
+                       <include name="${IBM.XMS.Client.WMQ.dll}" />\r
+                       <include name="${IBM.XMS.Admin.dll}" />\r
+                       <include name="${IBM.XMS.Admin.Objects.dll}" />\r
+                       <include name="${IBM.XMS.Comms.dll}" />\r
+                       <include name="${IBM.XMS.Comms.RMM.dll}" />\r
+                       <include name="${IBM.XMS.Comms.SSL.dll}" />\r
+                       <include name="${IBM.XMS.Formats.JMF.dll}" />\r
+                       <include name="${IBM.XMS.Formats.MFP.dll}" />\r
+                       <include name="${IBM.XMS.Match.dll}" />\r
+                       <include name="${IBM.XMS.SIB.dll}" />\r
+                       <include name="${IBM.XMS.WCF.dll}" />\r
+                       <include name="${IBM.XMS.WCF.NLS.dll}" />\r
+                       <include name="${IBM.XMS.WMQI.dll}" />\r
+                       <include name="${Apache.NMS.dll}" />\r
+                       <!--<include name="${Apache.NMS.Test.dll}" />-->\r
+                       <include name="${build.bin.dir}/${project.name}.dll" />\r
+                       <include name="${nunit.dll}" />\r
+               </assemblyfileset>\r
+               <fileset id="content.filenames">\r
+                       <include name="LICENSE.txt" />\r
+                       <include name="NOTICE.txt" />\r
+                       <include name="nmsprovider-*.config" />\r
+                       <include name="${IBM.XMS.dll}" />\r
+                       <include name="${IBM.XMS.Impl.dll}" />\r
+                       <include name="${IBM.XMS.Core.dll}" />\r
+                       <include name="${IBM.XMS.Util.dll}" />\r
+                       <include name="${IBM.XMS.NLS.dll}" />\r
+                       <include name="${IBM.XMS.Provider.dll}" />\r
+                       <include name="${IBM.XMS.Client.Impl.dll}" />\r
+                       <include name="${IBM.XMS.Client.WMQ.dll}" />\r
+                       <include name="${IBM.XMS.Admin.dll}" />\r
+                       <include name="${IBM.XMS.Admin.Objects.dll}" />\r
+                       <include name="${IBM.XMS.Comms.dll}" />\r
+                       <include name="${IBM.XMS.Comms.RMM.dll}" />\r
+                       <include name="${IBM.XMS.Comms.SSL.dll}" />\r
+                       <include name="${IBM.XMS.Formats.JMF.dll}" />\r
+                       <include name="${IBM.XMS.Formats.MFP.dll}" />\r
+                       <include name="${IBM.XMS.Match.dll}" />\r
+                       <include name="${IBM.XMS.SIB.dll}" />\r
+                       <include name="${IBM.XMS.WCF.dll}" />\r
+                       <include name="${IBM.XMS.WCF.NLS.dll}" />\r
+                       <include name="${IBM.XMS.WMQI.dll}" />\r
+                       <include name="${Apache.NMS.dll}" />\r
+                       <include name="${Apache.NMS.pdb}" />\r
+                       <!--<include name="${Apache.NMS.Test.dll}" />-->\r
+                       <!--<include name="${Apache.NMS.Test.pdb}" />-->\r
+                       <include name="${nunit.dll}" />\r
+                       <include name="${NUnit.Projectfile}" />\r
+               </fileset>\r
+               <fileset id="install.filenames">\r
+                       <include name="LICENSE.txt" />\r
+                       <include name="NOTICE.txt" />\r
+                       <include name="${build.bin.dir}/${project.name}.dll" />\r
+                       <include name="${build.bin.dir}/${project.name}.pdb" />\r
+               </fileset>\r
+       </target>\r
+       <target name="default" depends="install-all" />\r
+       <!-- Load the common target definitions  -->\r
+       <include buildfile="${basedir}/nant-common.xml" />\r
+</project>\r
diff --git a/package.ps1 b/package.ps1
new file mode 100644 (file)
index 0000000..6fbb79b
--- /dev/null
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more\r
+# contributor license agreements.  See the NOTICE file distributed with\r
+# this work for additional information regarding copyright ownership.\r
+# The ASF licenses this file to You under the Apache License, Version 2.0\r
+# (the "License"); you may not use this file except in compliance with\r
+# the License.  You may obtain a copy of the License at\r
+#\r
+#     http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+$pkgname = "Apache.NMS.XMS"\r
+$pkgver = "1.8-SNAPSHOT"\r
+$configurations = "release", "debug"\r
+$frameworks = "net-4.0"\r
+\r
+write-progress "Creating package directory." "Initializing..."\r
+if(!(test-path package))\r
+{\r
+       md package\r
+}\r
+\r
+if(test-path build)\r
+{\r
+       pushd build\r
+\r
+       $pkgdir = "..\package"\r
+\r
+       write-progress "Packaging Application files." "Scanning..."\r
+       $zipfile = "$pkgdir\$pkgname-$pkgver-bin.zip"\r
+       zip -9 -u -j "$zipfile" ..\LICENSE.txt\r
+       zip -9 -u -j "$zipfile" ..\NOTICE.txt\r
+       foreach($configuration in $configurations)\r
+       {\r
+               foreach($framework in $frameworks)\r
+               {\r
+                       zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll"\r
+                       zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.xml"\r
+                       zip -9 -u "$zipfile" "$framework\$configuration\xmsprovider*.config"\r
+                       zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll"\r
+                       zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.xml"\r
+                       zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb"\r
+                       zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb"\r
+               }\r
+       }\r
+\r
+       popd\r
+}\r
+\r
+write-progress "Packaging Source code files." "Scanning..."\r
+$pkgdir = "package"\r
+$zipfile = "$pkgdir\$pkgname-$pkgver-src.zip"\r
+\r
+zip -9 -u "$zipfile" LICENSE.txt NOTICE.txt nant-common.xml nant.build package.ps1 vs2013-xms-test.csproj vs2013-xms.csproj vs2013-xms.sln\r
+zip -9 -u -r "$zipfile" keyfile src\r
+\r
+write-progress -Completed "Packaging" "Complete."\r
diff --git a/src/main/csharp/BytesMessage.cs b/src/main/csharp/BytesMessage.cs
new file mode 100644 (file)
index 0000000..bddfb0f
--- /dev/null
@@ -0,0 +1,187 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements.  See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License.  You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+using System;\r
+using Apache.NMS;\r
+using Apache.NMS.Util;\r
+using Apache.NMS.XMS.Util;\r
+using IBM.XMS;\r
+\r
+namespace Apache.NMS.XMS\r
+{\r
+       class BytesMessage : Apache.NMS.XMS.Message, Apache.NMS.IBytesMessage\r
+       {\r
+               public IBM.XMS.IBytesMessage xmsBytesMessage\r
+               {\r
+                       get { return (IBM.XMS.IBytesMessage)this.xmsMessage; }\r
+                       set { this.xmsMessage = value; }\r
+               }\r
+\r
+               public BytesMessage(IBM.XMS.IBytesMessage message)\r
+                       : base(message)\r
+               {\r
+               }\r
+\r
+               #region IBytesMessage Members\r
+\r
+               public byte[] Content\r
+               {\r
+                       get\r
+                       {\r
+                               int contentLength = (int) this.xmsBytesMessage.BodyLength;\r
+                               byte[] msgContent = new byte[contentLength];\r
+\r
+                               this.xmsBytesMessage.Reset();\r
+                               this.xmsBytesMessage.ReadBytes(msgContent, contentLength);\r
+                               return msgContent;\r
+                       }\r
+\r
+                       set\r
+                       {\r
+                               this.ReadOnlyBody = false;\r
+                               this.xmsBytesMessage.ClearBody();\r
+                               this.xmsBytesMessage.WriteBytes(value, 0, value.Length);\r
+                       }\r
+               }\r
+\r
+               public long BodyLength\r
+               {\r
+                       get { return this.xmsBytesMessage.BodyLength; }\r
+               }\r
+\r
+               public bool ReadBoolean()\r
+               {\r
+                       return this.xmsBytesMessage.ReadBoolean();\r
+               }\r
+\r
+               public byte ReadByte()\r
+               {\r
+                       return (byte) this.xmsBytesMessage.ReadByte();\r
+               }\r
+\r
+               public int ReadBytes(byte[] value, int length)\r
+               {\r
+                       return this.xmsBytesMessage.ReadBytes(value, length);\r
+               }\r
+\r
+               public int ReadBytes(byte[] value)\r
+               {\r
+                       return this.xmsBytesMessage.ReadBytes(value);\r
+               }\r
+\r
+               public char ReadChar()\r
+               {\r
+                       return this.xmsBytesMessage.ReadChar();\r
+               }\r
+\r
+               public double ReadDouble()\r
+               {\r
+                       return this.xmsBytesMessage.ReadDouble();\r
+               }\r
+\r
+               public short ReadInt16()\r
+               {\r
+                       return this.xmsBytesMessage.ReadShort();\r
+               }\r
+\r
+               public int ReadInt32()\r
+               {\r
+                       return this.xmsBytesMessage.ReadInt();\r
+               }\r
+\r
+               public long ReadInt64()\r
+               {\r
+                       return this.xmsBytesMessage.ReadLong();\r
+               }\r
+\r
+               public float ReadSingle()\r
+               {\r
+                       return this.xmsBytesMessage.ReadFloat();\r
+               }\r
+\r
+               public string ReadString()\r
+               {\r
+                       return this.xmsBytesMessage.ReadUTF();\r
+               }\r
+\r
+               public void Reset()\r
+               {\r
+                       this.xmsBytesMessage.Reset();\r
+               }\r
+\r
+               public void WriteBoolean(bool value)\r
+               {\r
+                       this.xmsBytesMessage.WriteBoolean(value);\r
+               }\r
+\r
+               public void WriteByte(byte value)\r
+               {\r
+                       this.xmsBytesMessage.WriteByte(value);\r
+               }\r
+\r
+               public void WriteBytes(byte[] value, int offset, int length)\r
+               {\r
+                       this.xmsBytesMessage.WriteBytes(value, offset, length);\r
+               }\r
+\r
+               public void WriteBytes(byte[] value)\r
+               {\r
+                       this.xmsBytesMessage.WriteBytes(value);\r
+               }\r
+\r
+               public void WriteChar(char value)\r
+               {\r
+                       this.xmsBytesMessage.WriteChar(value);\r
+               }\r
+\r
+               public void WriteDouble(double value)\r
+               {\r
+                       this.xmsBytesMessage.WriteDouble(value);\r
+               }\r
+\r
+               public void WriteInt16(short value)\r
+               {\r
+                       this.xmsBytesMessage.WriteShort(value);\r
+               }\r
+\r
+               public void WriteInt32(int value)\r
+               {\r
+                       this.xmsBytesMessage.WriteInt(value);\r
+               }\r
+\r
+               public void WriteInt64(long value)\r
+               {\r
+                       this.xmsBytesMessage.WriteLong(value);\r
+               }\r
+\r
+               public void WriteObject(object value)\r
+               {\r
+                       this.xmsBytesMessage.WriteObject(value);\r
+               }\r
+\r
+               public void WriteSingle(float value)\r
+               {\r
+                       this.xmsBytesMessage.WriteFloat(value);\r
+               }\r
+\r
+               public void WriteString(string value)\r
+               {\r
+                       this.xmsBytesMessage.WriteUTF(value);\r
+               }\r
+\r
+               #endregion\r
+       }\r
+}\r
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
new file mode 100644 (file)
index 0000000..07ba2fd
--- /dev/null
@@ -0,0 +1,461 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements.  See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License.  You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+using System;\r
+using Apache.NMS;\r
+using Apache.NMS.Util;\r
+using Apache.NMS.XMS.Util;\r
+using IBM.XMS;\r
+\r
+namespace Apache.NMS.XMS\r
+{\r
+       /// <summary>\r
+       /// Represents an NMS connection to IBM MQ.\r
+       /// </summary>\r
+       ///\r
+       public class Connection : Apache.NMS.IConnection\r
+       {\r
+               private Apache.NMS.AcknowledgementMode acknowledgementMode;\r
+               public readonly IBM.XMS.IConnection xmsConnection;\r
+               private IRedeliveryPolicy redeliveryPolicy;\r
+               private ConnectionMetaData metaData = null;\r
+               private readonly Atomic<bool> started = new Atomic<bool>(false);\r
+               private bool closed = false;\r
+               private bool disposed = false;\r
+               \r
+               #region Constructors\r
+               \r
+               /// <summary>\r
+               /// Constructs a connection object.\r
+               /// </summary>\r
+               public Connection(IBM.XMS.IConnection xmsConnection)\r
+               {\r
+                       this.xmsConnection = xmsConnection;\r
+                       this.xmsConnection.ExceptionListener = this.HandleXmsException;\r
+               }\r
+               \r
+               /// <summary>\r
+               /// "Destructs" or "finalizes" a connection object.\r
+               /// </summary>\r
+               ~Connection()\r
+               {\r
+                       Dispose(false);\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #region IStartable Members\r
+               \r
+               /// <summary>\r
+               /// Starts message delivery for this connection.\r
+               /// </summary>\r
+               public void Start()\r
+               {\r
+                       if(started.CompareAndSet(false, true))\r
+                       {\r
+                               try\r
+                               {\r
+                                       this.xmsConnection.Start();\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               public bool IsStarted\r
+               {\r
+                       get { return this.started.Value; }\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #region IStoppable Members\r
+               \r
+               /// <summary>\r
+               /// Stop message delivery for this connection.\r
+               /// </summary>\r
+               public void Stop()\r
+               {\r
+                       try\r
+                       {\r
+                               if(started.CompareAndSet(true, false))\r
+                               {\r
+                                       this.xmsConnection.Stop();\r
+                               }\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                       }\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #region IConnection Members\r
+               \r
+               /// <summary>\r
+               /// Creates a new session to work on this connection\r
+               /// </summary>\r
+               public Apache.NMS.ISession CreateSession()\r
+               {\r
+                       return CreateSession(acknowledgementMode);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Creates a new session to work on this connection\r
+               /// </summary>\r
+               public Apache.NMS.ISession CreateSession(\r
+                       Apache.NMS.AcknowledgementMode mode)\r
+               {\r
+                       try\r
+                       {\r
+                               bool isTransacted =\r
+                                       (mode == Apache.NMS.AcknowledgementMode.Transactional);\r
+                               return XMSConvert.ToNMSSession(\r
+                                       this.xmsConnection.CreateSession(\r
+                                               isTransacted, XMSConvert.ToAcknowledgeMode(mode)));\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               return null;\r
+                       }\r
+               }\r
+               \r
+               public void Close()\r
+               {\r
+                       lock(this)\r
+                       {\r
+                               if(closed)\r
+                               {\r
+                                       return;\r
+                               }\r
+               \r
+                               try\r
+                               {\r
+                                       this.xmsConnection.ExceptionListener = null;\r
+                                       this.xmsConnection.Stop();\r
+                                       this.xmsConnection.Close();\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               }\r
+                               finally\r
+                               {\r
+                                       closed = true;\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               public void PurgeTempDestinations()\r
+               {\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #region IDisposable Members\r
+               \r
+               public void Dispose()\r
+               {\r
+                       Dispose(true);\r
+                       GC.SuppressFinalize(this);\r
+               }\r
+               \r
+               protected void Dispose(bool disposing)\r
+               {\r
+                       if(disposed)\r
+                       {\r
+                               return;\r
+                       }\r
+               \r
+                       if(disposing)\r
+                       {\r
+                               // Dispose managed code here.\r
+                       }\r
+               \r
+                       try\r
+                       {\r
+                               Close();\r
+                       }\r
+                       catch\r
+                       {\r
+                               // Ignore errors.\r
+                       }\r
+               \r
+                       disposed = true;\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #region Attributes\r
+               \r
+               /// <summary>\r
+               /// The default timeout for network requests.\r
+               /// </summary>\r
+               public TimeSpan RequestTimeout\r
+               {\r
+                       get { return Apache.NMS.NMSConstants.defaultRequestTimeout; }\r
+                       set { }\r
+               }\r
+               \r
+               public Apache.NMS.AcknowledgementMode AcknowledgementMode\r
+               {\r
+                       get { return acknowledgementMode; }\r
+                       set { acknowledgementMode = value; }\r
+               }\r
+               \r
+               public string ClientId\r
+               {\r
+                       get\r
+                       {\r
+                               try\r
+                               {\r
+                                       return this.xmsConnection.ClientID;\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                                       return null;\r
+                               }\r
+                       }\r
+                       set\r
+                       {\r
+                               try\r
+                               {\r
+                                       this.xmsConnection.ClientID = value;\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Get/or set the redelivery policy for this connection.\r
+               /// </summary>\r
+               public IRedeliveryPolicy RedeliveryPolicy\r
+               {\r
+                       get { return this.redeliveryPolicy; }\r
+                       set { this.redeliveryPolicy = value; }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Gets the Meta Data for the NMS Connection instance.\r
+               /// </summary>\r
+               public IConnectionMetaData MetaData\r
+               {\r
+                       get { return this.metaData ?? (this.metaData = new ConnectionMetaData()); }\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #region Properties\r
+               \r
+               // http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.msc.doc/props_conn.htm?lang=en\r
+               \r
+               #region Common properties\r
+               \r
+               /// <summary>\r
+               /// This property is used to obtain the name of the queue manager\r
+               /// to which it is connected.\r
+               /// </summary>\r
+               public string ResolvedQueueManagerName\r
+               {\r
+                       get { return this.xmsConnection.GetStringProperty(XMSC.WMQ_RESOLVED_QUEUE_MANAGER); }\r
+                       set { this.xmsConnection.SetStringProperty(XMSC.WMQ_RESOLVED_QUEUE_MANAGER, value); }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// This property is populated with the ID of the queue manager\r
+               /// after the connection.\r
+               /// </summary>\r
+               public string ResolvedQueueManagerId\r
+               {\r
+                       get { return this.xmsConnection.GetStringProperty(XMSC.WMQ_RESOLVED_QUEUE_MANAGER_ID); }\r
+                       set { this.xmsConnection.SetStringProperty(XMSC.WMQ_RESOLVED_QUEUE_MANAGER_ID, value); }\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #region WPM-specific properties\r
+               \r
+               /// <summary>\r
+               /// The communications protocol used for the connection to the\r
+               /// messaging engine. This property is read-only.\r
+               /// </summary>\r
+               public Int32 XMSConnectionProtocol\r
+               {\r
+                       get { return this.xmsConnection.GetIntProperty(XMSC.WPM_CONNECTION_PROTOCOL); }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// The communications protocol used for the connection to the\r
+               /// messaging engine. This property is read-only.\r
+               /// </summary>\r
+               public WPMConnectionProtocol ConnectionProtocol\r
+               {\r
+                       get { return XMSConvert.ToWPMConnectionProtocol(this.XMSConnectionProtocol); }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// The host name or IP address of the system that contains the\r
+               /// messaging engine to which the application is connected. This\r
+               /// property is read-only.\r
+               /// </summary>\r
+               public string HostName\r
+               {\r
+                       get { return this.xmsConnection.GetStringProperty(XMSC.WPM_HOST_NAME); }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// The name of the messaging engine to which the application is\r
+               /// connected. This property is read-only.\r
+               /// </summary>\r
+               public string MessagingEngineName\r
+               {\r
+                       get { return this.xmsConnection.GetStringProperty(XMSC.WPM_ME_NAME); }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// The number of the port listened on by the messaging engine to\r
+               /// which the application is connected. This property is read-only.\r
+               /// </summary>\r
+               public Int32 Port\r
+               {\r
+                       get { return this.xmsConnection.GetIntProperty(XMSC.WPM_PORT); }\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               #endregion\r
+               \r
+               #region Event Listeners, Handlers and Delegates\r
+               \r
+               /// <summary>\r
+               /// A delegate that can receive transport level exceptions.\r
+               /// </summary>\r
+               public event ExceptionListener ExceptionListener;\r
+               \r
+               /// <summary>\r
+               /// Handles XMS connection exceptions.\r
+               /// </summary>\r
+               private void HandleXmsException(Exception exception)\r
+               {\r
+                       if(ExceptionListener != null)\r
+                       {\r
+                               // Return codes MQRC_RECONNECTING and MQRC_RECONNECTED\r
+                               // are not defined in XMS.\r
+                               // const int MQRC_RECONNECTING = 2544;\r
+                               // const int MQRC_RECONNECTED = 2545;\r
+                               // According to http://www-01.ibm.com/support/knowledgecenter/#!/SSFKSJ_8.0.0/com.ibm.mq.con.doc/q017800_.htm\r
+                               // Except for JMS and XMS clients, if a client application has\r
+                               // access to reconnection options, it can also create an event\r
+                               // handler to handle reconnection events.\r
+                               ExceptionListener(exception);\r
+                       }\r
+                       else\r
+                       {\r
+                               Apache.NMS.Tracer.Error(exception);\r
+                       }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// An asynchronous listener that is notified when a fault tolerant\r
+               /// connection has been interrupted.\r
+               /// </summary>\r
+               /// <remarks>\r
+               /// IBM XMS does not handle disconnection / reconnection notifications.\r
+               /// This delegate will never be called.\r
+               /// </remarks>\r
+               public event ConnectionInterruptedListener ConnectionInterruptedListener;\r
+               \r
+               private void HandleTransportInterrupted()\r
+               {\r
+                       Tracer.Debug("Transport has been interrupted.");\r
+               \r
+                       if(this.ConnectionInterruptedListener != null && !this.closed)\r
+                       {\r
+                               try\r
+                               {\r
+                                       this.ConnectionInterruptedListener();\r
+                               }\r
+                               catch\r
+                               {\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// An asynchronous listener that is notified when a fault tolerant\r
+               /// connection has been resumed.\r
+               /// </summary>\r
+               /// <remarks>\r
+               /// IBM XMS does not handle disconnection / reconnection notifications.\r
+               /// This delegate will never be called.\r
+               /// </remarks>\r
+               public event ConnectionResumedListener ConnectionResumedListener;\r
+               \r
+               private void HandleTransportResumed()\r
+               {\r
+                       Tracer.Debug("Transport has resumed normal operation.");\r
+               \r
+                       if(this.ConnectionResumedListener != null && !this.closed)\r
+                       {\r
+                               try\r
+                               {\r
+                                       this.ConnectionResumedListener();\r
+                               }\r
+                               catch\r
+                               {\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               private ConsumerTransformerDelegate consumerTransformer;\r
+               /// <summary>\r
+               /// A Delegate that is called each time a Message is dispatched to allow the client to do\r
+               /// any necessary transformations on the received message before it is delivered.  The\r
+               /// ConnectionFactory sets the provided delegate instance on each Connection instance that\r
+               /// is created from this factory, each connection in turn passes the delegate along to each\r
+               /// Session it creates which then passes that along to the Consumers it creates.\r
+               /// </summary>\r
+               public ConsumerTransformerDelegate ConsumerTransformer\r
+               {\r
+                       get { return this.consumerTransformer; }\r
+                       set { this.consumerTransformer = value; }\r
+               }\r
+               \r
+               private ProducerTransformerDelegate producerTransformer;\r
+               /// <summary>\r
+               /// A delegate that is called each time a Message is sent from this Producer which allows\r
+               /// the application to perform any needed transformations on the Message before it is sent.\r
+               /// The ConnectionFactory sets the provided delegate instance on each Connection instance that\r
+               /// is created from this factory, each connection in turn passes the delegate along to each\r
+               /// Session it creates which then passes that along to the Producers it creates.\r
+               /// </summary>\r
+               public ProducerTransformerDelegate ProducerTransformer\r
+               {\r
+                       get { return this.producerTransformer; }\r
+                       set { this.producerTransformer = value; }\r
+               }\r
+               \r
+               #endregion\r
+       }\r
+}\r
diff --git a/src/main/csharp/ConnectionFactory.cs b/src/main/csharp/ConnectionFactory.cs
new file mode 100644 (file)
index 0000000..35863bb
--- /dev/null
@@ -0,0 +1,1502 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements.  See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License.  You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+using System;\r
+using System.Collections;\r
+using System.Collections.Specialized;\r
+using Apache.NMS.XMS.Util;\r
+using Apache.NMS.Policies;\r
+using Apache.NMS.Util;\r
+using IBM.XMS;\r
+\r
+namespace Apache.NMS.XMS\r
+{\r
+       /// <summary>\r
+       /// A Factory that can establish NMS connections to IBM MQ.\r
+       /// </summary>\r
+       /// <remarks>\r
+       /// XMS connection factories can either be created from definitions\r
+       /// administered in a repository ("administered object"), or created\r
+       /// from an <c>XMSFactoryFactory</c>.\r
+       ///\r
+       /// Addressable repositories for administered objects are:\r
+       /// - file system context\r
+       ///   (URL format: "file://Path").\r
+       /// - LDAP context\r
+       ///   (URL format: "ldap:[Hostname][:Port]["/"[DistinguishedName]]").\r
+       /// - WSS context:\r
+       ///   (URL format: "http://Url", "cosnaming://Url" or "wsvc://Url").\r
+       ///\r
+       /// A non-administered object is instanciated for a specific protocol:\r
+       /// - WebSphere Application Server Service Integration Bus\r
+       ///   (protocol prefix: <c>"wpm:"</c>; XMS key: <c>XMSC.CT_WPM</c>).\r
+       /// - IBM Integration Bus using WebSphere MQ Real-Time Transport\r
+       ///   (protocol prefix: <c>"rtt:"</c>; XMS key: <c>XMSC.CT_RTT</c>).\r
+       /// - WebSphere MQ queue manager\r
+       ///   (protocol prefix: <c>"wmq:"</c>; XMS key: <c>XMSC.CT_WMQ</c>).\r
+       /// </remarks>\r
+       public class ConnectionFactory : Apache.NMS.IConnectionFactory\r
+       {\r
+               public IBM.XMS.IConnectionFactory xmsConnectionFactory = null;\r
+\r
+               private Uri brokerUri = null;\r
+               private IRedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();\r
+\r
+               #region Constructors\r
+\r
+               /// <summary>\r
+               /// Constructs a <c>ConnectionFactory</c> object using default values.\r
+               /// </summary>\r
+               public ConnectionFactory()\r
+                       : this(new Uri("xms:wmq:"))\r
+               {\r
+               }\r
+\r
+               /// <summary>\r
+               /// Constructs a <c>ConnectionFactory</c> object.\r
+               /// </summary>\r
+               /// <param name="brokerUri">Factory URI.</param>\r
+               public ConnectionFactory(Uri brokerUri)\r
+               {\r
+                       try\r
+                       {\r
+                               // BrokerUri will construct the xmsConnectionFactory\r
+                               this.BrokerUri = brokerUri;\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               Apache.NMS.Tracer.DebugFormat(\r
+                                       "Exception instantiating IBM.XMS.ConnectionFactory: {0}",\r
+                                       ex.Message);\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                       }\r
+                       // In case WrapAndThrowNMSException masks the exception\r
+                       if(this.xmsConnectionFactory == null)\r
+                       {\r
+                               throw new Apache.NMS.NMSException(\r
+                                       "Error instantiating XMS connection factory object.");\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Constructs the internal <c>ConnectionFactory</c> object from the\r
+               /// parameters specified in the input URI.\r
+               /// </summary>\r
+               /// <param name="factoryUri">Factory URI.</param>\r
+               /// <returns>URI stripped out from overridable property values.\r
+               /// </returns>\r
+               private Uri CreateConnectionFactoryFromURI(Uri factoryUri)\r
+               {\r
+                       try\r
+                       {\r
+                               // Remove "xms:" scheme prefix\r
+                               string originalString = factoryUri.OriginalString;\r
+                               factoryUri = new Uri(originalString.Substring(\r
+                                       originalString.IndexOf(":") + 1));\r
+\r
+                               // Parse URI properties\r
+                               StringDictionary properties = URISupport.ParseQuery(\r
+                                       factoryUri.Query);\r
+\r
+                               // The URI scheme specifies either the repository of\r
+                               // administered objects where the ConnectionFactory object\r
+                               // is defined, or the target connection type for\r
+                               // non-administered objects.\r
+                               switch(factoryUri.Scheme.ToLower())\r
+                               {\r
+                               case "rtt":\r
+                               case "wmq":\r
+                               case "wpm":\r
+                                       CreateNonAdministeredConnectionFactory(\r
+                                               factoryUri, properties);\r
+                                       break;\r
+                               case "http":\r
+                               case "ldap":\r
+                               case "cosnaming":\r
+                               case "wsvc":\r
+                               default:\r
+                                       CreateAdministeredConnectionFactory(\r
+                                               factoryUri, properties);\r
+                                       break;\r
+                               }\r
+\r
+                               // Configure the instanciated connection factory\r
+                               ConfigureConnectionFactory(factoryUri, properties);\r
+\r
+                               return new Uri("xms:" + factoryUri.Scheme);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               return null;\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Creates a connection factory from the object definition retrieved\r
+               /// from a repository of administered objects.\r
+               /// </summary>\r
+               /// <param name="factoryUri">Factory URI.</param>\r
+               /// <param name="properties">URI properties.</param>\r
+               private void CreateAdministeredConnectionFactory(\r
+                       Uri factoryUri, StringDictionary properties)\r
+               {\r
+                       // The initial context URL is the non-query part of the factory URI\r
+                       string icUrl = factoryUri.OriginalString.Substring(0,\r
+                               factoryUri.OriginalString.IndexOf('?'));\r
+\r
+                       // Extract other InitialContext property values from URI\r
+                       string icPrefix = "ic.";\r
+                       StringDictionary icProperties = URISupport.ExtractProperties(\r
+                               properties, icPrefix);\r
+\r
+                       // Initialize environment Hashtable\r
+                       Hashtable environment = new Hashtable();\r
+                       environment[XMSC.IC_URL] = icUrl;\r
+                       foreach(DictionaryEntry de in icProperties)\r
+                       {\r
+                               string key = ((string)de.Key).Substring(icPrefix.Length);\r
+                               //TODO: convert "environment." attribute types.\r
+                               environment[key] = de.Value;\r
+                       }\r
+\r
+                       // Create an InitialContext\r
+                       InitialContext ic = new InitialContext(environment);\r
+\r
+                       // Extract administered object name\r
+                       string objectNameKey = "object.Name";\r
+                       if(!properties.ContainsKey(objectNameKey))\r
+                       {\r
+                               throw new NMSException(string.Format(\r
+                                       "URI attribute {0} must be specified.", objectNameKey));\r
+                       }\r
+            string objectName = properties[objectNameKey];\r
+                       properties.Remove(objectNameKey);\r
+\r
+                       // Lookup for object\r
+                       this.xmsConnectionFactory =\r
+                               (IBM.XMS.IConnectionFactory)ic.Lookup(objectName);\r
+               }\r
+\r
+               /// <summary>\r
+               /// Creates a non-administered connection factory.\r
+               /// </summary>\r
+               /// <param name="factoryUri">Factory URI.</param>\r
+               /// <param name="properties">URI properties.</param>\r
+               private void CreateNonAdministeredConnectionFactory(\r
+                       Uri factoryUri, StringDictionary properties)\r
+               {\r
+                       // Get an XMS factory factory for the requested protocol\r
+                       IBM.XMS.XMSFactoryFactory xmsFactoryFactory = null;\r
+                       string scheme = factoryUri.Scheme.ToLower();\r
+                       switch(scheme)\r
+                       {\r
+                       case "rtt":\r
+                               xmsFactoryFactory =\r
+                                       IBM.XMS.XMSFactoryFactory.GetInstance(IBM.XMS.XMSC.CT_RTT);\r
+\r
+                               if(!string.IsNullOrEmpty(factoryUri.Host))\r
+                               {\r
+                                       this.RTTHostName = factoryUri.Host;\r
+                               }\r
+\r
+                               if(factoryUri.Port != -1)\r
+                               {\r
+                                       this.RTTPort = factoryUri.Port;\r
+                               }\r
+                               break;\r
+\r
+                       case "wmq":\r
+                               xmsFactoryFactory =\r
+                                       IBM.XMS.XMSFactoryFactory.GetInstance(IBM.XMS.XMSC.CT_WMQ);\r
+                               break;\r
+\r
+                       case "wpm":\r
+                               xmsFactoryFactory =\r
+                                       IBM.XMS.XMSFactoryFactory.GetInstance(IBM.XMS.XMSC.CT_WPM);\r
+                               break;\r
+                       }\r
+\r
+                       // Create the connection factory\r
+                       this.xmsConnectionFactory =\r
+                               xmsFactoryFactory.CreateConnectionFactory();\r
+\r
+                       // For RTT and WMQ protocols, set the host name and port if\r
+                       // they are specified\r
+                       switch(scheme)\r
+                       {\r
+                               case "rtt":\r
+                                       if(!string.IsNullOrEmpty(factoryUri.Host))\r
+                                       {\r
+                                               this.RTTHostName = factoryUri.Host;\r
+                                       }\r
+\r
+                                       if(factoryUri.Port != -1)\r
+                                       {\r
+                                               this.RTTPort = factoryUri.Port;\r
+                                       }\r
+                                       break;\r
+\r
+                               case "wmq":\r
+                                       if(!string.IsNullOrEmpty(factoryUri.Host))\r
+                                       {\r
+                                               this.WMQHostName = factoryUri.Host;\r
+                                       }\r
+\r
+                                       if(factoryUri.Port != -1)\r
+                                       {\r
+                                               this.WMQPort = factoryUri.Port;\r
+                                       }\r
+                                       break;\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Configures the connection factory.\r
+               /// </summary>\r
+               /// <param name="factoryUri">Factory URI.</param>\r
+               /// <param name="properties">URI properties.</param>\r
+               private void ConfigureConnectionFactory(\r
+                       Uri factoryUri, StringDictionary properties)\r
+               {\r
+                       if(properties != null && properties.Count > 0)\r
+                       {\r
+                               IntrospectionSupport.SetProperties(this, properties);\r
+                       }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region Redelivery Policy\r
+\r
+               /// <summary>\r
+               /// Get/or set the redelivery policy that new IConnection objects are\r
+               /// assigned upon creation.\r
+               /// </summary>\r
+               public IRedeliveryPolicy RedeliveryPolicy\r
+               {\r
+                       get { return this.redeliveryPolicy; }\r
+                       set\r
+                       {\r
+                               if(value != null)\r
+                               {\r
+                                       this.redeliveryPolicy = value;\r
+                               }\r
+                       }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region Properties (configure via URL parameters)\r
+\r
+               // http://www-01.ibm.com/support/knowledgecenter/?lang=en#!/SSFKSJ_8.0.0/com.ibm.mq.msc.doc/props_connf.htm\r
+\r
+               #region Connection Factory Properties common to all protocols\r
+\r
+               /// <summary>\r
+               /// The client identifier for a connection.\r
+               /// </summary>\r
+               [UriAttribute("factory.ClientId")]\r
+               public string ClientId\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.CLIENT_ID); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.CLIENT_ID, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The type of messaging server to which an application connects.\r
+               /// </summary>\r
+               [UriAttribute("factory.XMSConnectionType")]\r
+               public Int32 XMSConnectionType\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.CONNECTION_TYPE); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.CONNECTION_TYPE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The type of messaging server to which an application connects.\r
+               /// </summary>\r
+               [UriAttribute("factory.ConnectionType")]\r
+               public ConnectionType ConnectionType\r
+               {\r
+                       get { return XMSConvert.ToConnectionType(this.XMSConnectionType); }\r
+                       set { this.XMSConnectionType = XMSConvert.ToXMSConnectionType(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// A user identifier that can be used to authenticate the application\r
+               /// when it attempts to connect to a messaging server.\r
+               /// </summary>\r
+               [UriAttribute("factory.UserId")]\r
+               public string UserId\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.USERID); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.USERID, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// A password that can be used to authenticate the application when it\r
+               /// attempts to connect to a messaging server.\r
+               /// </summary>\r
+               [UriAttribute("factory.XMSPassword")]\r
+               public byte[] XMSPassword\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetBytesProperty(XMSC.PASSWORD); }\r
+                       set { this.xmsConnectionFactory.SetBytesProperty(XMSC.PASSWORD, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// A password that can be used to authenticate the application when it\r
+               /// attempts to connect to a messaging server, specified as a string.\r
+               /// </summary>\r
+               [UriAttribute("factory.Password")]\r
+               public string Password\r
+               {\r
+                       get { return Convert.ToBase64String(this.XMSPassword); }\r
+                       set { this.XMSPassword = Convert.FromBase64String(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether XMS informs an ExceptionListener\r
+               /// only when a connection is broken, or when any exception occurs\r
+               /// asynchronously to an XMS API call.\r
+               /// </summary>\r
+               /// <remarks>\r
+               /// This property applies to all Connections created from this\r
+               /// ConnectionFactory that have an ExceptionListener registered.\r
+               /// </remarks>\r
+               [UriAttribute("factory.XMSAsynchronousExceptions")]\r
+               public Int32 XMSAsynchronousExceptions\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.ASYNC_EXCEPTIONS); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.ASYNC_EXCEPTIONS, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether XMS informs an\r
+               /// <c>ExceptionListener</c> only when a connection is broken, or when\r
+               /// any exception occurs asynchronously to an XMS API call.\r
+               /// </summary>\r
+               [UriAttribute("factory.AsynchronousExceptions")]\r
+               public AsynchronousExceptions AsynchronousExceptions\r
+               {\r
+                       get { return XMSConvert.ToAsynchronousExceptions(this.XMSAsynchronousExceptions); }\r
+                       set { this.XMSAsynchronousExceptions = XMSConvert.ToXMSAsynchronousExceptions(value); }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region RTT-specific properties\r
+\r
+               /// <summary>\r
+               /// The communications protocol used for a real-time connection to a broker.\r
+               /// </summary>\r
+               [UriAttribute("rtt.XMSConnectionProtocol")]\r
+               public Int32 XMSConnectionProtocol\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.RTT_CONNECTION_PROTOCOL); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.RTT_CONNECTION_PROTOCOL, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The communications protocol used for a real-time connection to a broker.\r
+               /// </summary>\r
+               [UriAttribute("rtt.ConnectionProtocol")]\r
+               public RTTConnectionProtocol ConnectionProtocol\r
+               {\r
+                       get { return XMSConvert.ToRTTConnectionProtocol(this.XMSConnectionProtocol); }\r
+                       set { this.XMSConnectionProtocol = XMSConvert.ToXMSRTTConnectionProtocol(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The host name or IP address of the system on which a broker runs.\r
+               /// </summary>\r
+               [UriAttribute("rtt.HostName")]\r
+               public string RTTHostName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.RTT_HOST_NAME); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.RTT_HOST_NAME, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The number of the port on which a broker listens for incoming requests.\r
+               /// </summary>\r
+               [UriAttribute("rtt.Port")]\r
+               public Int32 RTTPort\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.RTT_PORT); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.RTT_PORT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The host name or IP address of the local network interface to be\r
+               /// used for a real-time connection to a broker.\r
+               /// </summary>\r
+               [UriAttribute("rtt.LocalAddress")]\r
+               public string RTTLocalAddress\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.RTT_LOCAL_ADDRESS); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.RTT_LOCAL_ADDRESS, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The multicast setting for the connection factory.\r
+               /// </summary>\r
+               [UriAttribute("rtt.XMSMulticast")]\r
+               public Int32 XMSMulticast\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.RTT_MULTICAST); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.RTT_MULTICAST, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The multicast setting for a connection factory or destination.\r
+               /// </summary>\r
+               [UriAttribute("rtt.Multicast")]\r
+               public Multicast Multicast\r
+               {\r
+                       get { return XMSConvert.ToMulticast(this.XMSMulticast); }\r
+                       set { this.XMSMulticast = XMSConvert.ToXMSMulticast(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The time interval, in milliseconds, after which XMS .NET checks the\r
+               /// connection to a Real Time messaging server to detect any activity.\r
+               /// </summary>\r
+               [UriAttribute("rtt.BrokerPingInterval")]\r
+               public Int32 BrokerPingInterval\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.RTT_BROKER_PING_INTERVAL); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.RTT_BROKER_PING_INTERVAL, value); }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region WMQ-specific properties\r
+\r
+               /// <summary>\r
+               /// The host name or IP address of the system on which a queue manager\r
+               /// runs.\r
+               /// </summary>\r
+               [UriAttribute("wmq.HostName")]\r
+               public string WMQHostName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_HOST_NAME); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The number of the port on which a queue manager listens for\r
+               /// incoming requests.\r
+               /// </summary>\r
+               [UriAttribute("wmq.Port")]\r
+               public Int32 WMQPort\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_PORT); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_PORT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// For a connection to a queue manager, this property specifies the\r
+               /// local network interface to be used, or the local port or range of\r
+               /// local ports to be used, or both.\r
+               /// </summary>\r
+               [UriAttribute("wmq.LocalAddress")]\r
+               public string WMQLocalAddress\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_LOCAL_ADDRESS); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_LOCAL_ADDRESS, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the queue manager to connect to.\r
+               /// </summary>\r
+               [UriAttribute("wmq.QueueManagerName")]\r
+               public string QueueManagerName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_QUEUE_MANAGER); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The version, release, modification level and fix pack of the queue\r
+               /// manager to which the application intends to connect.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ProviderVersion")]\r
+               public string ProviderVersion\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_PROVIDER_VERSION); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_PROVIDER_VERSION, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the channel to be used for a connection.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ChannelName")]\r
+               public string ChannelName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_CHANNEL); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// A Uniform Resource Locator (URL) that identifies the name and\r
+               /// location of the file that contains the client channel definition\r
+               /// table and also specifies how the file can be accessed.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ClientChannelDefinitionTableURL")]\r
+               public string ClientChannelDefinitionTableURL\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_CCDTURL); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_CCDTURL, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The mode by which an application connects to a queue manager.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSConnectionMode")]\r
+               public Int32 XMSConnectionMode\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_CONNECTION_MODE); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The mode by which an application connects to a queue manager,\r
+               /// specified as a string.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ConnectionMode")]\r
+               public ConnectionMode ConnectionMode\r
+               {\r
+                       get { return XMSConvert.ToConnectionMode(this.XMSConnectionMode); }\r
+                       set { this.XMSConnectionMode = XMSConvert.ToXMSConnectionMode(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property specifies the client reconnect options for new\r
+               /// connections created by this factory.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ClientReconnectOptions")]\r
+               public string ClientReconnectOptions\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_CLIENT_RECONNECT_OPTIONS); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_CLIENT_RECONNECT_OPTIONS, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property specifies the duration of time, in seconds, that a\r
+               /// client connection attempts to reconnect.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ClientReconnectTimeout")]\r
+               public string ClientReconnectTimeout\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_CLIENT_RECONNECT_TIMEOUT); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_CLIENT_RECONNECT_TIMEOUT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property specifies the hosts to which the client attempts to\r
+               /// reconnect to after its connection are broken.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ConnectionNameList")]\r
+               public string ConnectionNameList\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_CONNECTION_NAME_LIST); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_CONNECTION_NAME_LIST, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether calls to certain methods fail if the queue manager to which\r
+               /// the application is connected is in a quiescing state.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSFailIfQuiesce")]\r
+               public Int32 XMSFailIfQuiesce\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_FAIL_IF_QUIESCE); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_FAIL_IF_QUIESCE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether calls to certain methods fail if the queue manager to which\r
+               /// the application is connected is in a quiescing state.\r
+               /// </summary>\r
+               [UriAttribute("wmq.FailIfQuiesce")]\r
+               public bool FailIfQuiesce\r
+               {\r
+                       get { return XMSConvert.ToFailIfQuiesce(this.XMSFailIfQuiesce); }\r
+                       set { this.XMSFailIfQuiesce = XMSConvert.ToXMSFailIfQuiesce(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The type of broker used by the application for a connection or for\r
+               /// the destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSBrokerVersion")]\r
+               public Int32 XMSBrokerVersion\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_BROKER_VERSION); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_BROKER_VERSION, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The type of broker used by the application for a connection or for\r
+               /// the destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.BrokerVersion")]\r
+               public BrokerVersion BrokerVersion\r
+               {\r
+                       get { return XMSConvert.ToBrokerVersion(this.XMSBrokerVersion); }\r
+                       set { this.XMSBrokerVersion = XMSConvert.ToXMSBrokerVersion(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the queue manager to which a broker is connected.\r
+               /// </summary>\r
+               [UriAttribute("wmq.BrokerQueueManagerName")]\r
+               public string BrokerQueueManagerName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_BROKER_QMGR); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_BROKER_QMGR, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the control queue used by a broker.\r
+               /// </summary>\r
+               [UriAttribute("wmq.BrokerControlQueueName")]\r
+               public string BrokerControlQueueName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_BROKER_CONTROLQ); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_BROKER_CONTROLQ, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the queue monitored by a broker where applications send\r
+               /// messages that they publish.\r
+               /// </summary>\r
+               [UriAttribute("wmq.BrokerPublishQueueName")]\r
+               public string BrokerPublishQueueName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_BROKER_PUBQ); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_BROKER_PUBQ, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the subscriber queue for a nondurable message consumer.\r
+               /// </summary>\r
+               [UriAttribute("wmq.BrokerSubscriberQueueName")]\r
+               public string BrokerSubscriberQueueName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_BROKER_SUBQ); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_BROKER_SUBQ, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Determines whether message selection is done by the XMS client or\r
+               /// by the broker.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSMessageSelection")]\r
+               public Int32 XMSMessageSelection\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_MESSAGE_SELECTION); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_MESSAGE_SELECTION, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Determines whether message selection is done by the XMS client or\r
+               /// by the broker.\r
+               /// </summary>\r
+               [UriAttribute("wmq.MessageSelection")]\r
+               public MessageSelection MessageSelection\r
+               {\r
+                       get { return XMSConvert.ToMessageSelection(this.XMSMessageSelection); }\r
+                       set { this.XMSMessageSelection = XMSConvert.ToXMSMessageSelection(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The maximum number of messages to be retrieved from a queue in one\r
+               /// batch when using asynchronous message delivery.\r
+               /// </summary>\r
+               [UriAttribute("wmq.MessageBatchSize")]\r
+               public Int32 MessageBatchSize\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_MSG_BATCH_SIZE); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_MSG_BATCH_SIZE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// If each message listener within a session has no suitable message\r
+               /// on its queue, this value is the maximum interval, in milliseconds,\r
+               /// that elapses before each message listener tries again to get a\r
+               /// message from its queue.\r
+               /// </summary>\r
+               [UriAttribute("wmq.PollingInterval")]\r
+               public Int32 PollingInterval\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_POLLING_INTERVAL); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_POLLING_INTERVAL, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The number of messages published by a publisher before the XMS\r
+               /// client requests an acknowledgement from the broker.\r
+               /// </summary>\r
+               [UriAttribute("wmq.PublishAcknowledgementInterval")]\r
+               public Int32 PublishAcknowledgementInterval\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_PUB_ACK_INTERVAL); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_PUB_ACK_INTERVAL, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether message producers are allowed to\r
+               /// use asynchronous puts to send messages to this destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSAsynchronousPutsAllowed")]\r
+               public Int32 XMSAsynchronousPutsAllowed\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_PUT_ASYNC_ALLOWED); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_PUT_ASYNC_ALLOWED, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether message producers are allowed to\r
+               /// use asynchronous puts to send messages to this destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.AsynchronousPutsAllowed")]\r
+               public AsynchronousPutsAllowed AsynchronousPutsAllowed\r
+               {\r
+                       get { return XMSConvert.ToAsynchronousPutsAllowed(this.XMSAsynchronousPutsAllowed); }\r
+                       set { this.XMSAsynchronousPutsAllowed = XMSConvert.ToXMSAsynchronousPutsAllowed(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The identifier (CCSID) of the coded character set, or code page,\r
+               /// in which fields of character data defined in the Message Queue\r
+               /// Interface (MQI) are exchanged between the XMS client and the\r
+               /// WebSphere MQ client.\r
+               /// </summary>\r
+               [UriAttribute("wmq.QueueManagerCCSID")]\r
+               public string QueueManagerCCSID\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_QMGR_CCSID); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_QMGR_CCSID, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Identifies a channel receive exit to be run.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ReceiveExit")]\r
+               public string ReceiveExit\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_RECEIVE_EXIT); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_RECEIVE_EXIT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The user data that is passed to a channel receive exit when it\r
+               /// is called.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ReceiveExitInit")]\r
+               public string ReceiveExitInit\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_RECEIVE_EXIT_INIT); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_RECEIVE_EXIT_INIT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Identifies a channel security exit.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SecurityExit")]\r
+               public string SecurityExit\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SECURITY_EXIT); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SECURITY_EXIT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The user data that is passed to a channel security exit when it\r
+               /// is called.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SecurityExitInit")]\r
+               public string SecurityExitInit\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SECURITY_EXIT_INIT); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SECURITY_EXIT_INIT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Identifies a channel send exit.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SendExit")]\r
+               public string SendExit\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SEND_EXIT); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SEND_EXIT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The user data that is passed to channel send exits when they\r
+               /// are called.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SendExitInit")]\r
+               public string SendExitInit\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SEND_EXIT_INIT); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SEND_EXIT_INIT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The number of send calls to allow between checking for asynchronous\r
+               /// put errors, within a single non-transacted XMS session.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SendCheckCount")]\r
+               public Int32 SendCheckCount\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_SEND_CHECK_COUNT); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_SEND_CHECK_COUNT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether a client connection can share its socket with other\r
+               /// top-level XMS connections from the same process to the same queue\r
+               /// manager, if the channel definitions match.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSShareSocketAllowed")]\r
+               public Int32 XMSShareSocketAllowed\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_SHARE_CONV_ALLOWED); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_SHARE_CONV_ALLOWED, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether a client connection can share its socket with other\r
+               /// top-level XMS connections from the same process to the same queue\r
+               /// manager, if the channel definitions match.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ShareSocketAllowed")]\r
+               public bool ShareSocketAllowed\r
+               {\r
+                       get { return XMSConvert.ToShareSocketAllowed(this.XMSShareSocketAllowed); }\r
+                       set { this.XMSShareSocketAllowed = XMSConvert.ToXMSShareSocketAllowed(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The locations of the servers that hold the certificate revocation\r
+               /// lists (CRLs) to be used on an SSL connection to a queue manager.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SSLCertificateStores")]\r
+               public string SSLCertificateStores\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SSL_CERT_STORES); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SSL_CERT_STORES, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the CipherSpec to be used on a secure connection to\r
+               /// a queue manager.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SSLCipherSpec")]\r
+               public string SSLCipherSpec\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SSL_CIPHER_SPEC); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SSL_CIPHER_SPEC, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the CipherSuite to be used on an SSL or TLS connection\r
+               /// to a queue manager. The protocol used in negotiating the secure\r
+               /// connection depends on the specified CipherSuite.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SSLCipherSuite")]\r
+               public string SSLCipherSuite\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SSL_CIPHER_SUITE); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SSL_CIPHER_SUITE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Configuration details for the cryptographic hardware connected\r
+               /// to the client system.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SSLCryptoHardware")]\r
+               public string SSLCryptoHardware\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SSL_CRYPTO_HW); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SSL_CRYPTO_HW, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The value of this property determines whether an application can\r
+               /// or cannot use non-FIPS compliant cipher suites. If this property\r
+               /// is set to true, only FIPS algorithms are used for the client-server\r
+               /// connection.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SSLFipsRequired")]\r
+               public bool SSLFipsRequired\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetBooleanProperty(XMSC.WMQ_SSL_FIPS_REQUIRED); }\r
+                       set { this.xmsConnectionFactory.SetBooleanProperty(XMSC.WMQ_SSL_FIPS_REQUIRED, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The location of the key database file in which keys and\r
+               /// certificates are stored.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SSLKeyRepository")]\r
+               public string SSLKeyRepository\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SSL_KEY_REPOSITORY); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SSL_KEY_REPOSITORY, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The KeyResetCount represents the total number of unencrypted bytes\r
+               /// sent and received within an SSL conversation before the secret key\r
+               /// is renegotiated.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SSLKeyResetCount")]\r
+               public Int32 SSLKeyResetCount\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_SSL_KEY_RESETCOUNT); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_SSL_KEY_RESETCOUNT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The peer name to be used on an SSL connection to a queue manager.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SSLPeerName")]\r
+               public string SSLPeerName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_SSL_PEER_NAME); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_SSL_PEER_NAME, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether all messages must be retrieved from queues within sync point control.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SyncpointAllGets")]\r
+               public bool SyncpointAllGets\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetBooleanProperty(XMSC.WMQ_SYNCPOINT_ALL_GETS); }\r
+                       set { this.xmsConnectionFactory.SetBooleanProperty(XMSC.WMQ_SYNCPOINT_ALL_GETS, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether messages sent to the destination contain an MQRFH2 header.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSTargetClient")]\r
+               public Int32 XMSTargetClient\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WMQ_TARGET_CLIENT); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WMQ_TARGET_CLIENT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether messages sent to the destination contain an <c>MQRFH2</c>\r
+               /// header.\r
+               /// </summary>\r
+               [UriAttribute("wmq.TargetClient")]\r
+               public TargetClient TargetClient\r
+               {\r
+                       get { return XMSConvert.ToTargetClient(this.XMSTargetClient); }\r
+                       set { this.XMSTargetClient = XMSConvert.ToXMSTargetClient(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The prefix used to form the name of the WebSphere MQ dynamic queue\r
+               /// that is created when the application creates an XMS temporary queue.\r
+               /// </summary>\r
+               [UriAttribute("wmq.TemporaryQueuePrefix")]\r
+               public string WMQTemporaryQueuePrefix\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_TEMP_Q_PREFIX); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_TEMP_Q_PREFIX, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// When creating temporary topics, XMS generates a topic string of\r
+               /// the form "TEMP/TEMPTOPICPREFIX/unique_id", or if this property\r
+               /// contains the default value, then this string, "TEMP/unique_id", is\r
+               /// generated. Specifying a non-empty value allows specific model\r
+               /// queues to be defined for creating the managed queues for subscribers\r
+               /// to temporary topics created under this connection.\r
+               /// </summary>\r
+               [UriAttribute("wmq.TemporaryTopicPrefix")]\r
+               public string WMQTemporaryTopicPrefix\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_TEMP_TOPIC_PREFIX); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_TEMP_TOPIC_PREFIX, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the WebSphere MQ model queue from which a dynamic\r
+               /// queue is created when the application creates an XMS temporary\r
+               /// queue.\r
+               /// </summary>\r
+               [UriAttribute("wmq.TemporaryModel")]\r
+               public string WMQTemporaryModel\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_TEMP_TOPIC_PREFIX); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_TEMP_TOPIC_PREFIX, value); }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region WPM-specific properties\r
+\r
+               /// <summary>\r
+               /// For a connection to a service integration bus, this property\r
+               /// specifies the local network interface to be used, or the local\r
+               /// port or range of local ports to be used, or both.\r
+               /// </summary>\r
+               [UriAttribute("wpm.LocalAddress")]\r
+               public string WPMLocalAddress\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WPM_LOCAL_ADDRESS); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WPM_LOCAL_ADDRESS, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the service integration bus that the application\r
+               /// connects to.\r
+               /// </summary>\r
+               [UriAttribute("wpm.BusName")]\r
+               public string BusName\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WPM_BUS_NAME); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WPM_BUS_NAME, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The connection proximity setting for the connection.\r
+               /// </summary>\r
+               [UriAttribute("wpm.XMSConnectionProximity")]\r
+               public Int32 XMSConnectionProximity\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WPM_CONNECTION_PROXIMITY); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WPM_CONNECTION_PROXIMITY, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The connection proximity setting for the connection.\r
+               /// </summary>\r
+               [UriAttribute("wpm.ConnectionProximity")]\r
+               public ConnectionProximity ConnectionProximity\r
+               {\r
+                       get { return XMSConvert.ToConnectionProximity(this.XMSConnectionProximity); }\r
+                       set { this.XMSConnectionProximity = XMSConvert.ToXMSConnectionProximity(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the messaging engine where all durable subscriptions\r
+               /// for a connection or a destination are managed.\r
+               /// </summary>\r
+               [UriAttribute("wpm.DurableSubscriptionHome")]\r
+               public string DurableSubscriptionHome\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WPM_DUR_SUB_HOME); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WPM_DUR_SUB_HOME, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The reliability level of nonpersistent messages that are sent\r
+               /// using the connection.\r
+               /// </summary>\r
+               [UriAttribute("wpm.XMSNonPersistentMap")]\r
+               public Int32 XMSNonPersistentMap\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WPM_NON_PERSISTENT_MAP); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WPM_NON_PERSISTENT_MAP, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The reliability level of nonpersistent messages that are sent\r
+               /// using the connection.\r
+               /// </summary>\r
+               [UriAttribute("wpm.NonPersistentMap")]\r
+               public Mapping NonPersistentMap\r
+               {\r
+                       get { return XMSConvert.ToMapping(this.XMSNonPersistentMap); }\r
+                       set { this.XMSNonPersistentMap = XMSConvert.ToXMSMapping(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The reliability level of persistent messages that are sent\r
+               /// using the connection.\r
+               /// </summary>\r
+               [UriAttribute("wpm.XMSPersistentMap")]\r
+               public Int32 XMSPersistentMap\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WPM_PERSISTENT_MAP); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WPM_PERSISTENT_MAP, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The reliability level of persistent messages that are sent\r
+               /// using the connection.\r
+               /// </summary>\r
+               [UriAttribute("wpm.PersistentMap")]\r
+               public Mapping PersistentMap\r
+               {\r
+                       get { return XMSConvert.ToMapping(this.XMSPersistentMap); }\r
+                       set { this.XMSPersistentMap = XMSConvert.ToXMSMapping(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// A sequence of one or more endpoint addresses of bootstrap servers.\r
+               /// </summary>\r
+               [UriAttribute("wpm.ProviderEndpoints")]\r
+               public string ProviderEndpoints\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WPM_PROVIDER_ENDPOINTS); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WPM_PROVIDER_ENDPOINTS, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of a target group of messaging engines.\r
+               /// </summary>\r
+               [UriAttribute("wpm.TargetGroup")]\r
+               public string TargetGroup\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WPM_TARGET_GROUP); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WPM_TARGET_GROUP, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The significance of the target group of messaging engines.\r
+               /// </summary>\r
+               [UriAttribute("wpm.XMSTargetSignificance")]\r
+               public Int32 XMSTargetSignificance\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WPM_TARGET_SIGNIFICANCE); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WPM_TARGET_SIGNIFICANCE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The significance of the target group of messaging engines.\r
+               /// </summary>\r
+               [UriAttribute("wpm.TargetSignificance")]\r
+               public TargetSignificance TargetSignificance\r
+               {\r
+                       get { return XMSConvert.ToTargetSignificance(this.XMSTargetSignificance); }\r
+                       set { this.XMSTargetSignificance = XMSConvert.ToXMSTargetSignificance(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the inbound transport chain that the application must\r
+               /// use to connect to a messaging engine.\r
+               /// </summary>\r
+               [UriAttribute("wpm.TargetTransportChain")]\r
+               public string TargetTransportChain\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WPM_TARGET_TRANSPORT_CHAIN); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WPM_TARGET_TRANSPORT_CHAIN, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The type of the target group of messaging engines.\r
+               /// </summary>\r
+               [UriAttribute("wpm.XMSTargetType")]\r
+               public Int32 XMSTargetType\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetIntProperty(XMSC.WPM_TARGET_TYPE); }\r
+                       set { this.xmsConnectionFactory.SetIntProperty(XMSC.WPM_TARGET_TYPE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The type of the target group of messaging engines.\r
+               /// </summary>\r
+               [UriAttribute("wpm.TargetType")]\r
+               public TargetType TargetType\r
+               {\r
+                       get { return XMSConvert.ToTargetType(this.XMSTargetType); }\r
+                       set { this.XMSTargetType = XMSConvert.ToXMSTargetType(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The prefix used to form the name of the temporary queue that is\r
+               /// created in the service integration bus when the application creates\r
+               /// an XMS temporary queue.\r
+               /// </summary>\r
+               [UriAttribute("wpm.TemporaryQueuePrefix")]\r
+               public string WPMTemporaryQueuePrefix\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_TEMP_Q_PREFIX); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_TEMP_Q_PREFIX, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The prefix used to form the name of a temporary topic that is\r
+               /// created by the application.\r
+               /// </summary>\r
+               [UriAttribute("wpm.TemporaryTopicPrefix")]\r
+               public string WPMTemporaryTopicPrefix\r
+               {\r
+                       get { return this.xmsConnectionFactory.GetStringProperty(XMSC.WMQ_TEMP_TOPIC_PREFIX); }\r
+                       set { this.xmsConnectionFactory.SetStringProperty(XMSC.WMQ_TEMP_TOPIC_PREFIX, value); }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region Common properties having protocol-specific keys\r
+\r
+               /// <summary>\r
+               /// The host name or IP address of the system on which a broker (RTT)\r
+               /// or queue manager (WMQ) runs.\r
+               /// </summary>\r
+               public string HostName\r
+               {\r
+                       get\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case XMSC.CT_RTT: return this.RTTHostName;\r
+                                       case XMSC.CT_WMQ: return this.WMQHostName;\r
+                                       case XMSC.CT_WPM: return null;\r
+                                       default         : return null;\r
+                               }\r
+                       }\r
+                       set\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case XMSC.CT_RTT: this.RTTHostName = value; break;\r
+                                       case XMSC.CT_WMQ: this.WMQHostName = value; break;\r
+                                       case XMSC.CT_WPM: break;\r
+                                       default         : break;\r
+                               }\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The number of the port on which a broker (RTT) or queue manager\r
+               /// (WMQ) listens for incoming requests.\r
+               /// </summary>\r
+               public Int32 Port\r
+               {\r
+                       get\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case IBM.XMS.XMSC.CT_RTT: return this.RTTPort;\r
+                                       case IBM.XMS.XMSC.CT_WMQ: return this.WMQPort;\r
+                                       case IBM.XMS.XMSC.CT_WPM: return 0;\r
+                                       default         : return 0;\r
+                               }\r
+                       }\r
+                       set\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case IBM.XMS.XMSC.CT_RTT: this.RTTPort = value; break;\r
+                                       case IBM.XMS.XMSC.CT_WMQ: this.WMQPort = value; break;\r
+                                       case IBM.XMS.XMSC.CT_WPM: break;\r
+                                       default         : break;\r
+                               }\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The host name or IP address of the local network interface to be\r
+               /// used for a RTT real-time connection to a broker.\r
+               /// For a WMQ connection to a queue manager, this property specifies\r
+               /// the local network interface to be used, or the local port or range\r
+               /// of local ports to be used, or both.\r
+               /// For a WPM connection to a service integration bus, this property\r
+               /// specifies the local network interface to be used, or the local\r
+               /// port or range of local ports to be used, or both.\r
+               /// </summary>\r
+               public string LocalAddress\r
+               {\r
+                       get\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case IBM.XMS.XMSC.CT_RTT: return this.RTTLocalAddress;\r
+                                       case IBM.XMS.XMSC.CT_WMQ: return this.WMQLocalAddress;\r
+                                       case IBM.XMS.XMSC.CT_WPM: return this.WPMLocalAddress;\r
+                                       default         : return null;\r
+                               }\r
+                       }\r
+                       set\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case IBM.XMS.XMSC.CT_RTT: this.RTTLocalAddress = value; break;\r
+                                       case IBM.XMS.XMSC.CT_WMQ: this.WMQLocalAddress = value; break;\r
+                                       case IBM.XMS.XMSC.CT_WPM: this.WPMLocalAddress = value; break;\r
+                                       default         : break;\r
+                               }\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The prefix used to form the name of the WebSphere MQ dynamic queue\r
+               /// that is created (WMQ), or the name of the temporary queue that is\r
+               /// created in the service integration bus (WPM) when the application\r
+               /// creates an XMS temporary queue.\r
+               /// </summary>\r
+               public string TemporaryQueuePrefix\r
+               {\r
+                       get\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case IBM.XMS.XMSC.CT_RTT: return null;\r
+                                       case IBM.XMS.XMSC.CT_WMQ: return this.WMQTemporaryQueuePrefix;\r
+                                       case IBM.XMS.XMSC.CT_WPM: return this.WPMTemporaryQueuePrefix;\r
+                                       default         : return null;\r
+                               }\r
+                       }\r
+                       set\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case IBM.XMS.XMSC.CT_RTT: break;\r
+                                       case IBM.XMS.XMSC.CT_WMQ: this.WMQTemporaryQueuePrefix = value; break;\r
+                                       case IBM.XMS.XMSC.CT_WPM: this.WPMTemporaryQueuePrefix = value; break;\r
+                                       default         : break;\r
+                               }\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The prefix used to form the name of a temporary topic that is\r
+               /// created by the application (WMQ and WPM).\r
+               /// </summary>\r
+               public string TemporaryTopicPrefix\r
+               {\r
+                       get\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case IBM.XMS.XMSC.CT_RTT: return null;\r
+                                       case IBM.XMS.XMSC.CT_WMQ: return this.WMQTemporaryTopicPrefix;\r
+                                       case IBM.XMS.XMSC.CT_WPM: return this.WPMTemporaryTopicPrefix;\r
+                                       default         : return null;\r
+                               }\r
+                       }\r
+                       set\r
+                       {\r
+                               switch(this.XMSConnectionType)\r
+                               {\r
+                                       case IBM.XMS.XMSC.CT_RTT: break;\r
+                                       case IBM.XMS.XMSC.CT_WMQ: this.WMQTemporaryTopicPrefix = value; break;\r
+                                       case IBM.XMS.XMSC.CT_WPM: this.WPMTemporaryTopicPrefix = value; break;\r
+                                       default         : break;\r
+                               }\r
+                       }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #endregion\r
+\r
+               #region IConnectionFactory Members\r
+\r
+               /// <summary>\r
+               /// Creates a new connection to IBM MQ with the default properties.\r
+               /// </summary>\r
+               public Apache.NMS.IConnection CreateConnection()\r
+               {\r
+                       Apache.NMS.IConnection connection = null;\r
+                       try\r
+                       {\r
+                               connection = new Apache.NMS.XMS.Connection(\r
+                                       this.xmsConnectionFactory.CreateConnection());\r
+                               ConfigureConnection(connection);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                       }\r
+                       return connection;\r
+               }\r
+\r
+               /// <summary>\r
+               /// Creates a new connection to IBM MQ using a specified user identity.\r
+               /// </summary>\r
+               /// <param name="userName">User name.</param>\r
+               /// <param name="password">Password.</param>\r
+               public Apache.NMS.IConnection CreateConnection(\r
+                                       string userName, string password)\r
+               {\r
+                       Apache.NMS.IConnection connection = null;\r
+                       try\r
+                       {\r
+                               connection = new Apache.NMS.XMS.Connection(\r
+                                       this.xmsConnectionFactory.CreateConnection(\r
+                                               userName, password));\r
+                               ConfigureConnection(connection);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                       }\r
+                       return connection;\r
+               }\r
+\r
+               /// <summary>\r
+               /// Configure the newly created connection.\r
+               /// </summary>\r
+               /// <param name="connection">Connection.</param>\r
+               private void ConfigureConnection(IConnection connection)\r
+               {\r
+                       connection.RedeliveryPolicy = this.redeliveryPolicy.Clone() as IRedeliveryPolicy;\r
+                       connection.ConsumerTransformer = this.consumerTransformer;\r
+                       connection.ProducerTransformer = this.producerTransformer;\r
+               }\r
+\r
+               /// <summary>\r
+               /// Get or set the broker URI.\r
+               /// </summary>\r
+               public Uri BrokerUri\r
+               {\r
+                       get { return this.brokerUri; }\r
+                       set { this.brokerUri = CreateConnectionFactoryFromURI(value); }\r
+               }\r
+\r
+               private ConsumerTransformerDelegate consumerTransformer;\r
+               /// <summary>\r
+               /// A Delegate that is called each time a Message is dispatched to allow the client to do\r
+               /// any necessary transformations on the received message before it is delivered.  The\r
+               /// ConnectionFactory sets the provided delegate instance on each Connection instance that\r
+               /// is created from this factory, each connection in turn passes the delegate along to each\r
+               /// Session it creates which then passes that along to the Consumers it creates.\r
+               /// </summary>\r
+               public ConsumerTransformerDelegate ConsumerTransformer\r
+               {\r
+                       get { return this.consumerTransformer; }\r
+                       set { this.consumerTransformer = value; }\r
+               }\r
+\r
+               private ProducerTransformerDelegate producerTransformer;\r
+               /// <summary>\r
+               /// A delegate that is called each time a Message is sent from this Producer which allows\r
+               /// the application to perform any needed transformations on the Message before it is sent.\r
+               /// The ConnectionFactory sets the provided delegate instance on each Connection instance that\r
+               /// is created from this factory, each connection in turn passes the delegate along to each\r
+               /// Session it creates which then passes that along to the Producers it creates.\r
+               /// </summary>\r
+               public ProducerTransformerDelegate ProducerTransformer\r
+               {\r
+                       get { return this.producerTransformer; }\r
+                       set { this.producerTransformer = value; }\r
+               }\r
+\r
+               #endregion\r
+       }\r
+}\r
diff --git a/src/main/csharp/ConnectionMetaData.cs b/src/main/csharp/ConnectionMetaData.cs
new file mode 100644 (file)
index 0000000..27ffce3
--- /dev/null
@@ -0,0 +1,106 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements.  See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License.  You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+using System;\r
+using System.Reflection;\r
+\r
+namespace Apache.NMS.XMS\r
+{\r
+       /// <summary>\r
+       /// Implements the Connection Meta-Data feature for Apache.NMS.EMS\r
+       /// </summary>\r
+       public class ConnectionMetaData : IConnectionMetaData\r
+       {\r
+               private int nmsMajorVersion;\r
+               private int nmsMinorVersion;\r
+\r
+               private string nmsProviderName;\r
+               private string nmsVersion;\r
+\r
+               private int providerMajorVersion;\r
+               private int providerMinorVersion;\r
+               private string providerVersion;\r
+\r
+               private string[] nmsxProperties;\r
+\r
+               public ConnectionMetaData()\r
+               {\r
+                       Assembly self = Assembly.GetExecutingAssembly();\r
+                       AssemblyName asmName = self.GetName();\r
+\r
+                       this.nmsProviderName = asmName.Name;\r
+                       this.providerMajorVersion = asmName.Version.Major;\r
+                       this.providerMinorVersion = asmName.Version.Minor;\r
+                       this.providerVersion = asmName.Version.ToString();\r
+\r
+                       this.nmsxProperties = new String[] { };\r
+\r
+                       foreach(AssemblyName name in self.GetReferencedAssemblies())\r
+                       {\r
+                               if(0 == string.Compare(name.Name, "Apache.NMS", true))\r
+                               {\r
+                                       this.nmsMajorVersion = name.Version.Major;\r
+                                       this.nmsMinorVersion = name.Version.Minor;\r
+                                       this.nmsVersion = name.Version.ToString();\r
+\r
+                                       return;\r
+                               }\r
+                       }\r
+\r
+                       throw new NMSException("Could not find a reference to the Apache.NMS Assembly.");\r
+               }\r
+\r
+               public int NMSMajorVersion\r
+               {\r
+                       get { return this.nmsMajorVersion; }\r
+               }\r
+\r
+               public int NMSMinorVersion\r
+               {\r
+                       get { return this.nmsMinorVersion; }\r
+               }\r
+\r
+               public string NMSProviderName\r
+               {\r
+                       get { return this.nmsProviderName; }\r
+               }\r
+\r
+               public string NMSVersion\r
+               {\r
+                       get { return this.nmsVersion; }\r
+               }\r
+\r
+               public string[] NMSXPropertyNames\r
+               {\r
+                       get { return this.nmsxProperties; }\r
+               }\r
+\r
+               public int ProviderMajorVersion\r
+               {\r
+                       get { return this.providerMajorVersion; }\r
+               }\r
+\r
+               public int ProviderMinorVersion\r
+               {\r
+                       get { return this.providerMinorVersion; }\r
+               }\r
+\r
+               public string ProviderVersion\r
+               {\r
+                       get { return this.providerVersion; }\r
+               }\r
+       }\r
+}\r
diff --git a/src/main/csharp/Destination.cs b/src/main/csharp/Destination.cs
new file mode 100644 (file)
index 0000000..d3848b2
--- /dev/null
@@ -0,0 +1,524 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements.  See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License.  You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+using System;\r
+using Apache.NMS;\r
+using Apache.NMS.Util;\r
+using Apache.NMS.XMS.Util;\r
+using IBM.XMS;\r
+\r
+namespace Apache.NMS.XMS\r
+{\r
+       public class Destination : IDestination\r
+       {\r
+               public IBM.XMS.IDestination xmsDestination;\r
+\r
+               #region Constructors\r
+\r
+               /// <summary>\r
+               /// Constructs a destination object.\r
+               /// </summary>\r
+               /// <param name="destination">IBM XMS destination.</param>\r
+               public Destination(IBM.XMS.IDestination destination)\r
+               {\r
+                       this.xmsDestination = destination;\r
+               }\r
+\r
+               /// <summary>\r
+               /// Constructs a destination object specifying if the destination is\r
+               /// temporary.\r
+               /// </summary>\r
+               /// <param name="destination">IBM XMS destination.</param>\r
+               /// <param name="isTemporary">Whether the destination is temporary.\r
+               /// </param>\r
+               public Destination(IBM.XMS.IDestination destination, bool isTemporary)\r
+               {\r
+                       this.xmsDestination = destination;\r
+                       this.isTemporary = isTemporary;\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region IDestination implementation\r
+\r
+               /// <summary>\r
+               /// Destination type.\r
+               /// </summary>\r
+               public DestinationType DestinationType\r
+               {\r
+                       get\r
+                       {\r
+                               return XMSConvert.ToDestinationType(\r
+                                       this.xmsDestination.TypeId,\r
+                                       this.isTemporary);\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Checks if destination is a topic.\r
+               /// </summary>\r
+               public bool IsTopic\r
+               {\r
+                       get\r
+                       {\r
+                               return (this.xmsDestination.TypeId\r
+                                       == IBM.XMS.DestinationType.Topic);\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Checks if destination is a queue.\r
+               /// </summary>\r
+               public bool IsQueue\r
+               {\r
+                       get\r
+                       {\r
+                               return (this.xmsDestination.TypeId\r
+                                       == IBM.XMS.DestinationType.Queue);\r
+                       }\r
+               }\r
+\r
+               private readonly bool isTemporary;\r
+               /// <summary>\r
+               /// Checks if destination is temporary.\r
+               /// </summary>\r
+               public bool IsTemporary\r
+               {\r
+                       get { return this.isTemporary; }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region XMS IDestination properties\r
+\r
+               // http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.msc.doc/props_dest.htm?lang=en\r
+\r
+               #region Common properties\r
+\r
+               /// <summary>\r
+               /// Destination name.\r
+               /// </summary>\r
+               public string Name\r
+               {\r
+                       get { return this.xmsDestination.Name; }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The delivery mode of messages sent to the destination.\r
+               /// </summary>\r
+               public Int32 XMSDeliveryMode\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.DELIVERY_MODE); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.DELIVERY_MODE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The delivery mode of messages sent to the destination.\r
+               /// </summary>\r
+               public Apache.NMS.XMS.Util.DeliveryMode DeliveryMode\r
+               {\r
+                       get { return XMSConvert.ToDeliveryMode(this.XMSDeliveryMode); }\r
+                       set { this.XMSDeliveryMode = XMSConvert.ToXMSDeliveryMode(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The priority of messages sent to the destination.\r
+               /// </summary>\r
+               public Int32 Priority\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.PRIORITY); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.PRIORITY, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The time to live in milliseconds for messages sent to the\r
+               /// destination.\r
+               /// </summary>\r
+               public Int32 TimeToLive\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.TIME_TO_LIVE); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.TIME_TO_LIVE, value); }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region RTT-specific properties\r
+\r
+               /// <summary>\r
+               /// The multicast setting for the destination.\r
+               /// </summary>\r
+               [UriAttribute("rtt.XMSMulticast")]\r
+               public Int32 XMSMulticast\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.RTT_MULTICAST); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.RTT_MULTICAST, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The multicast setting for the destination.\r
+               /// </summary>\r
+               [UriAttribute("rtt.Multicast")]\r
+               public Multicast Multicast\r
+               {\r
+                       get { return XMSConvert.ToMulticast(this.XMSMulticast); }\r
+                       set { this.XMSMulticast = XMSConvert.ToXMSMulticast(value); }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region WMQ-specific properties\r
+\r
+               /// <summary>\r
+               /// The type of broker used by the application for the destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSBrokerVersion")]\r
+               public Int32 XMSBrokerVersion\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_BROKER_VERSION); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_BROKER_VERSION, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The type of broker used by the application for the destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.BrokerVersion")]\r
+               public BrokerVersion BrokerVersion\r
+               {\r
+                       get { return XMSConvert.ToBrokerVersion(this.XMSBrokerVersion); }\r
+                       set { this.XMSBrokerVersion = XMSConvert.ToXMSBrokerVersion(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The identifier (CCSID) of the coded character set, or code page,\r
+               /// that the strings of character data in the body of a message are in\r
+               /// when the XMS client forwards the message to the destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.DestinationCCSID")]\r
+               public Int32 DestinationCCSID\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_CCSID); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_CCSID, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The name of the subscriber queue for a durable subscriber that is\r
+               /// receiving messages from the destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.SubscriberQueueName")]\r
+               public string SubscriberQueueName\r
+               {\r
+                       get { return this.xmsDestination.GetStringProperty(XMSC.WMQ_DUR_SUBQ); }\r
+                       set { this.xmsDestination.SetStringProperty(XMSC.WMQ_DUR_SUBQ, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// How numerical data in the body of a message is represented when\r
+               /// the XMS client forwards the message to the destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSEncoding")]\r
+               public Int32 XMSEncoding\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_ENCODING); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_ENCODING, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// How numerical data in the body of a message is represented when\r
+               /// the XMS client forwards the message to the destination.\r
+               /// </summary>\r
+               [UriAttribute("wmq.Encoding")]\r
+               public Encoding Encoding\r
+               {\r
+                       get { return XMSConvert.ToEncoding(this.XMSEncoding); }\r
+                       set { this.XMSEncoding = XMSConvert.ToXMSEncoding(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether calls to certain methods fail if the queue manager to which\r
+               /// the application is connected is in a quiescing state.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSFailIfQuiesce")]\r
+               public Int32 XMSFailIfQuiesce\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_FAIL_IF_QUIESCE); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_FAIL_IF_QUIESCE, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether calls to certain methods fail if the queue manager to which\r
+               /// the application is connected is in a quiescing state.\r
+               /// </summary>\r
+               [UriAttribute("wmq.FailIfQuiesce")]\r
+               public bool FailIfQuiesce\r
+               {\r
+                       get { return XMSConvert.ToFailIfQuiesce(this.XMSFailIfQuiesce); }\r
+                       set { this.XMSFailIfQuiesce = XMSConvert.ToXMSFailIfQuiesce(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether an XMS application processes the\r
+               /// <c>MQRFH2</c> of a WebSphere MQ message as part of the message\r
+               /// payload (that is, as part of the message body).\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSMessageBody")]\r
+               public Int32 XMSMessageBody\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_MESSAGE_BODY); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_MESSAGE_BODY, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether an XMS application processes the\r
+               /// <c>MQRFH2</c> of a WebSphere MQ message as part of the message\r
+               /// payload (that is, as part of the message body).\r
+               /// </summary>\r
+               [UriAttribute("wmq.MessageBody")]\r
+               public MessageBody MessageBody\r
+               {\r
+                       get { return XMSConvert.ToMessageBody(this.XMSMessageBody); }\r
+                       set { this.XMSMessageBody = XMSConvert.ToXMSMessageBody(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Determines what level of message context is to be set by the XMS\r
+               /// application. The application must be running with appropriate\r
+               /// context authority for this property to take effect.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSMessageContext")]\r
+               public Int32 XMSMessageContext\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_MQMD_MESSAGE_CONTEXT); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_MQMD_MESSAGE_CONTEXT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Determines what level of message context is to be set by the XMS\r
+               /// application. The application must be running with appropriate\r
+               /// context authority for this property to take effect.\r
+               /// </summary>\r
+               [UriAttribute("wmq.MessageContext")]\r
+               public MessageContext MessageContext\r
+               {\r
+                       get { return XMSConvert.ToMessageContext(this.XMSMessageContext); }\r
+                       set { this.XMSMessageContext = XMSConvert.ToXMSMessageContext(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether an XMS application can extract\r
+               /// the values of MQMD fields or not.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSMQMDReadEnabled")]\r
+               public Int32 XMSMQMDReadEnabled\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_MQMD_READ_ENABLED); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_MQMD_READ_ENABLED, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether an XMS application can extract\r
+               /// the values of MQMD fields or not.\r
+               /// </summary>\r
+               [UriAttribute("wmq.MQMDReadEnabled")]\r
+               public bool MQMDReadEnabled\r
+               {\r
+                       get { return XMSConvert.ToMQMDReadEnabled(this.XMSMQMDReadEnabled); }\r
+                       set { this.XMSMQMDReadEnabled = XMSConvert.ToXMSMQMDReadEnabled(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether an XMS application can set\r
+               /// the values of MQMD fields or not.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSMQMDWriteEnabled")]\r
+               public Int32 XMSMQMDWriteEnabled\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_MQMD_WRITE_ENABLED); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_MQMD_WRITE_ENABLED, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether an XMS application can set\r
+               /// the values of MQMD fields or not.\r
+               /// </summary>\r
+               [UriAttribute("wmq.MQMDWriteEnabled")]\r
+               public bool MQMDWriteEnabled\r
+               {\r
+                       get { return XMSConvert.ToMQMDWriteEnabled(this.XMSMQMDWriteEnabled); }\r
+                       set { this.XMSMQMDWriteEnabled = XMSConvert.ToXMSMQMDWriteEnabled(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether message consumers and queue\r
+               /// browsers are allowed to use read ahead to get non-persistent,\r
+               /// non-transactional messages from this destination into an internal\r
+               /// buffer before receiving them.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSReadAheadAllowed")]\r
+               public Int32 XMSReadAheadAllowed\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_READ_AHEAD_ALLOWED); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_READ_AHEAD_ALLOWED, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines whether message consumers and queue\r
+               /// browsers are allowed to use read ahead to get non-persistent,\r
+               /// non-transactional messages from this destination into an internal\r
+               /// buffer before receiving them.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ReadAheadAllowed")]\r
+               public ReadAheadAllowed ReadAheadAllowed\r
+               {\r
+                       get { return XMSConvert.ToReadAheadAllowed(this.XMSReadAheadAllowed); }\r
+                       set { this.XMSReadAheadAllowed = XMSConvert.ToXMSReadAheadAllowed(value); }\r
+               }\r
+\r
+\r
+               /// <summary>\r
+               /// This property determines, for messages being delivered to an\r
+               /// asynchronous message listener, what happens to messages in the\r
+               /// internal read ahead buffer when the message consumer is closed.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSReadAheadClosePolicy")]\r
+               public Int32 XMSReadAheadClosePolicy\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_READ_AHEAD_CLOSE_POLICY); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_READ_AHEAD_CLOSE_POLICY, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// This property determines, for messages being delivered to an\r
+               /// asynchronous message listener, what happens to messages in the\r
+               /// internal read ahead buffer when the message consumer is closed.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ReadAheadClosePolicy")]\r
+               public ReadAheadClosePolicy ReadAheadClosePolicy\r
+               {\r
+                       get { return XMSConvert.ToReadAheadClosePolicy(this.XMSReadAheadClosePolicy); }\r
+                       set { this.XMSReadAheadClosePolicy = XMSConvert.ToXMSReadAheadClosePolicy(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Destination property that sets the target CCSID for queue manager\r
+               /// message conversion. The value is ignored unless\r
+               /// <c>XMSC.WMQ_RECEIVE_CONVERSION</c> is set to\r
+               /// <c>WMQ_RECEIVE_CONVERSION_QMGR</c>.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ReceiveCCSID")]\r
+               public Int32 ReceiveCCSID\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_RECEIVE_CCSID); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_RECEIVE_CCSID, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Destination property that determines whether data conversion is\r
+               /// going to be performed by the queue manager.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSReceiveConversion")]\r
+               public Int32 XMSReceiveConversion\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_RECEIVE_CONVERSION); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_RECEIVE_CONVERSION, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Destination property that determines whether data conversion is\r
+               /// going to be performed by the queue manager.\r
+               /// </summary>\r
+               [UriAttribute("wmq.ReceiveConversion")]\r
+               public ReceiveConversion ReceiveConversion\r
+               {\r
+                       get { return XMSConvert.ToReceiveConversion(this.XMSReceiveConversion); }\r
+                       set { this.XMSReceiveConversion = XMSConvert.ToXMSReceiveConversion(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether messages sent to the destination contain an <c>MQRFH2</c>\r
+               /// header.\r
+               /// </summary>\r
+               [UriAttribute("wmq.XMSTargetClient")]\r
+               public Int32 XMSTargetClient\r
+               {\r
+                       get { return this.xmsDestination.GetIntProperty(XMSC.WMQ_TARGET_CLIENT); }\r
+                       set { this.xmsDestination.SetIntProperty(XMSC.WMQ_TARGET_CLIENT, value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Whether messages sent to the destination contain an <c>MQRFH2</c>\r
+               /// header.\r
+               /// </summary>\r
+               [UriAttribute("wmq.TargetClient")]\r
+               public TargetClient TargetClient\r
+               {\r
+                       get { return XMSConvert.ToTargetClient(this.XMSTargetClient); }\r
+                       set { this.XMSTargetClient = XMSConvert.ToXMSTargetClient(value); }\r
+               }\r
+\r
+               /// <summary>\r
+               /// When creating temporary topics, XMS generates a topic string of\r
+               /// the form "TEMP/TEMPTOPICPREFIX/unique_id", or if this property\r
+               /// contains the default value, then this string, "TEMP/unique_id",\r
+               /// is generated. Specifying a non-empty value allows specific model\r
+               /// queues to be defined for creating the managed queues for subscribers\r
+               /// to temporary topics created under this connection.\r
+               /// </summary>\r
+               [UriAttribute("wmq.TemporaryTopicPrefix")]\r
+               public string WMQTemporaryTopicPrefix\r
+               {\r
+                       get { return this.xmsDestination.GetStringProperty(XMSC.WMQ_TEMP_TOPIC_PREFIX); }\r
+                       set { this.xmsDestination.SetStringProperty(XMSC.WMQ_TEMP_TOPIC_PREFIX, value); }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region WPM-specific properties\r
+\r
+               /// <summary>\r
+               /// The name of the service integration bus in which the destination\r
+               /// exists.\r
+               /// </summary>\r
+               [UriAttribute("wpm.BusName")]\r
+               public string BusName\r
+               {\r
+                       get { return this.xmsDestination.GetStringProperty(XMSC.WPM_BUS_NAME); }\r
+                       set { this.xmsDestination.SetStringProperty(XMSC.WPM_BUS_NAME, value); }\r
+               }\r
+\r
+\r
+               /// <summary>\r
+               /// The name of the topic space that contains the topic.\r
+               /// </summary>\r
+               [UriAttribute("wpm.TopicSpace")]\r
+               public string TopicSpace\r
+               {\r
+                       get { return this.xmsDestination.GetStringProperty(XMSC.WPM_TOPIC_SPACE); }\r
+                       set { this.xmsDestination.SetStringProperty(XMSC.WPM_TOPIC_SPACE, value); }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #endregion\r
+\r
+               #region IDisposable implementation\r
+\r
+               public void Dispose()\r
+               {\r
+               }\r
+\r
+               #endregion\r
+       }\r
+}\r
diff --git a/src/main/csharp/InitialContext.cs b/src/main/csharp/InitialContext.cs
new file mode 100644 (file)
index 0000000..3b9ed83
--- /dev/null
@@ -0,0 +1,174 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements.  See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License.  You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+using System;\r
+using System.Collections;\r
+using System.Collections.Specialized;\r
+using Apache.NMS.XMS.Util;\r
+using Apache.NMS.Policies;\r
+using Apache.NMS.Util;\r
+using IBM.XMS;\r
+\r
+namespace Apache.NMS.XMS\r
+{\r
+       /// <summary>\r
+       /// An Initial Context for querying object repositories for object\r
+    /// definitions.\r
+       /// </summary>\r
+       public class InitialContext : IDisposable\r
+       {\r
+        public IBM.XMS.InitialContext xmsInitialContext;\r
+\r
+        #region Constructors\r
+\r
+        /// <summary>\r
+        /// Constructs an <c>InitialContext</c> object.\r
+        /// </summary>\r
+        /// <param name="environment">Environment settings.</param>\r
+               public InitialContext(Hashtable environment)\r
+               {\r
+            this.xmsInitialContext = new IBM.XMS.InitialContext(environment);\r
+               }\r
+\r
+        /// <summary>\r
+        /// Constructs an <c>InitialContext</c> object specifying the\r
+        /// repository URL.\r
+        /// </summary>\r
+        /// <param name="environment">Environment settings.</param>\r
+        /// <param name="repositoryURL">Repository URL.</param>\r
+               public InitialContext(Hashtable environment, string repositoryURL)\r
+               {\r
+            this.xmsInitialContext = new IBM.XMS.InitialContext(environment);\r
+            this.RepositoryURL = repositoryURL;\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region Initial Context Properties (configure via ConnectionFactory URL parameters)\r
+\r
+        // http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.msc.doc/props_inctx.htm?lang=en\r
+\r
+        /// <summary>\r
+        /// Repository URL.\r
+        /// </summary>\r
+               [UriAttribute("ic.RepositoryURL")]\r
+        public string RepositoryURL\r
+        {\r
+            get { return (string)this.xmsInitialContext.Environment[XMSC.IC_URL]; }\r
+            set { this.xmsInitialContext.Environment[XMSC.IC_URL] = value; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Initial context provider URL.\r
+        /// </summary>\r
+               [UriAttribute("ic.ProviderURL")]\r
+        public string ProviderURL\r
+        {\r
+            get { return (string)this.xmsInitialContext.Environment[XMSC.IC_PROVIDER_URL]; }\r
+            set { this.xmsInitialContext.Environment[XMSC.IC_PROVIDER_URL] = value; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Initial context security protocol.\r
+        /// </summary>\r
+               [UriAttribute("ic.SecurityProtocol")]\r
+        public string SecurityProtocol\r
+        {\r
+            get { return (string)this.xmsInitialContext.Environment[XMSC.IC_SECURITY_PROTOCOL]; }\r
+            set { this.xmsInitialContext.Environment[XMSC.IC_SECURITY_PROTOCOL] = value; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Initial context security authentication.\r
+        /// </summary>\r
+               [UriAttribute("ic.SecurityAuthentication")]\r
+        public string SecurityAuthentication\r
+        {\r
+            get { return (string)this.xmsInitialContext.Environment[XMSC.IC_SECURITY_AUTHENTICATION]; }\r
+            set { this.xmsInitialContext.Environment[XMSC.IC_SECURITY_AUTHENTICATION] = value; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Initial context security principal.\r
+        /// </summary>\r
+               [UriAttribute("ic.SecurityPrincipal")]\r
+        public string SecurityPrincipal\r
+        {\r
+            get { return (string)this.xmsInitialContext.Environment[XMSC.IC_SECURITY_PRINCIPAL]; }\r
+            set { this.xmsInitialContext.Environment[XMSC.IC_SECURITY_PRINCIPAL] = value; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Initial context security credentials.\r
+        /// </summary>\r
+               [UriAttribute("ic.SecurityCredentials")]\r
+        public string SecurityCredentials\r
+        {\r
+            get { return (string)this.xmsInitialContext.Environment[XMSC.IC_SECURITY_CREDENTIALS]; }\r
+            set { this.xmsInitialContext.Environment[XMSC.IC_SECURITY_CREDENTIALS] = value; }\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region InitialContext Methods\r
+\r
+        /// <summary>\r
+        /// Create an object from an object definition that is retrieved from\r
+        /// the repository of administered objects.\r
+        /// </summary>\r
+        /// <param name="objectName">Requested object name.</param>\r
+        /// <returns>Requested object, or null if the requested object is\r
+        /// not found.</returns>\r
+        public object Lookup(string objectName)\r
+        {\r
+            return this.xmsInitialContext.Lookup(objectName);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Add a new property to the environment.\r
+        /// </summary>\r
+        /// <param name="propertyName">Property name.</param>\r
+        /// <param name="propertyValue">Property value.</param>\r
+        /// <returns>Old property value.</returns>\r
+        public object AddToEnvironment(\r
+            string propertyName, object propertyValue)\r
+        {\r
+            return this.xmsInitialContext.AddToEnvironment(\r
+                propertyName, propertyValue);\r
+        }\r
+\r
+        /// <summary>\r
+        /// Remove a property from the environment.\r
+        /// </summary>\r
+        /// <param name="propertyName">Property name.</param>\r
+        /// <returns>Old property value.</returns>\r
+        public object RemoveFromEnvironment(string propertyName)\r
+        {\r
+            return this.xmsInitialContext.RemoveFromEnvironment(propertyName);\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region IDisposable\r
+\r
+        public void Dispose()\r
+        {\r
+            this.xmsInitialContext.Close();\r
+        }\r
+\r
+        #endregion\r
+       }\r
+}\r
diff --git a/src/main/csharp/MapMessage.cs b/src/main/csharp/MapMessage.cs
new file mode 100644 (file)
index 0000000..188e3d7
--- /dev/null
@@ -0,0 +1,719 @@
+/*\r
+ * Licensed to the Apache Software Foundation (ASF) under one or more\r
+ * contributor license agreements.  See the NOTICE file distributed with\r
+ * this work for additional information regarding copyright ownership.\r
+ * The ASF licenses this file to You under the Apache License, Version 2.0\r
+ * (the "License"); you may not use this file except in compliance with\r
+ * the License.  You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+using System;\r
+using System.Collections;\r
+using Apache.NMS;\r
+using Apache.NMS.Util;\r
+using Apache.NMS.XMS.Util;\r
+using IBM.XMS;\r
+\r
+namespace Apache.NMS.XMS\r
+{\r
+       /// <summary>\r
+       /// Represents a map message which contains key and value pairs which are\r
+       /// of primitive types.\r
+       /// </summary>\r
+       class MapMessage : Apache.NMS.XMS.Message, Apache.NMS.IMapMessage,\r
+               Apache.NMS.IPrimitiveMap\r
+       {\r
+               #region Constructors and access to internal map message\r
+\r
+               /// <summary>\r
+               /// Internal IBM XMS map message.\r
+               /// </summary>\r
+               public IBM.XMS.IMapMessage xmsMapMessage\r
+               {\r
+                       get { return (IBM.XMS.IMapMessage)(this.xmsMessage); }\r
+                       set { this.xmsMessage = value; }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Constructs a <c>MapMessage</c> object.\r
+               /// </summary>\r
+               /// <param name="message">XMS map message.</param>\r
+               public MapMessage(IBM.XMS.IMapMessage message)\r
+                       : base(message)\r
+               {\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region IMapMessage Members\r
+\r
+               public Apache.NMS.IPrimitiveMap Body\r
+               {\r
+                       get { return this; }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region IPrimitiveMap Members\r
+\r
+               #region General methods\r
+\r
+               /// <summary>\r
+               /// Clears the contents of the message body.\r
+               /// </summary>\r
+               public void Clear()\r
+               {\r
+                       try\r
+                       {\r
+                               this.ReadOnlyBody = false;\r
+                               this.xmsMapMessage.ClearBody();\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Checks if the body contains the specified item.\r
+               /// </summary>\r
+               /// <param name="key">Item key.</param>\r
+               public bool Contains(object key)\r
+               {\r
+                       try\r
+                       {\r
+                               return this.xmsMapMessage.ItemExists(key.ToString());\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               return false;\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Removes an item from the map message body.\r
+               /// </summary>\r
+               /// <param name="key">Item key.</param>\r
+               public void Remove(object key)\r
+               {\r
+                       try\r
+                       {\r
+                               // Best guess at equivalent implementation.\r
+                               this.xmsMapMessage.SetObject(key.ToString(), null);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Count of key/value pairs in the message body.\r
+               /// </summary>\r
+               public int Count\r
+               {\r
+                       get\r
+                       {\r
+                               int count = 0;\r
+\r
+                               try\r
+                               {\r
+                                       IEnumerator mapNames = this.xmsMapMessage.MapNames;\r
+                                       while(mapNames.MoveNext())\r
+                                       {\r
+                                               count++;\r
+                                       }\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               }\r
+\r
+                               return count;\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The collection of keys in the mep message body.\r
+               /// </summary>\r
+               public ICollection Keys\r
+               {\r
+                       get\r
+                       {\r
+                               ArrayList keys = new ArrayList();\r
+\r
+                               try\r
+                               {\r
+                                       IEnumerator mapNames = this.xmsMapMessage.MapNames;\r
+                                       while(mapNames.MoveNext())\r
+                                       {\r
+                                               keys.Add(mapNames.Current);\r
+                                       }\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               }\r
+\r
+                               return keys;\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// The collection of values in the mep message body.\r
+               /// </summary>\r
+               public ICollection Values\r
+               {\r
+                       get\r
+                       {\r
+                               ArrayList values = new ArrayList();\r
+\r
+                               try\r
+                               {\r
+                                       IEnumerator mapNames = this.xmsMapMessage.MapNames;\r
+                                       while(mapNames.MoveNext())\r
+                                       {\r
+                                               string key = (string)mapNames.Current;\r
+                                               values.Add(this.xmsMapMessage.GetObject(key));\r
+                                       }\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               }\r
+\r
+                               return values;\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Accesses an item by its key.\r
+               /// </summary>\r
+               /// <param name="key">Item key.</param>\r
+               public object this[string key]\r
+               {\r
+                       get\r
+                       {\r
+                               try\r
+                               {\r
+                                       return this.xmsMapMessage.GetObject(key);\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                                       return null;\r
+                               }\r
+                       }\r
+                       set\r
+                       {\r
+                               try\r
+                               {\r
+                                       this.xmsMapMessage.SetObject(key, value);\r
+                               }\r
+                               catch(Exception ex)\r
+                               {\r
+                                       ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               }\r
+                       }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region String items\r
+\r
+               /// <summary>\r
+               /// Gets the value of a <c>string</c> item.\r
+               /// </summary>\r
+               /// <param name="key">Item key.</param>\r
+               /// <returns>Item value.</returns>\r
+               public string GetString(string key)\r
+               {\r
+                       try\r
+                       {\r
+                               return this.xmsMapMessage.GetString(key);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               return null;\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Sets the value of a <c>string</c> item.\r
+               /// </summary>\r
+               /// <param name="key">Item key.</param>\r
+               /// <param name="value">Item value.</param>\r
+               public void SetString(string key, string value)\r
+               {\r
+                       try\r
+                       {\r
+                               this.xmsMapMessage.SetString(key, value);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                       }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region Boolean items\r
+\r
+               /// <summary>\r
+               /// Gets the value of a <c>bool</c> item.\r
+               /// </summary>\r
+               /// <param name="key">Item key.</param>\r
+               /// <returns>Item value.</returns>\r
+               public bool GetBool(string key)\r
+               {\r
+                       try\r
+                       {\r
+                               return this.xmsMapMessage.GetBoolean(key);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                               return false;\r
+                       }\r
+               }\r
+\r
+               /// <summary>\r
+               /// Sets the value of a <c>bool</c> item.\r
+               /// </summary>\r
+               /// <param name="key">Item key.</param>\r
+               /// <param name="value">Item value.</param>\r
+               public void SetBool(string key, bool value)\r
+               {\r
+                       try\r
+                       {\r
+                               this.xmsMapMessage.SetBoolean(key, value);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r
+                               ExceptionUtil.WrapAndThrowNMSException(ex);\r
+                       }\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region Byte items\r
+\r
+               /// <summary>\r
+               /// Gets the value of a <c>byte</c> item.\r
+               /// </summary>\r
+               /// <param name="key">Item key.</param>\r
+               /// <returns>Item value.</returns>\r
+               public byte GetByte(string key)\r
+               {\r
+                       try\r
+                       {\r
+                               return this.xmsMapMessage.GetByte(key);\r
+                       }\r
+                       catch(Exception ex)\r
+                       {\r