svn commit: r1760211 [12/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/RedeliveryPolicyTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/RedeliveryPolicyTest.cs?rev=1760211=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/RedeliveryPolicyTest.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/RedeliveryPolicyTest.cs Sat Sep 10 23:09:20 2016 @@ -0,0 +1,135 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using Apache.NMS.Policies; +using NUnit.Framework; + +namespace Apache.NMS.Test +{ +[TestFixture] +public class RedeliveryPolicyTest +{ +[Test] +public void Executes_redelivery_policy_with_backoff_enabled_correctly() +{ +RedeliveryPolicy policy = new RedeliveryPolicy(); + +policy.BackOffMultiplier = 2; +policy.InitialRedeliveryDelay = 5; +policy.UseExponentialBackOff = true; + +// simulate a retry of 10 times +Assert.IsTrue(policy.RedeliveryDelay(0) == 0, "redelivery delay not 5 is " + policy.RedeliveryDelay(0)); +Assert.IsTrue(policy.RedeliveryDelay(1) == 5, "redelivery delay not 10 is " + policy.RedeliveryDelay(1)); +Assert.IsTrue(policy.RedeliveryDelay(2) == 10, "redelivery delay not 20 is " + policy.RedeliveryDelay(2)); +Assert.IsTrue(policy.RedeliveryDelay(3) == 20, "redelivery delay not 40 is " + policy.RedeliveryDelay(3)); +Assert.IsTrue(policy.RedeliveryDelay(4) == 40, "redelivery delay not 80 is " + policy.RedeliveryDelay(4)); +Assert.IsTrue(policy.RedeliveryDelay(5) == 80, "redelivery delay not 160 is " + policy.RedeliveryDelay(5)); +Assert.IsTrue(policy.RedeliveryDelay(6) == 160, "redelivery delay not 320 is " + policy.RedeliveryDelay(6)); +Assert.IsTrue(policy.RedeliveryDelay(7) == 320, "redelivery delay not 640 is " + policy.RedeliveryDelay(7)); +Assert.IsTrue(policy.RedeliveryDelay(8) == 640, "redelivery delay not 1280 is " + policy.RedeliveryDelay(8)); +Assert.IsTrue(policy.RedeliveryDelay(9) == 1280, "redelivery delay not 2560 is " + policy.RedeliveryDelay(9)); +} + +[Test] +public void Executes_redelivery_policy_with_backoff_of_3_enabled_correctly() +{ +RedeliveryPolicy policy = new RedeliveryPolicy(); + +policy.BackOffMultiplier = 3; +policy.InitialRedeliveryDelay = 3; +policy.UseExponentialBackOff = true; + +// simulate a retry of 10 times +Assert.IsTrue(policy.RedeliveryDelay(0) == 0, "redelivery delay not 5 is " + policy.RedeliveryDelay(0)); +Assert.IsTrue(policy.RedeliveryDelay(1) == 3, "redelivery delay not 10 is " + policy.RedeliveryDelay(1)); +Assert.IsTrue(policy.RedeliveryDelay(2) == 9, "redelivery delay not 20 is " + policy.RedeliveryDelay(2)); +Assert.IsTrue(policy.RedeliveryDelay(3) == 27, "redelivery delay not 40 is " + policy.RedeliveryDelay(3)); +Assert.IsTrue(policy.RedeliveryDelay(4) == 81, "redelivery delay not 80 is " + policy.RedeliveryDelay(4)); +Assert.IsTrue(policy.RedeliveryDelay(5) == 243, "redelivery delay not 160 is " + policy.RedeliveryDelay(5)); +Assert.IsTrue(policy.RedeliveryDelay(6) == 729, "redelivery delay not 320 is " + policy.RedeliveryDelay(6)); +Assert.IsTrue(policy.RedeliveryDelay(7) == 2187, "redelivery delay not 640 is " + policy.RedeliveryDelay(7)); +Assert.IsTrue(policy.RedeliveryDelay(8) == 6561, "redelivery delay not 1280 is " + policy.RedeliveryDelay(8)); +Assert.IsTrue(policy.RedeliveryDelay(9) == 19683, "redelivery delay not 2560 is " + policy.RedeliveryDelay(9)); +} + +[Test] +public void Executes_redelivery_policy_without_backoff_enabled_correctly() +{ +RedeliveryPolicy policy = new RedeliveryPolicy(); + +policy.InitialRedeliveryDelay = 5; + +// simulate a retry of 10 times +
svn commit: r1760211 [5/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ParseException.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ParseException.cs?rev=1760211=1760210=1760211=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ParseException.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ParseException.cs Sat Sep 10 23:09:20 2016 @@ -1,197 +1,197 @@ -/* Generated By:CSharpCC: Do not edit this line. ParseException.cs Version 3.2 */ -/// -/// This exception is thrown when parse errors are encountered. -/// -/// -/// You can explicitly create objects of this exception type by -/// calling the method GenerateParseException in the generated -/// parser. -/// -/// You can modify this class to customize your error reporting -/// mechanisms so long as you retain the public fields. -/// -/// -public class ParseException : System.Exception { - - /** - * This constructor is used by the method "GenerateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: result of getMessage - */ - public ParseException(Token currentTokenVal, -int[][] expectedTokenSequencesVal, -string[] tokenImageVal - ) : base("") { -specialConstructor = true; -currentToken = currentTokenVal; -expectedTokenSequences = expectedTokenSequencesVal; -tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Exception". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The CSharpCC generated code does not use - * these constructors. - */ - - public ParseException() : -base() { -specialConstructor = false; - } - - public ParseException(string message) : -base(message) { -specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected bool specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public string[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public override string Message { -get { - if (!specialConstructor) { -return base.Message; - } - string expected = ""; - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.Length; i++) { -if (maxSize < expectedTokenSequences[i].Length) { - maxSize = expectedTokenSequences[i].Length; -} -for (int j = 0; j < expectedTokenSequences[i].Length; j++) { - expected += tokenImage[expectedTokenSequences[i][j]] + " "; -} -if (expectedTokenSequences[i][expectedTokenSequences[i].Length - 1] != 0) { - expected += "..."; -} -expected += eol + ""; - } - string retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize;
svn commit: r1760211 [3/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/NonFilteringMessageReader.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/NonFilteringMessageReader.cs?rev=1760211=1760210=1760211=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/NonFilteringMessageReader.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/NonFilteringMessageReader.cs Sat Sep 10 23:09:20 2016 @@ -1,128 +1,128 @@ -using System; -using System.Messaging; -using Apache.NMS.MSMQ; -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace Apache.NMS.MSMQ.Readers -{ -/// -/// MSMQ message reader, returning all messages, without filtering. -/// - public class NonFilteringMessageReader : AbstractMessageReader - { -/// -/// Constructor. -/// -/// The MSMQ message queue from which -/// messages will be read. -/// A message converter for mapping -/// MSMQ messages to NMS messages. -public NonFilteringMessageReader(MessageQueue messageQueue, -IMessageConverter messageConverter) -: base(messageQueue, messageConverter) -{ -} - -/// -/// Returns without removing (peeks) the first message in the queue -/// referenced by this MessageQueue matching the selection criteria. -/// The Peek method is synchronous, so it blocks the current thread -/// until a message becomes available. -/// -/// Peeked message. -public override IMessage Peek() -{ -return Convert(messageQueue.Peek()); -} - -/// -/// Returns without removing (peeks) the first message in the queue -/// referenced by this MessageQueue matching the selection criteria. -/// The Peek method is synchronous, so it blocks the current thread -/// until a message becomes available or the specified time-out occurs. -/// -/// Reception time-out. -/// Peeked message. -public override IMessage Peek(TimeSpan timeSpan) -{ -return Convert(messageQueue.Peek(timeSpan)); -} - -/// -/// Receives the first message available in the queue referenced by -/// the MessageQueue matching the selection criteria. -/// This call is synchronous, and blocks the current thread of execution -/// until a message is available. -/// -/// Received message. -public override IMessage Receive() -{ -return Convert(messageQueue.Receive()); -} - -/// -/// Receives the first message available in the queue referenced by the -/// MessageQueue matching the selection criteria, and waits until either -/// a message is available in the queue, or the time-out expires. -/// -/// Reception time-out. -/// Received message. -public override IMessage Receive(TimeSpan timeSpan) -{ -return Convert(messageQueue.Receive(timeSpan)); -} - -/// -/// Receives the first message available in the transactional queue -/// referenced by the MessageQueue matching the selection criteria. -/// This call is synchronous, and blocks the current thread of execution -/// until a message is available. -/// -/// Transaction. -/// Received message. -public override IMessage Receive(MessageQueueTransaction transaction) -{ -return Convert(messageQueue.Receive(transaction)); -} - -/// -/// Receives the first message available in the transactional queue -/// referenced by the MessageQueue matching the selection criteria, -/// and waits until either a message is available in the queue, or the -/// time-out expires. -/// -/// Reception time-out. -/// Transaction. -/// Received message. -public
svn commit: r1760211 [8/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/Token.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/Token.cs?rev=1760211=1760210=1760211=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/Token.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/Token.cs Sat Sep 10 23:09:20 2016 @@ -1,78 +1,78 @@ -/* Generated By:CSharpCC: Do not edit this line. Token.cs Version 3.0 */ -/// -/// Describes the input token stream. -/// - -public class Token { - - /// - /// Gets an integer that describes the kind of this token. - /// - /// - /// This numbering system is determined by CSharpCCParser, and - /// a table of these numbers is stored in the class . - /// - public int kind; - - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; - - /** - * The string image of the token. - */ - public string image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * Returns the image. - */ - public override string ToString() { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * - *case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. - */ - public static Token NewToken(int ofKind) { - switch(ofKind) { - default : return new Token(); - } - } - -} +/* Generated By:CSharpCC: Do not edit this line. Token.cs Version 3.0 */ +/// +/// Describes the input token stream. +/// + +public class Token { + + /// + /// Gets an integer that describes the kind of this token. + /// + /// + /// This numbering system is determined by CSharpCCParser, and + /// a table of these numbers is stored in the class . + /// + public int kind; + + /** + * beginLine and beginColumn describe the position of the first character + * of this token; endLine and endColumn describe the position of the + * last character of this token. + */ + public int beginLine, beginColumn, endLine, endColumn; + + /** + * The string image of the token. + */ + public string image; + + /** + * A reference to the next regular (non-special) token from the input + * stream. If this is the last token from the input stream, or if the + * token manager has not read tokens beyond this one, this field is + * set to null. This is true only if this token is also a regular + * token. Otherwise, see below for a description of the contents of + * this field. + */ + public Token next; + + /** + * This field is used to access special tokens that occur prior to this + * token, but after the immediately preceding regular (non-special) token. + * If there are no such special tokens, this field is set to null. + * When there are more than one such special token, this field refers + * to the last of these special tokens, which in turn refers to the next + * previous special token through its specialToken field, and so on + * until the first special token (whose specialToken field is null). + * The next fields of special tokens refer to other special
svn commit: r1760211 [4/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterExpression.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterExpression.cs?rev=1760211=1760210=1760211=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterExpression.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterExpression.cs Sat Sep 10 23:09:20 2016 @@ -1,42 +1,41 @@ -using System; -/** - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace Apache.NMS.Selector -{ -/// -/// A filter performing a greater than comparison of two expressions. -/// -public class GreaterExpression : ComparisonExpression -{ -protected override string ExpressionSymbol -{ -get { return ">"; } -} - -public GreaterExpression(IExpression left, IExpression right) -: base(left, right) -{ -} - -public override bool AsBoolean(int? compared) -{ -return compared.HasValue ? compared.Value > 0 : false; -} -} -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System; + +namespace Apache.NMS.Selector +{ +/// +/// A filter performing a greater than comparison of two expressions. +/// +public class GreaterExpression : ComparisonExpression +{ +protected override string ExpressionSymbol +{ +get { return ">"; } +} + +public GreaterExpression(IExpression left, IExpression right) +: base(left, right) +{ +} + +public override bool AsBoolean(int? compared) +{ +return compared.HasValue ? compared.Value > 0 : false; +} +} +} Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterOrEqualExpression.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterOrEqualExpression.cs?rev=1760211=1760210=1760211=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterOrEqualExpression.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterOrEqualExpression.cs Sat Sep 10 23:09:20 2016 @@ -1,43 +1,42 @@ -using System; -/** - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace Apache.NMS.Selector -{ -/// -/// A filter performing a greater than or
svn commit: r1760211 [10/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/EndianBinaryWriterTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/EndianBinaryWriterTest.cs?rev=1760211=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/EndianBinaryWriterTest.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/EndianBinaryWriterTest.cs Sat Sep 10 23:09:20 2016 @@ -0,0 +1,202 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using Apache.NMS.Util; +using NUnit.Framework; + +namespace Apache.NMS.Test +{ + [TestFixture] + public class EndianBinaryWriterTest + { + void writeString16TestHelper(char[] input, byte[] expect) + { + MemoryStream stream = new MemoryStream(); + EndianBinaryWriter writer = new EndianBinaryWriter(stream); + + String str = new String(input); + + writer.WriteString16(str); + + byte[] result = stream.GetBuffer(); + + Assert.AreEqual(result[0], 0x00); + Assert.AreEqual(result[1], expect.Length); + + for(int i = 4; i < expect.Length; ++i) + { + Assert.AreEqual(result[i], expect[i - 2]); + } + } + + [Test] + public void testWriteString16_1byteUTF8encoding() + { + // Test data with 1-byte UTF8 encoding. + char[] input = { '\u', '\u000B', '\u0048', '\u0065', '\u006C', '\u006C', '\u006F', '\u0020', '\u0057', '\u006F', '\u0072', '\u006C', '\u0064' }; + byte[] expect = { 0xC0, 0x80, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64 }; + + writeString16TestHelper(input, expect); + } + + [Test] + public void testWriteString16_2byteUTF8encoding() + { + // Test data with 2-byte UT8 encoding. + char[] input = { '\u', '\u00C2', '\u00A9', '\u00C3', '\u00A6' }; + byte[] expect = { 0xC0, 0x80, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC2, 0xA6 }; + + writeString16TestHelper(input, expect); + } + + [Test] + public void testWriteString16_1byteAnd2byteEmbeddedNULLs() + { + // Test data with 1-byte and 2-byte encoding with embedded NULL's. + char[] input = { '\u', '\u0004', '\u00C2', '\u00A9', '\u00C3', '\u', '\u00A6' }; + byte[] expect = { 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 }; + + writeString16TestHelper(input, expect); + } + + [Test] + public void testWriteString16_nullstring() + { + // test that a null string writes no output. + MemoryStream stream = new MemoryStream(); + EndianBinaryWriter writer = new EndianBinaryWriter(stream); + writer.WriteString16(null); + Assert.AreEqual(0, stream.Length); + } + + [Test] + public void testWriteString16_emptystring() + { + // test that a null string writes no output. + MemoryStream stream = new MemoryStream(); + EndianBinaryWriter writer = new EndianBinaryWriter(stream); + writer.WriteString16(""); + + stream.Seek(0, SeekOrigin.Begin); + EndianBinaryReader reader = new EndianBinaryReader(stream); + Assert.AreEqual(0, reader.ReadInt16()); + } + + [Test] +
svn commit: r1760211 [6/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParser.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParser.cs?rev=1760211=1760210=1760211=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParser.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParser.cs Sat Sep 10 23:09:20 2016 @@ -1,1172 +1,1171 @@ -/* Generated By:CSharpCC: Do not edit this line. SelectorParser.cs */ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -using System; -using System.IO; -using System.Text; -using System.Collections; - -using Apache.NMS; - -namespace Apache.NMS.Selector -{ -/// -/// JMS Selector Parser generated by https://github.com/deveel/csharpcc;>CSharpCC -/// -/// Do not edit this .cs file directly - it is autogenerated from SelectorParser.csc -/// using csharpcc.exe -UNICODE_INPUT=true SelectorParser.csc. -/// -/// SelectorParser.csc is adapted from -/// https://raw.githubusercontent.com/apache/activemq/activemq-4.0/activemq-core/src/main/grammar/SelectorParser.jj;> -/// ActiveMQ 4.0 SelectorParser.jj -/// -public class SelectorParser : SelectorParserConstants { - -public SelectorParser() -: this(new StringReader("")) -{ -} - -public IBooleanExpression Parse(string selector) -{ -this.ReInit(new StringReader(selector)); - -try -{ -return this.JmsSelector(); -} -catch(Exception e) -{ -throw new InvalidSelectorException(selector, e); -} -} - -private IBooleanExpression AsBooleanExpression(IExpression value) -{ -if(value is IBooleanExpression) -{ -return (IBooleanExpression)value; -} -if(value is PropertyExpression) -{ -return UnaryExpression.CreateBooleanCast(value); -} -throw new ParseException("IExpression will not result in a boolean value: " + value); -} - -// -// Grammar -// - public IBooleanExpression JmsSelector() { -IExpression left = null; -left = GetOrExpression(); -{return AsBooleanExpression(left);} -throw new Exception("Missing return statement in function"); - } - - public IExpression GetOrExpression() { -IExpression left; -IExpression right; -left = GetAndExpression(); -while (true) { - switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) { - case OR: -; -break; - default: -goto label_1; - } - mcc_consume_token(OR); - right = GetAndExpression(); -left = LogicExpression.CreateOR(AsBooleanExpression(left), AsBooleanExpression(right)); -}label_1: ; - -{return left;} -throw new Exception("Missing return statement in function"); - } - - public IExpression GetAndExpression() { -IExpression left; -IExpression right; -left = GetEqualityExpression(); -while (true) { - switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) { - case AND: -; -break; - default: -goto label_2; - } - mcc_consume_token(AND); - right = GetEqualityExpression(); -left = LogicExpression.CreateAND(AsBooleanExpression(left), AsBooleanExpression(right)); -}label_2: ; - -{return left;} -throw new Exception("Missing return statement in function"); - } - - public IExpression GetEqualityExpression() { -IExpression left; -IExpression right; -left = GetComparisonExpression(); -while (true) { - switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) { - case IS: - case 28: - case 29: -; -break; - default: -goto label_3; - } - switch
svn commit: r1760211 [9/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/Commands/StreamMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/Commands/StreamMessage.cs?rev=1760211=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/Commands/StreamMessage.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/Commands/StreamMessage.cs Sat Sep 10 23:09:20 2016 @@ -0,0 +1,901 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using System.Collections; + +using Apache.NMS; +using Apache.NMS.Util; + +namespace Apache.NMS.Commands +{ +public class StreamMessage : Message, IStreamMessage +{ +private EndianBinaryReader dataIn = null; +private EndianBinaryWriter dataOut = null; +private MemoryStream byteBuffer = null; +private int bytesRemaining = -1; + +public bool ReadBoolean() +{ +InitializeReading(); + +try +{ +long startingPos = this.byteBuffer.Position; +try +{ +int type = this.dataIn.ReadByte(); + +if(type == PrimitiveMap.BOOLEAN_TYPE) +{ +return this.dataIn.ReadBoolean(); +} +else if(type == PrimitiveMap.STRING_TYPE) +{ +return Boolean.Parse(this.dataIn.ReadString16()); +} +else if(type == PrimitiveMap.NULL) +{ +this.byteBuffer.Seek(startingPos, SeekOrigin.Begin); +throw new NMSException("Cannot convert Null type to a bool"); +} +else +{ +this.byteBuffer.Seek(startingPos, SeekOrigin.Begin); +throw new MessageFormatException("Value is not a Boolean type."); +} +} +catch(FormatException e) +{ +this.byteBuffer.Seek(startingPos, SeekOrigin.Begin); +throw NMSExceptionSupport.CreateMessageFormatException(e); +} +} +catch(EndOfStreamException e) +{ +throw NMSExceptionSupport.CreateMessageEOFException(e); +} +catch(IOException e) +{ +throw NMSExceptionSupport.CreateMessageFormatException(e); +} +} + +public byte ReadByte() +{ +InitializeReading(); + +try +{ +long startingPos = this.byteBuffer.Position; +try +{ +int type = this.dataIn.ReadByte(); + +if(type == PrimitiveMap.BYTE_TYPE) +{ +return this.dataIn.ReadByte(); +} +else if(type == PrimitiveMap.STRING_TYPE) +{ +return Byte.Parse(this.dataIn.ReadString16()); +} +else if(type == PrimitiveMap.NULL) +{ +this.byteBuffer.Seek(startingPos, SeekOrigin.Begin); +throw new NMSException("Cannot convert Null type to a byte"); +} +else +{ +this.byteBuffer.Seek(startingPos, SeekOrigin.Begin); +throw new MessageFormatException("Value is not a Byte type."); +} +} +catch(FormatException e) +{ +this.byteBuffer.Seek(startingPos, SeekOrigin.Begin); +throw NMSExceptionSupport.CreateMessageFormatException(e); +} +} +catch(EndOfStreamException e) +{ +throw NMSExceptionSupport.CreateMessageEOFException(e); +
svn commit: r1760211 [11/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/MapMessageTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/MapMessageTest.cs?rev=1760211=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/MapMessageTest.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/test/csharp/MapMessageTest.cs Sat Sep 10 23:09:20 2016 @@ -0,0 +1,208 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System; +using System.Collections; +using Apache.NMS.Util; +using NUnit.Framework; + +namespace Apache.NMS.Test +{ + //[TestFixture] + public class MapMessageTest : NMSTest + { + protected bool a = true; + protected byte b = 123; + protected char c = 'c'; + protected short d = 0x1234; + protected int e = 0x12345678; + protected long f = 0x1234567812345678; + protected string g = "Hello World!"; + protected bool h = false; + protected byte i = 0xFF; + protected short j = -0x1234; + protected int k = -0x12345678; + protected long l = -0x1234567812345678; + protected float m = 2.1F; + protected double n = 2.3; + protected byte[] o = {1, 2, 3, 4, 5}; + + protected MapMessageTest(NMSTestSupport testSupport) + : base(testSupport) + { + } + + //[Test] + public virtual void TestSendReceiveMapMessage( + //[Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)] + MsgDeliveryMode deliveryMode, string testDestRef) + { + using(IConnection connection = CreateConnection(GetTestClientId())) + { + connection.Start(); + using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)) + { + IDestination destination = GetClearDestinationByNodeReference(session, testDestRef); + using(IMessageConsumer consumer = session.CreateConsumer(destination)) + using(IMessageProducer producer = session.CreateProducer(destination)) + { + producer.DeliveryMode = deliveryMode; + IMapMessage request = session.CreateMapMessage(); + request.Body["a"] = a; + request.Body["b"] = b; + request.Body["c"] = c; + request.Body["d"] = d; + request.Body["e"] = e; + request.Body["f"] = f; + request.Body["g"] = g; + request.Body["h"] = h; + request.Body["i"] = i; + request.Body["j"] = j; + request.Body["k"] = k; + request.Body["l"] = l; + request.Body["m"] = m; + request.Body["n"] = n; + request.Body["o"] = o; + producer.Send(request); + + IMapMessage message = consumer.Receive(receiveTimeout) as IMapMessage; + Assert.IsNotNull(message, "No message returned!"); +
svn commit: r1760211 [7/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs?rev=1760211=1760210=1760211=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs Sat Sep 10 23:09:20 2016 @@ -1,1042 +1,1041 @@ -/* Generated By:CSharpCC: Do not edit this line. SelectorParserTokenManager.cs */ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -using System; -using System.IO; -using System.Text; -using System.Collections; -using Apache.NMS; - -public class SelectorParserTokenManager : SelectorParserConstants { - public System.IO.TextWriter debugStream = Console.Out; - public void SetDebugStream(System.IO.TextWriter ds) { debugStream = ds; } -private int mccStopAtPos(int pos, int kind) -{ - mccmatchedKind = kind; - mccmatchedPos = pos; - return pos + 1; -} -private int mccMoveStringLiteralDfa0_0() -{ - switch((int)curChar) { - case 9: - mccmatchedKind = 2; - return mccMoveNfa_0(5, 0); - case 10: - mccmatchedKind = 3; - return mccMoveNfa_0(5, 0); - case 12: - mccmatchedKind = 5; - return mccMoveNfa_0(5, 0); - case 13: - mccmatchedKind = 4; - return mccMoveNfa_0(5, 0); - case 32: - mccmatchedKind = 1; - return mccMoveNfa_0(5, 0); - case 37: - mccmatchedKind = 41; - return mccMoveNfa_0(5, 0); - case 40: - mccmatchedKind = 34; - return mccMoveNfa_0(5, 0); - case 41: - mccmatchedKind = 36; - return mccMoveNfa_0(5, 0); - case 42: - mccmatchedKind = 39; - return mccMoveNfa_0(5, 0); - case 43: - mccmatchedKind = 37; - return mccMoveNfa_0(5, 0); - case 44: - mccmatchedKind = 35; - return mccMoveNfa_0(5, 0); - case 45: - mccmatchedKind = 38; - return mccMoveNfa_0(5, 0); - case 47: - mccmatchedKind = 40; - return mccMoveNfa_0(5, 0); - case 60: - mccmatchedKind = 32; - return mccMoveStringLiteralDfa1_0(9126805504L); - case 61: - mccmatchedKind = 28; - return mccMoveNfa_0(5, 0); - case 62: - mccmatchedKind = 30; - return mccMoveStringLiteralDfa1_0(2147483648L); - case 65: - return mccMoveStringLiteralDfa1_0(512L); - case 66: - return mccMoveStringLiteralDfa1_0(2048L); - case 69: - return mccMoveStringLiteralDfa1_0(8192L); - case 70: - return mccMoveStringLiteralDfa1_0(131072L); - case 73: - return mccMoveStringLiteralDfa1_0(49152L); - case 76: - return mccMoveStringLiteralDfa1_0(4096L); - case 78: - return mccMoveStringLiteralDfa1_0(262400L); - case 79: - return mccMoveStringLiteralDfa1_0(1024L); - case 84: - return mccMoveStringLiteralDfa1_0(65536L); - case 88: - return mccMoveStringLiteralDfa1_0(1572864L); - case 97: - return mccMoveStringLiteralDfa1_0(512L); - case 98: - return mccMoveStringLiteralDfa1_0(2048L); - case 101: - return mccMoveStringLiteralDfa1_0(8192L); - case 102: - return mccMoveStringLiteralDfa1_0(131072L); - case 105: - return mccMoveStringLiteralDfa1_0(49152L); - case 108: - return mccMoveStringLiteralDfa1_0(4096L); - case 110: - return mccMoveStringLiteralDfa1_0(262400L); - case 111: - return mccMoveStringLiteralDfa1_0(1024L); - case 116: - return mccMoveStringLiteralDfa1_0(65536L); - case 120: - return mccMoveStringLiteralDfa1_0(1572864L); - default : - return mccMoveNfa_0(5, 0); - } -} -private int mccMoveStringLiteralDfa1_0(long active0) -{ - try { curChar = input_stream.ReadChar(); } -
svn commit: r1760211 [2/12] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/ src/test/csharp/ src/test/csharp/Commands/
Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/ByCorrelationIdMessageReader.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/ByCorrelationIdMessageReader.cs?rev=1760211=1760210=1760211=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/ByCorrelationIdMessageReader.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/ByCorrelationIdMessageReader.cs Sat Sep 10 23:09:20 2016 @@ -1,139 +1,139 @@ -using System; -using System.Messaging; -using Apache.NMS.MSMQ; -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace Apache.NMS.MSMQ.Readers -{ -/// -/// MSMQ message reader, returning messages matching the specified -/// message identifier. -/// - public class ByCorrelationIdMessageReader : AbstractMessageReader - { -private string correlationId; - -/// -/// Constructor. -/// -/// The MSMQ message queue from which -/// messages will be read. -/// A message converter for mapping -/// MSMQ messages to NMS messages. -/// The correlation identifier of messages -/// to be read. -public ByCorrelationIdMessageReader(MessageQueue messageQueue, -IMessageConverter messageConverter, string correlationId) -: base(messageQueue, messageConverter) -{ -this.correlationId = correlationId; -} - -/// -/// Returns without removing (peeks) the first message in the queue -/// referenced by this MessageQueue matching the selection criteria. -/// The Peek method is synchronous, so it blocks the current thread -/// until a message becomes available. -/// -/// Peeked message. -public override IMessage Peek() -{ -return Convert(messageQueue.PeekByCorrelationId(correlationId)); -} - -/// -/// Returns without removing (peeks) the first message in the queue -/// referenced by this MessageQueue matching the selection criteria. -/// The Peek method is synchronous, so it blocks the current thread -/// until a message becomes available or the specified time-out occurs. -/// -/// Reception time-out. -/// Peeked message. -public override IMessage Peek(TimeSpan timeSpan) -{ -return Convert(messageQueue.PeekByCorrelationId(correlationId, -timeSpan)); -} - -/// -/// Receives the first message available in the queue referenced by -/// the MessageQueue matching the selection criteria. -/// This call is synchronous, and blocks the current thread of execution -/// until a message is available. -/// -/// Received message. -public override IMessage Receive() -{ -return Convert(messageQueue.ReceiveByCorrelationId(correlationId)); -} - -/// -/// Receives the first message available in the queue referenced by the -/// MessageQueue matching the selection criteria, and waits until either -/// a message is available in the queue, or the time-out expires. -/// -/// Reception time-out. -/// Received message. -public override IMessage Receive(TimeSpan timeSpan) -{ -return Convert(messageQueue.ReceiveByCorrelationId(correlationId, -timeSpan)); -} - -/// -/// Receives the first message available in the transactional queue -/// referenced by the MessageQueue matching the selection criteria. -/// This call is synchronous, and blocks the current thread of execution -/// until a message is available. -/// -/// Transaction. -/// Received message. -public override IMessage Receive(MessageQueueTransaction transaction) -{ -return Convert(messageQueue.ReceiveByCorrelationId(correlationId, -
svn commit: r1751831 [4/4] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/
Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs?rev=1751831=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs Thu Jul 7 20:47:10 2016 @@ -0,0 +1,1042 @@ +/* Generated By:CSharpCC: Do not edit this line. SelectorParserTokenManager.cs */ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System; +using System.IO; +using System.Text; +using System.Collections; +using Apache.NMS; + +public class SelectorParserTokenManager : SelectorParserConstants { + public System.IO.TextWriter debugStream = Console.Out; + public void SetDebugStream(System.IO.TextWriter ds) { debugStream = ds; } +private int mccStopAtPos(int pos, int kind) +{ + mccmatchedKind = kind; + mccmatchedPos = pos; + return pos + 1; +} +private int mccMoveStringLiteralDfa0_0() +{ + switch((int)curChar) { + case 9: + mccmatchedKind = 2; + return mccMoveNfa_0(5, 0); + case 10: + mccmatchedKind = 3; + return mccMoveNfa_0(5, 0); + case 12: + mccmatchedKind = 5; + return mccMoveNfa_0(5, 0); + case 13: + mccmatchedKind = 4; + return mccMoveNfa_0(5, 0); + case 32: + mccmatchedKind = 1; + return mccMoveNfa_0(5, 0); + case 37: + mccmatchedKind = 41; + return mccMoveNfa_0(5, 0); + case 40: + mccmatchedKind = 34; + return mccMoveNfa_0(5, 0); + case 41: + mccmatchedKind = 36; + return mccMoveNfa_0(5, 0); + case 42: + mccmatchedKind = 39; + return mccMoveNfa_0(5, 0); + case 43: + mccmatchedKind = 37; + return mccMoveNfa_0(5, 0); + case 44: + mccmatchedKind = 35; + return mccMoveNfa_0(5, 0); + case 45: + mccmatchedKind = 38; + return mccMoveNfa_0(5, 0); + case 47: + mccmatchedKind = 40; + return mccMoveNfa_0(5, 0); + case 60: + mccmatchedKind = 32; + return mccMoveStringLiteralDfa1_0(9126805504L); + case 61: + mccmatchedKind = 28; + return mccMoveNfa_0(5, 0); + case 62: + mccmatchedKind = 30; + return mccMoveStringLiteralDfa1_0(2147483648L); + case 65: + return mccMoveStringLiteralDfa1_0(512L); + case 66: + return mccMoveStringLiteralDfa1_0(2048L); + case 69: + return mccMoveStringLiteralDfa1_0(8192L); + case 70: + return mccMoveStringLiteralDfa1_0(131072L); + case 73: + return mccMoveStringLiteralDfa1_0(49152L); + case 76: + return mccMoveStringLiteralDfa1_0(4096L); + case 78: + return mccMoveStringLiteralDfa1_0(262400L); + case 79: + return mccMoveStringLiteralDfa1_0(1024L); + case 84: + return mccMoveStringLiteralDfa1_0(65536L); + case 88: + return mccMoveStringLiteralDfa1_0(1572864L); + case 97: + return mccMoveStringLiteralDfa1_0(512L); + case 98: + return mccMoveStringLiteralDfa1_0(2048L); + case 101: + return mccMoveStringLiteralDfa1_0(8192L); + case 102: + return mccMoveStringLiteralDfa1_0(131072L); + case 105: + return mccMoveStringLiteralDfa1_0(49152L); + case 108: + return mccMoveStringLiteralDfa1_0(4096L); + case 110: + return mccMoveStringLiteralDfa1_0(262400L); + case 111: + return mccMoveStringLiteralDfa1_0(1024L); + case 116: + return mccMoveStringLiteralDfa1_0(65536L); + case 120: + return mccMoveStringLiteralDfa1_0(1572864L); + default : + return mccMoveNfa_0(5, 0); + } +} +private int mccMoveStringLiteralDfa1_0(long active0) +{ + try { curChar = input_stream.ReadChar(); } + catch(System.IO.IOException) { + return
svn commit: r1751831 [2/4] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/
Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/IMessageReader.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/IMessageReader.cs?rev=1751831=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/IMessageReader.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/IMessageReader.cs Thu Jul 7 20:47:10 2016 @@ -0,0 +1,93 @@ +using System; +using System.Messaging; +using Apache.NMS.MSMQ; +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Apache.NMS.MSMQ.Readers +{ +/// +/// MSMQ message reader. +/// + public interface IMessageReader + { +/// +/// Returns without removing (peeks) the first message in the queue +/// referenced by this MessageQueue matching the selection criteria. +/// The Peek method is synchronous, so it blocks the current thread +/// until a message becomes available. +/// +/// Peeked message. +IMessage Peek(); + +/// +/// Returns without removing (peeks) the first message in the queue +/// referenced by this MessageQueue matching the selection criteria. +/// The Peek method is synchronous, so it blocks the current thread +/// until a message becomes available or the specified time-out occurs. +/// +/// Reception time-out. +/// Peeked message. +IMessage Peek(TimeSpan timeSpan); + +/// +/// Receives the first message available in the queue referenced by +/// the MessageQueue matching the selection criteria. +/// This call is synchronous, and blocks the current thread of execution +/// until a message is available. +/// +/// Received message. +IMessage Receive(); + +/// +/// Receives the first message available in the queue referenced by the +/// MessageQueue matching the selection criteria, and waits until either +/// a message is available in the queue, or the time-out expires. +/// +/// Reception time-out. +/// Received message. +IMessage Receive(TimeSpan timeSpan); + +/// +/// Receives the first message available in the transactional queue +/// referenced by the MessageQueue matching the selection criteria. +/// This call is synchronous, and blocks the current thread of execution +/// until a message is available. +/// +/// Transaction. +/// Received message. +IMessage Receive(MessageQueueTransaction transaction); + +/// +/// Receives the first message available in the transactional queue +/// referenced by the MessageQueue matching the selection criteria, +/// and waits until either a message is available in the queue, or the +/// time-out expires. +/// +/// Reception time-out. +/// Transaction. +/// Received message. +IMessage Receive(TimeSpan timeSpan, MessageQueueTransaction transaction); + +/// +/// Checks if an MSMQ message matches the selection criteria. +/// +/// MSMQ message. +/// true if the message matches the selection criteria. +bool Matches(Message message); + } +} Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/MessageReaderUtil.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/MessageReaderUtil.cs?rev=1751831=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/MessageReaderUtil.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/MessageReaderUtil.cs Thu Jul 7 20:47:10 2016 @@ -0,0 +1,91 @@ +using System; +using System.Messaging; +using System.Globalization; +using System.Text.RegularExpressions; +/* + * Licensed to the Apache Software
svn commit: r1751831 [3/4] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/
Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/MinusExpression.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/MinusExpression.cs?rev=1751831=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/MinusExpression.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/MinusExpression.cs Thu Jul 7 20:47:10 2016 @@ -0,0 +1,67 @@ +using System; +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Apache.NMS.Selector +{ +/// +/// A filter performing a substraction of two expressions. +/// +public class MinusExpression : ArithmeticExpression +{ +protected override string ExpressionSymbol +{ +get { return "-"; } +} + +public MinusExpression(IExpression left, IExpression right) +: base(left, right) +{ +} + +public override object Evaluate(MessageEvaluationContext message) +{ +object lvalue = Left.Evaluate(message); +if(lvalue == null) return null; + +object rvalue = Right.Evaluate(message); +if(rvalue == null) return null; + +AlignedNumericValues values = new AlignedNumericValues(lvalue, rvalue); + +object result = null; + +switch(values.TypeEnum) +{ +case AlignedNumericValues.T.SByteType : result = (sbyte )values.Left - (sbyte )values.Right; break; +case AlignedNumericValues.T.ByteType : result = (byte )values.Left - (byte )values.Right; break; +case AlignedNumericValues.T.CharType : result = (char )values.Left - (char )values.Right; break; +case AlignedNumericValues.T.ShortType : result = (short )values.Left - (short )values.Right; break; +case AlignedNumericValues.T.UShortType: result = (ushort)values.Left - (ushort)values.Right; break; +case AlignedNumericValues.T.IntType : result = (int )values.Left - (int )values.Right; break; +case AlignedNumericValues.T.UIntType : result = (uint )values.Left - (uint )values.Right; break; +case AlignedNumericValues.T.LongType : result = (long )values.Left - (long )values.Right; break; +case AlignedNumericValues.T.ULongType : result = (ulong )values.Left - (ulong )values.Right; break; +case AlignedNumericValues.T.FloatType : result = (float )values.Left - (float )values.Right; break; +case AlignedNumericValues.T.DoubleType: result = (double)values.Left - (double)values.Right; break; +} + +return result; +} +} +} Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ModExpression.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ModExpression.cs?rev=1751831=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ModExpression.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ModExpression.cs Thu Jul 7 20:47:10 2016 @@ -0,0 +1,67 @@ +using System; +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing
svn commit: r1751831 [1/4] - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: ./ src/main/csharp/ src/main/csharp/Readers/ src/main/csharp/Selector/
Author: jgomes Date: Thu Jul 7 20:47:10 2016 New Revision: 1751831 URL: http://svn.apache.org/viewvc?rev=1751831=rev Log: Apply patch for AMQNET-554. Suport for message properties, and selectors. Thanks Stephane Ramet! Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/IMessageConverterEx.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/AbstractMessageReader.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/ByCorrelationIdMessageReader.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/ByIdMessageReader.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/ByLookupIdMessageReader.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/BySelectorMessageReader.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/IMessageReader.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/MessageReaderUtil.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Readers/NonFilteringMessageReader.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ANDExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/AlignedNumericValues.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ArithmeticExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/BinaryExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/BooleanCastExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/BooleanConstantExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/BooleanUnaryExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ComparisonExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ConstantExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/DivideExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/EqualExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/GreaterOrEqualExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/IBooleanExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/IExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/InExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/IsNullExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/LesserExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/LesserOrEqualExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/LikeExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/LogicExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/MessageEvaluationContext.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/MinusExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ModExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/MultiplyExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/NOTExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/NegateExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ORExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/ParseException.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/PlusExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/PropertyExpression.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParser.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParser.csc activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserConstants.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SelectorParserTokenManager.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/SimpleCharStream.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector/Token.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Selector
svn commit: r1735811 - /activemq/activemq-dotnet/Apache.NMS/trunk/vs2010-nms-net2.0.csproj
Author: jgomes Date: Sat Mar 19 21:01:49 2016 New Revision: 1735811 URL: http://svn.apache.org/viewvc?rev=1735811=rev Log: Remove unused post-build statements. Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2010-nms-net2.0.csproj Modified: activemq/activemq-dotnet/Apache.NMS/trunk/vs2010-nms-net2.0.csproj URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/vs2010-nms-net2.0.csproj?rev=1735811=1735810=1735811=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/vs2010-nms-net2.0.csproj (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/vs2010-nms-net2.0.csproj Sat Mar 19 21:01:49 2016 @@ -164,12 +164,7 @@ -if /i "$(build_extraplatforms)" equ "true" ( -cd $(ProjectDir) -nant -nologo -q $(buildtype) -D:build.framework.strings="netcf-2.0,netcf-3.5,mono-2.0" -) - -if /i "$(install_skip)" equ "true" ( +if /i "$(install_skip)" equ "true" ( echo Skipping install... goto :installskip )
svn commit: r1724526 - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: src/main/csharp/QueueBrowser.cs src/main/csharp/Session.cs vs2008-msmq.csproj
Author: jgomes Date: Wed Jan 13 23:24:08 2016 New Revision: 1724526 URL: http://svn.apache.org/viewvc?rev=1724526=rev Log: Applied patch from Stephane Ramet to implement QueueBrowser and DeleteDestination. Thanks Stephane! Fixes [AMQNET-517]. (See https://issues.apache.org/jira/browse/AMQNET-517) Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/QueueBrowser.cs Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/vs2008-msmq.csproj Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/QueueBrowser.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/QueueBrowser.cs?rev=1724526=auto == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/QueueBrowser.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/QueueBrowser.cs Wed Jan 13 23:24:08 2016 @@ -0,0 +1,141 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System; +using System.Collections; +using System.Messaging; +using Apache.NMS; +using Apache.NMS.Util; + +namespace Apache.NMS.MSMQ +{ + public class QueueBrowser : Apache.NMS.IQueueBrowser + { + private bool closed = false; + private bool disposed = false; + +private readonly Session session; +private MessageQueue messageQueue; + + public QueueBrowser(Session session, MessageQueue messageQueue) + { +this.session = session; +this.messageQueue = messageQueue; +if(null != this.messageQueue) +{ +this.messageQueue.MessageReadPropertyFilter.SetAll(); +} + + } + + ~QueueBrowser() + { + Dispose(false); + } + + #region IDisposable Members + + /// + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected void Dispose(bool disposing) + { + if(disposed) + { + return; + } + + if(disposing) + { + // Dispose managed code here. + } + + try + { + Close(); + } + catch + { + // Ignore errors. + } + + disposed = true; + } + + #endregion + + public void Close() + { +if(messageQueue != null) +{ +messageQueue.Dispose(); +messageQueue = null; +} + closed = true; + } + + public string MessageSelector + { + get { throw new NotSupportedException(); } + } + + public IQueue Queue + { + get { return new Queue(this.messageQueue.Path); } + } + + internal class Enumerator : IEnumerator + { + private readonly Session session; + private readonly MessageEnumerator innerEnumerator; + + public Enumerator(Session session, MessageQueue messageQueue) + { + this.session = session; + this.innerEnumerator = messageQueue.GetMessageEnumerator2(); + } + + public object Current + { +
svn commit: r1724527 - /activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/QueueBrowser.cs
Author: jgomes Date: Wed Jan 13 23:24:44 2016 New Revision: 1724527 URL: http://svn.apache.org/viewvc?rev=1724527=rev Log: Applied patch from Stephane Ramet to implement QueueBrowser. Thanks Stephane! Fixes [AMQNET-517]. (See https://issues.apache.org/jira/browse/AMQNET-517) Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/QueueBrowser.cs Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/QueueBrowser.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/QueueBrowser.cs?rev=1724527=1724526=1724527=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/QueueBrowser.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/QueueBrowser.cs Wed Jan 13 23:24:44 2016 @@ -107,12 +107,37 @@ namespace Apache.NMS.EMS get { return EMSConvert.ToNMSQueue(this.tibcoQueueBrowser.Queue); } } + internal class Enumerator : IEnumerator + { + private IEnumerator innerEnumerator; + + public Enumerator(IEnumerator innerEnumerator) + { + this.innerEnumerator = innerEnumerator; + } + + public object Current + { + get + { + return EMSConvert.ToNMSMessage((TIBCO.EMS.Message)this.innerEnumerator.Current); + } + } + + public bool MoveNext() + { + return this.innerEnumerator.MoveNext(); + } + + public void Reset() + { + this.innerEnumerator.Reset(); + } + } + public IEnumerator GetEnumerator() { - // TODO: This enumerator will need to be adapted. As it is now, the low-level EMS - // objects will be enumerated. We need to wrap these objects into the NMS interface - // types to fit into the provider agnostic system. - return this.tibcoQueueBrowser.GetEnumerator(); + return new Enumerator(this.tibcoQueueBrowser.GetEnumerator()); } } }
svn commit: r1724524 - /activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/_TODO_.txt
Author: jgomes Date: Wed Jan 13 23:08:12 2016 New Revision: 1724524 URL: http://svn.apache.org/viewvc?rev=1724524=rev Log: Remove TODO text file. Removed: activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/_TODO_.txt
svn commit: r1723216 - in /activemq/activemq-dotnet/Apache.NMS.XMS: ./ trunk/
Author: jgomes Date: Wed Jan 6 01:54:30 2016 New Revision: 1723216 URL: http://svn.apache.org/viewvc?rev=1723216=rev Log: Creating new project for IBM WebSphere MQ provider. Fixes [AMQNET-185]. (See https://issues.apache.org/jira/browse/AMQNET-185) Added: activemq/activemq-dotnet/Apache.NMS.XMS/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/
svn commit: r1723219 - /activemq/activemq-dotnet/Apache.NMS.XMS/tags/
Author: jgomes Date: Wed Jan 6 01:55:35 2016 New Revision: 1723219 URL: http://svn.apache.org/viewvc?rev=1723219=rev Log: (empty) Added: activemq/activemq-dotnet/Apache.NMS.XMS/tags/
svn commit: r1723218 - /activemq/activemq-dotnet/Apache.NMS.XMS/branches/
Author: jgomes Date: Wed Jan 6 01:55:17 2016 New Revision: 1723218 URL: http://svn.apache.org/viewvc?rev=1723218=rev Log: (empty) Added: activemq/activemq-dotnet/Apache.NMS.XMS/branches/
svn commit: r1723221 [1/11] - in /activemq/activemq-dotnet/Apache.NMS.XMS/trunk: ./ keyfile/ src/ src/main/ src/main/csharp/ src/main/csharp/Util/ src/main/ndoc/ src/main/sandcastle/ src/test/ src/tes
Author: jgomes Date: Wed Jan 6 02:19:56 2016 New Revision: 1723221 URL: http://svn.apache.org/viewvc?rev=1723221=rev Log: Initial check-in of new Apache.NMS.XMS provider implementation. Big thanks to Stéphane Ramet for the implementation! Fixes [AMQNET-185]. (See https://issues.apache.org/jira/browse/AMQNET-185) Added: activemq/activemq-dotnet/Apache.NMS.XMS/trunk/Apache.NMS.XMS.Test.nunit activemq/activemq-dotnet/Apache.NMS.XMS/trunk/LICENSE.txt activemq/activemq-dotnet/Apache.NMS.XMS/trunk/NOTICE.txt activemq/activemq-dotnet/Apache.NMS.XMS/trunk/README.txt activemq/activemq-dotnet/Apache.NMS.XMS/trunk/keyfile/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/keyfile/NMSKey.snk (with props) activemq/activemq-dotnet/Apache.NMS.XMS/trunk/nant-common.xml activemq/activemq-dotnet/Apache.NMS.XMS/trunk/nant.build activemq/activemq-dotnet/Apache.NMS.XMS/trunk/package.ps1 activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/ (with props) activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/BytesMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Connection.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/ConnectionFactory.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/ConnectionMetaData.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Destination.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/InitialContext.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/MapMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Message.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/MessageProducer.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/MessageProperties.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/ObjectMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Queue.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/QueueBrowser.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Session.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/StreamMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/TemporaryQueue.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/TemporaryTopic.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/TextMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Topic.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Util/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Util/Dispatcher.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Util/ExceptionUtil.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Util/IntrospectionSupport.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Util/UriAttributeAttribute.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Util/XMSConvert.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/Util/XMSEnum.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/_TODO_.txt activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/ndoc/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/ndoc/NamespaceSummary.xml activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/sandcastle/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/sandcastle/feedback_content.xml activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/ (with props) activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/AsyncConsumeTest.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/BadConsumeTest.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/BytesMessageTest.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/BytesMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/Destination.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/MapMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/Message.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/ObjectMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/Queue.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/StreamMessage.cs activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/Commands/TempDestination.cs activemq/activemq
svn commit: r1723221 [4/11] - in /activemq/activemq-dotnet/Apache.NMS.XMS/trunk: ./ keyfile/ src/ src/main/ src/main/csharp/ src/main/csharp/Util/ src/main/ndoc/ src/main/sandcastle/ src/test/ src/tes
Added: activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/MapMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/MapMessage.cs?rev=1723221=auto == --- activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/MapMessage.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/MapMessage.cs Wed Jan 6 02:19:56 2016 @@ -0,0 +1,719 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System; +using System.Collections; +using Apache.NMS; +using Apache.NMS.Util; +using Apache.NMS.XMS.Util; +using IBM.XMS; + +namespace Apache.NMS.XMS +{ + /// + /// Represents a map message which contains key and value pairs which are + /// of primitive types. + /// + class MapMessage : Apache.NMS.XMS.Message, Apache.NMS.IMapMessage, + Apache.NMS.IPrimitiveMap + { + #region Constructors and access to internal map message + + /// + /// Internal IBM XMS map message. + /// + public IBM.XMS.IMapMessage xmsMapMessage + { + get { return (IBM.XMS.IMapMessage)(this.xmsMessage); } + set { this.xmsMessage = value; } + } + + /// + /// Constructs a MapMessage object. + /// + /// XMS map message. + public MapMessage(IBM.XMS.IMapMessage message) + : base(message) + { + } + + #endregion + + #region IMapMessage Members + + public Apache.NMS.IPrimitiveMap Body + { + get { return this; } + } + + #endregion + + #region IPrimitiveMap Members + + #region General methods + + /// + /// Clears the contents of the message body. + /// + public void Clear() + { + try + { + this.ReadOnlyBody = false; + this.xmsMapMessage.ClearBody(); + } + catch(Exception ex) + { + ExceptionUtil.WrapAndThrowNMSException(ex); + } + } + + /// + /// Checks if the body contains the specified item. + /// + /// Item key. + public bool Contains(object key) + { + try + { + return this.xmsMapMessage.ItemExists(key.ToString()); + } + catch(Exception ex) + { + ExceptionUtil.WrapAndThrowNMSException(ex); + return false; + } + } + + /// + /// Removes an item from the map message body. + /// + /// Item key. + public void Remove(object key) + { + try + { + // Best guess at equivalent implementation. + this.xmsMapMessage.SetObject(key.ToString(), null); + } + catch(Exception ex) + { + ExceptionUtil.WrapAndThrowNMSException(ex); + } + } + + /// + /// Count of key/value pairs in the message body. + /// + public int Count + { + get + { + int count = 0; + + try + { + IEnumerator mapNames = this.xmsMapMessage.MapNames; +
svn commit: r1723221 [3/11] - in /activemq/activemq-dotnet/Apache.NMS.XMS/trunk: ./ keyfile/ src/ src/main/ src/main/csharp/ src/main/csharp/Util/ src/main/ndoc/ src/main/sandcastle/ src/test/ src/tes
Added: activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/ConnectionFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/ConnectionFactory.cs?rev=1723221=auto == --- activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/ConnectionFactory.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/main/csharp/ConnectionFactory.cs Wed Jan 6 02:19:56 2016 @@ -0,0 +1,1502 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +using System; +using System.Collections; +using System.Collections.Specialized; +using Apache.NMS.XMS.Util; +using Apache.NMS.Policies; +using Apache.NMS.Util; +using IBM.XMS; + +namespace Apache.NMS.XMS +{ + /// + /// A Factory that can establish NMS connections to IBM MQ. + /// + /// + /// XMS connection factories can either be created from definitions + /// administered in a repository ("administered object"), or created + /// from an XMSFactoryFactory. + /// + /// Addressable repositories for administered objects are: + /// - file system context + /// (URL format: "file://Path"). + /// - LDAP context + /// (URL format: "ldap:[Hostname][:Port]["/"[DistinguishedName]]"). + /// - WSS context: + /// (URL format: "http://Url;, "cosnaming://Url" or "wsvc://Url"). + /// + /// A non-administered object is instanciated for a specific protocol: + /// - WebSphere Application Server Service Integration Bus + /// (protocol prefix: "wpm:"; XMS key: XMSC.CT_WPM). + /// - IBM Integration Bus using WebSphere MQ Real-Time Transport + /// (protocol prefix: "rtt:"; XMS key: XMSC.CT_RTT). + /// - WebSphere MQ queue manager + /// (protocol prefix: "wmq:"; XMS key: XMSC.CT_WMQ). + /// + public class ConnectionFactory : Apache.NMS.IConnectionFactory + { + public IBM.XMS.IConnectionFactory xmsConnectionFactory = null; + + private Uri brokerUri = null; + private IRedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy(); + + #region Constructors + + /// + /// Constructs a ConnectionFactory object using default values. + /// + public ConnectionFactory() + : this(new Uri("xms:wmq:")) + { + } + + /// + /// Constructs a ConnectionFactory object. + /// + /// Factory URI. + public ConnectionFactory(Uri brokerUri) + { + try + { + // BrokerUri will construct the xmsConnectionFactory + this.BrokerUri = brokerUri; + } + catch(Exception ex) + { + Apache.NMS.Tracer.DebugFormat( + "Exception instantiating IBM.XMS.ConnectionFactory: {0}", + ex.Message); + ExceptionUtil.WrapAndThrowNMSException(ex); + } + // In case WrapAndThrowNMSException masks the exception + if(this.xmsConnectionFactory == null) + { + throw new Apache.NMS.NMSException( + "Error instantiating XMS connection factory object."); + } + } + + /// + /// Constructs the internal ConnectionFactory object from the + /// parameters specified in the input URI. + /// + /// Factory URI. + /// URI stripped out from overridable property values. + /// + private Uri CreateConnectionFactoryFromURI(Uri factoryUri) + { + try + { + // Remove "xms:" scheme
svn commit: r1723221 [9/11] - in /activemq/activemq-dotnet/Apache.NMS.XMS/trunk: ./ keyfile/ src/ src/main/ src/main/csharp/ src/main/csharp/Util/ src/main/ndoc/ src/main/sandcastle/ src/test/ src/tes
Added: activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/EndianBinaryWriterTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/EndianBinaryWriterTest.cs?rev=1723221=auto == --- activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/EndianBinaryWriterTest.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.XMS/trunk/src/test/csharp/EndianBinaryWriterTest.cs Wed Jan 6 02:19:56 2016 @@ -0,0 +1,202 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using Apache.NMS.Util; +using NUnit.Framework; + +namespace Apache.NMS.Test +{ + [TestFixture] + public class EndianBinaryWriterTest + { + void writeString16TestHelper(char[] input, byte[] expect) + { + MemoryStream stream = new MemoryStream(); + EndianBinaryWriter writer = new EndianBinaryWriter(stream); + + String str = new String(input); + + writer.WriteString16(str); + + byte[] result = stream.GetBuffer(); + + Assert.AreEqual(result[0], 0x00); + Assert.AreEqual(result[1], expect.Length); + + for(int i = 4; i < expect.Length; ++i) + { + Assert.AreEqual(result[i], expect[i - 2]); + } + } + + [Test] + public void testWriteString16_1byteUTF8encoding() + { + // Test data with 1-byte UTF8 encoding. + char[] input = { '\u', '\u000B', '\u0048', '\u0065', '\u006C', '\u006C', '\u006F', '\u0020', '\u0057', '\u006F', '\u0072', '\u006C', '\u0064' }; + byte[] expect = { 0xC0, 0x80, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64 }; + + writeString16TestHelper(input, expect); + } + + [Test] + public void testWriteString16_2byteUTF8encoding() + { + // Test data with 2-byte UT8 encoding. + char[] input = { '\u', '\u00C2', '\u00A9', '\u00C3', '\u00A6' }; + byte[] expect = { 0xC0, 0x80, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC2, 0xA6 }; + + writeString16TestHelper(input, expect); + } + + [Test] + public void testWriteString16_1byteAnd2byteEmbeddedNULLs() + { + // Test data with 1-byte and 2-byte encoding with embedded NULL's. + char[] input = { '\u', '\u0004', '\u00C2', '\u00A9', '\u00C3', '\u', '\u00A6' }; + byte[] expect = { 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 }; + + writeString16TestHelper(input, expect); + } + + [Test] + public void testWriteString16_nullstring() + { + // test that a null string writes no output. + MemoryStream stream = new MemoryStream(); + EndianBinaryWriter writer = new EndianBinaryWriter(stream); + writer.WriteString16(null); + Assert.AreEqual(0, stream.Length); + } + + [Test] + public void testWriteString16_emptystring() + { + // test that a null string writes no output. + MemoryStream stream = new MemoryStream(); + EndianBinaryWriter writer = new EndianBinaryWriter(stream); + writer.WriteString16(""); + + stream.Seek(0, SeekOrigin.Begin); + EndianBinaryReader reader = new EndianBinaryReader(stream); + Assert.AreEqual(0, reader.ReadInt16()); + } + + [Test] + [ExpectedException(typeof(IOException))]
svn commit: r1721977 - /activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/
Author: jgomes Date: Mon Dec 28 18:40:53 2015 New Revision: 1721977 URL: http://svn.apache.org/viewvc?rev=1721977=rev Log: Update ignore folders/files. Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/ (props changed) Propchange: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/ -- --- svn:ignore (original) +++ svn:ignore Mon Dec 28 18:40:53 2015 @@ -5,3 +5,5 @@ lib package test-results vs2008-mqtt.userprefs +obj +*.suo
svn commit: r1719510 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x: nant.build package.ps1
Author: jgomes Date: Fri Dec 11 19:48:37 2015 New Revision: 1719510 URL: http://svn.apache.org/viewvc?rev=1719510=rev Log: Update to Apache.NMS 1.7.2. Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/package.ps1 Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build?rev=1719510=1719509=1719510=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build Fri Dec 11 19:48:37 2015 @@ -22,7 +22,7 @@ - + @@ -46,7 +46,7 @@ - + Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/package.ps1 URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/package.ps1?rev=1719510=1719509=1719510=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/package.ps1 (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/package.ps1 Fri Dec 11 19:48:37 2015 @@ -14,7 +14,7 @@ # limitations under the License. $pkgname = "Apache.NMS.Stomp" -$pkgver = "1.6-SNAPSHOT" +$pkgver = "1.7-SNAPSHOT" $configurations = "release", "debug" $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
svn commit: r1719508 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1: nant.build package.ps1
Author: jgomes Date: Fri Dec 11 19:47:27 2015 New Revision: 1719508 URL: http://svn.apache.org/viewvc?rev=1719508=rev Log: Remove SNAPSHOT tags. Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/nant.build activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/package.ps1 Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/nant.build?rev=1719508=1719507=1719508=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/nant.build Fri Dec 11 19:47:27 2015 @@ -23,7 +23,7 @@ - + Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/package.ps1 URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/package.ps1?rev=1719508=1719507=1719508=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/package.ps1 (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/package.ps1 Fri Dec 11 19:47:27 2015 @@ -14,7 +14,7 @@ # limitations under the License. $pkgname = "Apache.NMS.Stomp" -$pkgver = "1.6-SNAPSHOT" +$pkgver = "1.7.1" $configurations = "release", "debug" $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
svn commit: r1719511 - /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/package.ps1
Author: jgomes Date: Fri Dec 11 19:49:19 2015 New Revision: 1719511 URL: http://svn.apache.org/viewvc?rev=1719511=rev Log: Update to package script to 1.8-SNAPSHOT. Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/package.ps1 Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/package.ps1 URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/package.ps1?rev=1719511=1719510=1719511=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/package.ps1 (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/package.ps1 Fri Dec 11 19:49:19 2015 @@ -14,7 +14,7 @@ # limitations under the License. $pkgname = "Apache.NMS.Stomp" -$pkgver = "1.6-SNAPSHOT" +$pkgver = "1.8-SNAPSHOT" $configurations = "release", "debug" $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0", "netcf-2.0"
svn commit: r1719505 - /activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/
Author: jgomes Date: Fri Dec 11 19:34:18 2015 New Revision: 1719505 URL: http://svn.apache.org/viewvc?rev=1719505=rev Log: Branching Apache.NMS.Stomp 1.7.1. Added: activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/ (props changed) - copied from r1719504, activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/ Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/ -- --- svn:ignore (added) +++ svn:ignore Fri Dec 11 19:34:18 2015 @@ -0,0 +1,11 @@ +*.suo +.project +.settings +build +lib +obj +package +vs2008-stomp-test.pidb +vs2008-stomp.pidb +vs2008-stomp.userprefs +TestResult.xml Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/tags/1.7.1/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Fri Dec 11 19:34:18 2015 @@ -0,0 +1 @@ +/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x:1135832,1137086,1294897,1295259,1374470,1375156,1375292,1376784
svn commit: r1708656 - in /activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x: ./ src/main/csharp/ConnectionFactory.cs
Author: jgomes Date: Wed Oct 14 17:22:44 2015 New Revision: 1708656 URL: http://svn.apache.org/viewvc?rev=1708656=rev Log: Merged revision(s) 1708655 from activemq/activemq-dotnet/Apache.NMS.EMS/trunk: Update existing TIBCO factory connection when changing the exception settings. Refactor the parsing of connection URL into single function. Fixes [AMQNET-511]. (See https://issues.apache.org/jira/browse/AMQNET-511) Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ (props changed) activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs Propchange: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Oct 14 17:22:44 2015 @@ -1,2 +1,2 @@ /activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.5.x:1172914 -/activemq/activemq-dotnet/Apache.NMS.EMS/trunk:1705382,1707414 +/activemq/activemq-dotnet/Apache.NMS.EMS/trunk:1705382,1707414,1708655 Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs?rev=1708656=1708655=1708656=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs Wed Oct 14 17:22:44 2015 @@ -89,11 +89,9 @@ namespace Apache.NMS.EMS { try { - this.brokerUri = ParseUriProperties(serverUrl); - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), clientId, properties); this.clientId = clientId; this.properties = properties; - ConfigureConnectionFactory(); + this.BrokerUri = serverUrl; } catch(Exception ex) { @@ -133,13 +131,21 @@ namespace Apache.NMS.EMS public bool ExceptionOnFTEvents { get { return this.exceptionOnFTEvents; } - set { this.exceptionOnFTEvents = value; } + set + { + this.exceptionOnFTEvents = value; + TIBCO.EMS.Tibems.SetExceptionOnFTEvents(value); + } } public bool ExceptionOnFTSwitch { get { return this.exceptionOnFTSwitch; } - set { this.exceptionOnFTSwitch = value; } + set + { + this.exceptionOnFTSwitch = value; + TIBCO.EMS.Tibems.SetExceptionOnFTSwitch(value); + } } public int ConnAttemptCount @@ -251,19 +257,21 @@ namespace Apache.NMS.EMS } else { + string brokerPath = TrimParens(this.brokerUri.AbsolutePath); + if(null == this.clientId) { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath)); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(brokerPath); } else { if(null == this.properties) { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), this.clientId); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(brokerPath, this.clientId); } else { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), this.clientId
svn commit: r1708655 - /activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs
Author: jgomes Date: Wed Oct 14 17:21:47 2015 New Revision: 1708655 URL: http://svn.apache.org/viewvc?rev=1708655=rev Log: Update existing TIBCO factory connection when changing the exception settings. Refactor the parsing of connection URL into single function. Fixes [AMQNET-511]. (See https://issues.apache.org/jira/browse/AMQNET-511) Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs?rev=1708655=1708654=1708655=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs Wed Oct 14 17:21:47 2015 @@ -89,11 +89,9 @@ namespace Apache.NMS.EMS { try { - this.brokerUri = ParseUriProperties(serverUrl); - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), clientId, properties); this.clientId = clientId; this.properties = properties; - ConfigureConnectionFactory(); + this.BrokerUri = serverUrl; } catch(Exception ex) { @@ -133,13 +131,21 @@ namespace Apache.NMS.EMS public bool ExceptionOnFTEvents { get { return this.exceptionOnFTEvents; } - set { this.exceptionOnFTEvents = value; } + set + { + this.exceptionOnFTEvents = value; + TIBCO.EMS.Tibems.SetExceptionOnFTEvents(value); + } } public bool ExceptionOnFTSwitch { get { return this.exceptionOnFTSwitch; } - set { this.exceptionOnFTSwitch = value; } + set + { + this.exceptionOnFTSwitch = value; + TIBCO.EMS.Tibems.SetExceptionOnFTSwitch(value); + } } public int ConnAttemptCount @@ -251,19 +257,21 @@ namespace Apache.NMS.EMS } else { + string brokerPath = TrimParens(this.brokerUri.AbsolutePath); + if(null == this.clientId) { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath)); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(brokerPath); } else { if(null == this.properties) { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), this.clientId); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(brokerPath, this.clientId); } else { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), this.clientId, this.properties); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(brokerPath, this.clientId, this.properties); } } }
svn commit: r1707414 - in /activemq/activemq-dotnet/Apache.NMS.EMS/trunk: nant.build package.ps1 vs2008-ems-test.csproj vs2008-ems.csproj vs2008-ems.sln vs2013-ems-test.csproj vs2013-ems.csproj vs2013
Author: jgomes Date: Wed Oct 7 22:52:39 2015 New Revision: 1707414 URL: http://svn.apache.org/viewvc?rev=1707414=rev Log: Update to .NET 4.0. Update to TIBCO EMS 8.2.0 client assembly reference. Fixes [AMQNET-512]. (See https://issues.apache.org/jira/browse/AMQNET-512) Added: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems-test.csproj - copied, changed from r1707112, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems-test.csproj activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems.csproj - copied, changed from r1707112, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems.csproj activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems.sln - copied, changed from r1707112, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems.sln Removed: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems-test.csproj activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems.csproj activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems.sln Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build activemq/activemq-dotnet/Apache.NMS.EMS/trunk/package.ps1 Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build?rev=1707414=1707413=1707414=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build Wed Oct 7 22:52:39 2015 @@ -44,6 +44,8 @@ + + - + Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/package.ps1 URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/package.ps1?rev=1707414=1707413=1707414=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/package.ps1 (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/package.ps1 Wed Oct 7 22:52:39 2015 @@ -14,9 +14,9 @@ # limitations under the License. $pkgname = "Apache.NMS.EMS" -$pkgver = "1.6-SNAPSHOT" +$pkgver = "1.8-SNAPSHOT" $configurations = "release", "debug" -$frameworks = "net-2.0", "net-3.5", "net-4.0" +$frameworks = "net-4.0" write-progress "Creating package directory." "Initializing..." if(!(test-path package)) @@ -43,16 +43,8 @@ if(test-path build) zip -9 -u "$zipfile" "$framework\$configuration\nmsprovider*.config" zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll" zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.xml" - if($framework -ieq "mono-2.0") - { - zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll.mdb" - zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll.mdb" - } - else - { - zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb" - zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb" - } + zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb" + zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb" } } @@ -63,7 +55,7 @@ write-progress "Packaging Source code fi $pkgdir = "package" $zipfile = "$pkgdir\$pkgname-$pkgver-src.zip" -zip -9 -u "$zipfile" LICENSE.txt NOTICE.txt nant-common.xml nant.build package.ps1 vs2008-ems-test.csproj vs2008-ems.csproj vs2008-ems.sln +zip -9 -u "$zipfile" LICENSE.txt NOTICE.txt nant-common.xml nant.build package.ps1 vs2013-ems-test.csproj vs2013-ems.csproj vs2013-ems.sln zip -9 -u -r "$zipfile" keyfile src write-progress -Completed "Packaging" "Complete." Copied: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems-test.csproj (from r1707112, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems-test.csproj) URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems-test.csproj?p2=activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems-test.csproj=activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems-test.csproj=1707112=1707414=1707414=diff =
svn commit: r1707416 - in /activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x: ./ nant.build package.ps1 vs2008-ems-test.csproj vs2008-ems.csproj vs2008-ems.sln vs2013-ems-test.csproj vs2013-ems.c
Author: jgomes Date: Wed Oct 7 23:04:08 2015 New Revision: 1707416 URL: http://svn.apache.org/viewvc?rev=1707416=rev Log: Merged revision(s) 1707414 from activemq/activemq-dotnet/Apache.NMS.EMS/trunk: Update to .NET 4.0. Update to TIBCO EMS 8.2.0 client assembly reference. Fixes [AMQNET-512]. (See https://issues.apache.org/jira/browse/AMQNET-512) Added: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/vs2013-ems-test.csproj - copied unchanged from r1707414, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems-test.csproj activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/vs2013-ems.csproj (props changed) - copied unchanged from r1707414, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems.csproj activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/vs2013-ems.sln (props changed) - copied unchanged from r1707414, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2013-ems.sln Removed: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/vs2008-ems-test.csproj activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/vs2008-ems.csproj activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/vs2008-ems.sln Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ (props changed) activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/package.ps1 Propchange: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Oct 7 23:04:08 2015 @@ -1,2 +1,2 @@ /activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.5.x:1172914 -/activemq/activemq-dotnet/Apache.NMS.EMS/trunk:1705382 +/activemq/activemq-dotnet/Apache.NMS.EMS/trunk:1705382,1707414 Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build?rev=1707416=1707415=1707416=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build Wed Oct 7 23:04:08 2015 @@ -44,6 +44,8 @@ + + - + Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/package.ps1 URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/package.ps1?rev=1707416=1707415=1707416=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/package.ps1 (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/package.ps1 Wed Oct 7 23:04:08 2015 @@ -14,9 +14,9 @@ # limitations under the License. $pkgname = "Apache.NMS.EMS" -$pkgver = "1.6-SNAPSHOT" +$pkgver = "1.7-SNAPSHOT" $configurations = "release", "debug" -$frameworks = "net-2.0", "net-3.5", "net-4.0" +$frameworks = "net-4.0" write-progress "Creating package directory." "Initializing..." if(!(test-path package)) @@ -43,16 +43,8 @@ if(test-path build) zip -9 -u "$zipfile" "$framework\$configuration\nmsprovider*.config" zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll" zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.xml" - if($framework -ieq "mono-2.0") - { - zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.dll.mdb" - zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.dll.mdb" - } - else - { - zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb" - zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb" - } + zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.pdb" + zip -9 -u "$zipfile" "$framework\$configuration\$pkgname.Test.pdb" } } @@ -63,7 +55,7 @@ write-progress "Packaging Source code fi $pkgdir = "package" $zipfile = "$pkgdir\$pkgname-$pkgver-src.zip" -zip -9 -u "$zipfile" LICENSE.txt NOTICE.txt nant-common.xml nant.build package.ps1 vs2008-ems-test.csproj vs2008-ems.csproj vs2008-ems.sln +zip -9 -u "$zipfile" LICENSE.txt NOTICE.txt nant-common.xml nant.build package.ps1 vs2013-ems-test.csproj vs2013-ems.csproj vs2013-ems.sln zip -9 -u -r "$zipfile" keyfile src write-progress -Completed "Packaging" "Complete."
svn commit: r1705384 - in /activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x: ./ src/main/csharp/ConnectionFactory.cs src/main/csharp/IntrospectionSupport.cs vs2008-ems.csproj
Author: jgomes Date: Fri Sep 25 23:20:28 2015 New Revision: 1705384 URL: http://svn.apache.org/viewvc?rev=1705384=rev Log: Merged revision(s) 1705382 from activemq/activemq-dotnet/Apache.NMS.EMS/trunk: Add calls to TIBCO API to turn on failover mode. Add support for URL parameters: connection.ExceptionOnFTEvents connection.ExceptionOnFTSwitch connection.ConnAttemptCount connection.ConnAttemptDelay connection.ConnAttemptTimeout connection.ReconnAttemptCount connection.ReconnAttemptDelay connection.ReconnAttemptTimeout Fixes [AMQNET-511]. (See https://issues.apache.org/jira/browse/AMQNET-511) Added: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/IntrospectionSupport.cs - copied unchanged from r1705382, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/IntrospectionSupport.cs Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ (props changed) activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/vs2008-ems.csproj (contents, props changed) Propchange: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Sep 25 23:20:28 2015 @@ -1 +1,2 @@ /activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.5.x:1172914 +/activemq/activemq-dotnet/Apache.NMS.EMS/trunk:1705382 Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs?rev=1705384=1705383=1705384=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs Fri Sep 25 23:20:28 2015 @@ -17,7 +17,10 @@ using System; using System.Collections; +using System.Collections.Specialized; +using Apache.NMS.EMS.Util; using Apache.NMS.Policies; +using Apache.NMS.Util; namespace Apache.NMS.EMS { @@ -30,6 +33,14 @@ namespace Apache.NMS.EMS private Uri brokerUri; private string clientId; private Hashtable properties; + private bool exceptionOnFTEvents = true; + private bool exceptionOnFTSwitch = true; + private int connAttemptCount = Int32.MaxValue; // Infinite + private int connAttemptDelay = 3;// 30 seconds + private int connAttemptTimeout = 5000; // 5 seconds + private int reconnAttemptCount = Int32.MaxValue; // Infinite + private int reconnAttemptDelay = 3; // 30 seconds + private int reconnAttemptTimeout = 5000; // 5 seconds private IRedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy(); @@ -38,6 +49,7 @@ namespace Apache.NMS.EMS try { this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(); + ConfigureConnectionFactory(); } catch(Exception ex) { @@ -77,10 +89,11 @@ namespace Apache.NMS.EMS { try { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(serverUrl.AbsolutePath, clientId, properties); - this.brokerUri = serverUrl; + this.brokerUri = ParseUriProperties(serverUrl); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), clientId, properties); this.clientId = clientId; this.properties = properties; + ConfigureConnectionFactory(); } catch(Exception ex) { @@ -91,6 +104,22 @@ namespace Apache.NMS.EMS VerifyConnectionFactory(); } + private void ConfigureConnectionFactory() + { + TIBCO.EMS.Tibems.SetExceptionOnFTEvents(this.ExceptionOnFTEvents); + TIBCO.EMS.Tibems.SetExceptionOnFTSwitch(this.ExceptionOnFTSwitch); + + // Set the initial connection retry settings. + this.tibcoConnectionFactory.SetConnAttemptCount(this.ConnAttemptCount); + this.tibcoConnectionFactory.SetConnAttemptDelay(this.ConnAttemptDelay
svn commit: r1705382 - in /activemq/activemq-dotnet/Apache.NMS.EMS/trunk: src/main/csharp/ConnectionFactory.cs src/main/csharp/IntrospectionSupport.cs vs2008-ems.csproj
Author: jgomes Date: Fri Sep 25 23:18:10 2015 New Revision: 1705382 URL: http://svn.apache.org/viewvc?rev=1705382=rev Log: Add calls to TIBCO API to turn on failover mode. Add support for URL parameters: connection.ExceptionOnFTEvents connection.ExceptionOnFTSwitch connection.ConnAttemptCount connection.ConnAttemptDelay connection.ConnAttemptTimeout connection.ReconnAttemptCount connection.ReconnAttemptDelay connection.ReconnAttemptTimeout Fixes [AMQNET-511]. (See https://issues.apache.org/jira/browse/AMQNET-511) Added: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/IntrospectionSupport.cs Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs activemq/activemq-dotnet/Apache.NMS.EMS/trunk/vs2008-ems.csproj Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs?rev=1705382=1705381=1705382=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ConnectionFactory.cs Fri Sep 25 23:18:10 2015 @@ -17,7 +17,10 @@ using System; using System.Collections; +using System.Collections.Specialized; +using Apache.NMS.EMS.Util; using Apache.NMS.Policies; +using Apache.NMS.Util; namespace Apache.NMS.EMS { @@ -30,6 +33,14 @@ namespace Apache.NMS.EMS private Uri brokerUri; private string clientId; private Hashtable properties; + private bool exceptionOnFTEvents = true; + private bool exceptionOnFTSwitch = true; + private int connAttemptCount = Int32.MaxValue; // Infinite + private int connAttemptDelay = 3;// 30 seconds + private int connAttemptTimeout = 5000; // 5 seconds + private int reconnAttemptCount = Int32.MaxValue; // Infinite + private int reconnAttemptDelay = 3; // 30 seconds + private int reconnAttemptTimeout = 5000; // 5 seconds private IRedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy(); @@ -38,6 +49,7 @@ namespace Apache.NMS.EMS try { this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(); + ConfigureConnectionFactory(); } catch(Exception ex) { @@ -77,10 +89,11 @@ namespace Apache.NMS.EMS { try { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(serverUrl.AbsolutePath, clientId, properties); - this.brokerUri = serverUrl; + this.brokerUri = ParseUriProperties(serverUrl); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), clientId, properties); this.clientId = clientId; this.properties = properties; + ConfigureConnectionFactory(); } catch(Exception ex) { @@ -91,6 +104,22 @@ namespace Apache.NMS.EMS VerifyConnectionFactory(); } + private void ConfigureConnectionFactory() + { + TIBCO.EMS.Tibems.SetExceptionOnFTEvents(this.ExceptionOnFTEvents); + TIBCO.EMS.Tibems.SetExceptionOnFTSwitch(this.ExceptionOnFTSwitch); + + // Set the initial connection retry settings. + this.tibcoConnectionFactory.SetConnAttemptCount(this.ConnAttemptCount); + this.tibcoConnectionFactory.SetConnAttemptDelay(this.ConnAttemptDelay); + this.tibcoConnectionFactory.SetConnAttemptTimeout(this.ConnAttemptTimeout); + + // Set the failover reconnect retry settings + this.tibcoConnectionFactory.SetReconnAttemptCount(this.ReconnAttemptCount); + this.tibcoConnectionFactory.SetReconnAttemptDelay(this.ReconnAttemptDelay); + this.tibcoConnectionFactory.SetReconnAttemptTimeout(this.ReconnAttemptTimeout); + } + private void VerifyConnectionFactory() { if(null == this.tibcoConnectionFactory) @@ -99,6 +128,58 @@ namespace Apache.NMS.EMS } } + #region Connection
svn commit: r1700351 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/
Author: jgomes Date: Mon Aug 31 21:13:21 2015 New Revision: 1700351 URL: http://svn.apache.org/r1700351 Log: Branching 1.7.x to 1.7.1 for new release. Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/ (props changed) - copied from r1700350, activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/ Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/ -- --- svn:ignore (added) +++ svn:ignore Mon Aug 31 21:13:21 2015 @@ -0,0 +1,12 @@ +build +obj +*.suo +lib +package +.project +vs2008-activemq-test.pidb +vs2008-activemq.pidb +vs2008-activemq.userprefs +vs2008-activemq.usertasks +C:\NUnitPrimaryTrace.txt +TestResult.xml Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Mon Aug 31 21:13:21 2015 @@ -0,0 +1,4 @@ +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x:1082291,1135831,1137081,1171843,1171874,1177390,1177395,1186568,1187123,1238881,1293360,1294890,1295257,1311395,1312026,1374469,1375295,1376782 +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0:692591,693525 +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.1.0:788230,788233,790183 +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:1689517,1695609-1695737
svn commit: r1700354 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x: nant.build package.ps1
Author: jgomes Date: Mon Aug 31 21:20:15 2015 New Revision: 1700354 URL: http://svn.apache.org/r1700354 Log: Bump branch version from 1.7.1 to 1.7.2. Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/package.ps1 Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build?rev=1700354=1700353=1700354=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build Mon Aug 31 21:20:15 2015 @@ -22,7 +22,7 @@ - + Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/package.ps1 URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/package.ps1?rev=1700354=1700353=1700354=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/package.ps1 (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/package.ps1 Mon Aug 31 21:20:15 2015 @@ -14,7 +14,7 @@ # limitations under the License. $pkgname = "Apache.NMS.ActiveMQ" -$pkgver = "1.7.1-SNAPSHOT" +$pkgver = "1.7.2-SNAPSHOT" $configurations = "release", "debug" $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0"
svn commit: r1700355 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1: nant.build package.ps1
Author: jgomes Date: Mon Aug 31 21:20:44 2015 New Revision: 1700355 URL: http://svn.apache.org/r1700355 Log: Remove SNAPSHOT, and set to GA. Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/nant.build activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/package.ps1 Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/nant.build?rev=1700355=1700354=1700355=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/nant.build Mon Aug 31 21:20:44 2015 @@ -23,7 +23,7 @@ - + Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/package.ps1 URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/package.ps1?rev=1700355=1700354=1700355=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/package.ps1 (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.7.1/package.ps1 Mon Aug 31 21:20:44 2015 @@ -14,7 +14,7 @@ # limitations under the License. $pkgname = "Apache.NMS.ActiveMQ" -$pkgver = "1.7.1-SNAPSHOT" +$pkgver = "1.7.1" $configurations = "release", "debug" $frameworks = "mono-2.0", "net-2.0", "net-3.5", "net-4.0"
svn commit: r1689923 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/SslTransport.cs
Author: jgomes Date: Wed Jul 8 17:39:44 2015 New Revision: 1689923 URL: http://svn.apache.org/r1689923 Log: Applied patch from Enrique Garcia to copy the 509 certificates to internal list. Thanks, Enrique! Fixes [AMQNET-500]. (See https://issues.apache.org/jira/browse/AMQNET-500) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/SslTransport.cs Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/SslTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/SslTransport.cs?rev=1689923r1=1689922r2=1689923view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/SslTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/SslTransport.cs Wed Jul 8 17:39:44 2015 @@ -314,7 +314,9 @@ namespace Apache.NMS.ActiveMQ.Transport. X509Store store = new X509Store(name, location); store.Open(OpenFlags.ReadOnly); -collection = store.Certificates; +X509Certificate2[] certificates = new X509Certificate2[store.Certificates.Count]; +store.Certificates.CopyTo(certificates, 0); +collection.AddRange(certificates); store.Close(); }
svn commit: r1689927 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs
Author: jgomes Date: Wed Jul 8 18:14:57 2015 New Revision: 1689927 URL: http://svn.apache.org/r1689927 Log: Apply patch to improve ID parsing to avoid mis-parsing hostnames with hyphens. Thanks, Andrea Montemaggio! Fixes [AMQNET-398]. (See https://issues.apache.org/jira/browse/AMQNET-398) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs?rev=1689927r1=1689926r2=1689927view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs Wed Jul 8 18:14:57 2015 @@ -16,6 +16,7 @@ */ using System; +using System.Text.RegularExpressions; using System.Transactions; using Apache.NMS.ActiveMQ.Transport; using Apache.NMS.ActiveMQ.Util; @@ -95,18 +96,20 @@ namespace Apache.NMS.ActiveMQ private static Guid GuidFromId(string id) { -// Remove the ID: prefix, that's non-unique to be sure -string resId = id.TrimStart(ID:.ToCharArray()); - -// Remaing parts should be host-port-timestamp-instance:sequence -string[] parts = resId.Split(:-.ToCharArray()); - +MatchCollection matches = Regex.Matches(id, @(\d+)-(\d+)-(\d+):(\d+)$); +if(0 == matches.Count) +{ +throw new FormatException(string.Format(Unable to extract a GUID from string '{0}', id)); +} + +GroupCollection groups = matches[0].Groups; + // We don't use the hostname here, just the remaining bits. -int a = Int32.Parse(parts[parts.Length-4]); -short b = Int16.Parse(parts[parts.Length-2]); -short c = Int16.Parse(parts[parts.Length-1]); -byte[] d = System.BitConverter.GetBytes(Int64.Parse(parts[parts.Length-3])); - +int a = Int32.Parse(groups[1].Value); +short b = Int16.Parse(groups[3].Value); +short c = Int16.Parse(groups[4].Value); +byte[] d = BitConverter.GetBytes(Int64.Parse(groups[2].Value)); + return new Guid(a, b, c, d); } }
svn commit: r1689924 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk: ./ src/main/csharp/Transport/Tcp/SslTransport.cs
Author: jgomes Date: Wed Jul 8 17:40:43 2015 New Revision: 1689924 URL: http://svn.apache.org/r1689924 Log: Merged revision(s) 1689923 from activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x: Applied patch from Enrique Garcia to copy the 509 certificates to internal list. Thanks, Enrique! Fixes [AMQNET-500]. (See https://issues.apache.org/jira/browse/AMQNET-500) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/ (props changed) activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 17:40:43 2015 @@ -1,3 +1,4 @@ /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x:1082291,1135831,1137081,1171843,1171874,1177390,1177395,1186568,1187123,1238881,1293360,1294890,1295257,1311395,1312026,1374469,1375295,1376782 +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x:1689923 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0:692591,693525 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.1.0:788230,788233,790183 Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs?rev=1689924r1=1689923r2=1689924view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/SslTransport.cs Wed Jul 8 17:40:43 2015 @@ -314,7 +314,9 @@ namespace Apache.NMS.ActiveMQ.Transport. X509Store store = new X509Store(name, location); store.Open(OpenFlags.ReadOnly); -collection = store.Certificates; +X509Certificate2[] certificates = new X509Certificate2[store.Certificates.Count]; +store.Certificates.CopyTo(certificates, 0); +collection.AddRange(certificates); store.Close(); }
svn commit: r1689928 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk: ./ src/main/csharp/NetTxConnection.cs
Author: jgomes Date: Wed Jul 8 18:16:34 2015 New Revision: 1689928 URL: http://svn.apache.org/r1689928 Log: Merged revision(s) 1689927 from activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x: Apply patch to improve ID parsing to avoid mis-parsing hostnames with hyphens. Thanks, Andrea Montemaggio! Fixes [AMQNET-398]. (See https://issues.apache.org/jira/browse/AMQNET-398) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/ (props changed) activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 18:16:34 2015 @@ -1,4 +1,4 @@ /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x:1082291,1135831,1137081,1171843,1171874,1177390,1177395,1186568,1187123,1238881,1293360,1294890,1295257,1311395,1312026,1374469,1375295,1376782 -/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x:1689923 +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x:1689923,1689927 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0:692591,693525 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.1.0:788230,788233,790183 Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs?rev=1689928r1=1689927r2=1689928view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs Wed Jul 8 18:16:34 2015 @@ -16,6 +16,7 @@ */ using System; +using System.Text.RegularExpressions; using System.Transactions; using Apache.NMS.ActiveMQ.Transport; using Apache.NMS.ActiveMQ.Util; @@ -95,18 +96,20 @@ namespace Apache.NMS.ActiveMQ private static Guid GuidFromId(string id) { -// Remove the ID: prefix, that's non-unique to be sure -string resId = id.TrimStart(ID:.ToCharArray()); - -// Remaing parts should be host-port-timestamp-instance:sequence -string[] parts = resId.Split(:-.ToCharArray()); - +MatchCollection matches = Regex.Matches(id, @(\d+)-(\d+)-(\d+):(\d+)$); +if(0 == matches.Count) +{ +throw new FormatException(string.Format(Unable to extract a GUID from string '{0}', id)); +} + +GroupCollection groups = matches[0].Groups; + // We don't use the hostname here, just the remaining bits. -int a = Int32.Parse(parts[parts.Length-4]); -short b = Int16.Parse(parts[parts.Length-2]); -short c = Int16.Parse(parts[parts.Length-1]); -byte[] d = System.BitConverter.GetBytes(Int64.Parse(parts[parts.Length-3])); - +int a = Int32.Parse(groups[1].Value); +short b = Int16.Parse(groups[3].Value); +short c = Int16.Parse(groups[4].Value); +byte[] d = BitConverter.GetBytes(Int64.Parse(groups[2].Value)); + return new Guid(a, b, c, d); } }
svn commit: r1689948 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs
Author: jgomes Date: Wed Jul 8 19:44:54 2015 New Revision: 1689948 URL: http://svn.apache.org/r1689948 Log: Set the socket exception error code to RTSSL_HANDSHAKE_FAILURE. Fixes [AMQNET-502]. (See https://issues.apache.org/jira/browse/AMQNET-502) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs?rev=1689948r1=1689947r2=1689948view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs Wed Jul 8 19:44:54 2015 @@ -372,7 +372,8 @@ namespace Apache.NMS.ActiveMQ.Transport. if(null == socket) { -throw new SocketException(); +const int RTSSL_HANDSHAKE_FAILURE = -2; +throw new SocketException(RTSSL_HANDSHAKE_FAILURE); } } catch(Exception ex)
svn commit: r1689972 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk: ./ src/main/csharp/Commands/MessageId.cs
Author: jgomes Date: Wed Jul 8 22:06:54 2015 New Revision: 1689972 URL: http://svn.apache.org/r1689972 Log: Merged revision(s) 1689971 from activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x: Fix exception being thrown when attempting to parse an ID that does not have an embedded ProducerSequenceId. Fixes [AMQNET-492]. (See https://issues.apache.org/jira/browse/AMQNET-492) Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/ (props changed) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 22:06:54 2015 @@ -1 +1,2 @@ /activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x:1135832,1137086,1294897,1295259,1374470,1375156,1375292,1376784 +/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x:1689971 Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs?rev=1689972r1=1689971r2=1689972view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs Wed Jul 8 22:06:54 2015 @@ -21,20 +21,19 @@ namespace Apache.NMS.Stomp.Commands { public class MessageId : BaseDataStructure { -ProducerId producerId; -long producerSequenceId; -long brokerSequenceId; - +private ProducerId producerId; +private long producerSequenceId; +private long brokerSequenceId; private string key = null; public MessageId() : base() { } -public MessageId(ProducerId producerId, long producerSequenceId) : base() +public MessageId(ProducerId prodId, long producerSeqId) : base() { -this.producerId = producerId; -this.producerSequenceId = producerSequenceId; +this.producerId = prodId; +this.producerSequenceId = producerSeqId; } public MessageId(string value) : base() @@ -61,12 +60,12 @@ namespace Apache.NMS.Stomp.Commands /// public override string ToString() { -if( key == null ) +if(null == this.key) { -key = producerId.ToString() + : + producerSequenceId; +this.key = string.Format({0}:{1}, this.producerId.ToString(), this.producerSequenceId); } -return key; +return this.key; } /// summary @@ -74,33 +73,42 @@ namespace Apache.NMS.Stomp.Commands /// /summary public void SetValue(string messageKey) { -this.key = messageKey; +string mkey = messageKey; + +this.key = mkey; // Parse off the sequenceId -int p = messageKey.LastIndexOf(:); +int p = mkey.LastIndexOf(:); if(p = 0) { -producerSequenceId = Int64.Parse(messageKey.Substring(p + 1)); -messageKey = messageKey.Substring(0, p); +if(Int64.TryParse(mkey.Substring(p + 1), out this.producerSequenceId)) +{ +mkey = mkey.Substring(0, p); +} +else +{ +this.producerSequenceId = 0; +} } -producerId = new ProducerId(messageKey); + +producerId = new ProducerId(mkey); } public ProducerId ProducerId { -get { return producerId; } +get { return this.producerId; } set { this.producerId = value; } } public long ProducerSequenceId { -get { return producerSequenceId; } +get { return this.producerSequenceId; } set { this.producerSequenceId = value; } } public long BrokerSequenceId { -get { return brokerSequenceId; } +get { return this.brokerSequenceId; } set { this.brokerSequenceId = value; } } @@ -108,9 +116,9 @@ namespace Apache.NMS.Stomp.Commands { int answer = 0; -answer = (answer * 37) + HashCode(ProducerId); -answer = (answer * 37) + HashCode(ProducerSequenceId); -answer = (answer * 37) + HashCode(BrokerSequenceId); +answer = (answer * 37) + HashCode(this.ProducerId); +answer = (answer * 37) + HashCode(this.ProducerSequenceId); +answer = (answer * 37) + HashCode(this.BrokerSequenceId
svn commit: r1689949 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk: ./ src/main/csharp/Transport/Tcp/TcpTransportFactory.cs
Author: jgomes Date: Wed Jul 8 19:45:40 2015 New Revision: 1689949 URL: http://svn.apache.org/r1689949 Log: Merged revision(s) 1689948 from activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x: Set the socket exception error code to RTSSL_HANDSHAKE_FAILURE. Fixes [AMQNET-502]. (See https://issues.apache.org/jira/browse/AMQNET-502) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/ (props changed) activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 8 19:45:40 2015 @@ -1,4 +1,4 @@ /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x:1082291,1135831,1137081,1171843,1171874,1177390,1177395,1186568,1187123,1238881,1293360,1294890,1295257,1311395,1312026,1374469,1375295,1376782 -/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x:1689923,1689927 +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x:1689923,1689927,1689948 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0:692591,693525 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.1.0:788230,788233,790183 Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs?rev=1689949r1=1689948r2=1689949view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransportFactory.cs Wed Jul 8 19:45:40 2015 @@ -372,7 +372,8 @@ namespace Apache.NMS.ActiveMQ.Transport. if(null == socket) { -throw new SocketException(); +const int RTSSL_HANDSHAKE_FAILURE = -2; +throw new SocketException(RTSSL_HANDSHAKE_FAILURE); } } catch(Exception ex)
svn commit: r1689971 - /activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/src/main/csharp/Commands/MessageId.cs
Author: jgomes Date: Wed Jul 8 22:05:36 2015 New Revision: 1689971 URL: http://svn.apache.org/r1689971 Log: Fix exception being thrown when attempting to parse an ID that does not have an embedded ProducerSequenceId. Fixes [AMQNET-492]. (See https://issues.apache.org/jira/browse/AMQNET-492) Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/src/main/csharp/Commands/MessageId.cs Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/src/main/csharp/Commands/MessageId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/src/main/csharp/Commands/MessageId.cs?rev=1689971r1=1689970r2=1689971view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/src/main/csharp/Commands/MessageId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/src/main/csharp/Commands/MessageId.cs Wed Jul 8 22:05:36 2015 @@ -21,20 +21,19 @@ namespace Apache.NMS.Stomp.Commands { public class MessageId : BaseDataStructure { -ProducerId producerId; -long producerSequenceId; -long brokerSequenceId; - +private ProducerId producerId; +private long producerSequenceId; +private long brokerSequenceId; private string key = null; public MessageId() : base() { } -public MessageId(ProducerId producerId, long producerSequenceId) : base() +public MessageId(ProducerId prodId, long producerSeqId) : base() { -this.producerId = producerId; -this.producerSequenceId = producerSequenceId; +this.producerId = prodId; +this.producerSequenceId = producerSeqId; } public MessageId(string value) : base() @@ -61,12 +60,12 @@ namespace Apache.NMS.Stomp.Commands /// public override string ToString() { -if( key == null ) +if(null == this.key) { -key = producerId.ToString() + : + producerSequenceId; +this.key = string.Format({0}:{1}, this.producerId.ToString(), this.producerSequenceId); } -return key; +return this.key; } /// summary @@ -74,33 +73,42 @@ namespace Apache.NMS.Stomp.Commands /// /summary public void SetValue(string messageKey) { -this.key = messageKey; +string mkey = messageKey; + +this.key = mkey; // Parse off the sequenceId -int p = messageKey.LastIndexOf(:); +int p = mkey.LastIndexOf(:); if(p = 0) { -producerSequenceId = Int64.Parse(messageKey.Substring(p + 1)); -messageKey = messageKey.Substring(0, p); +if(Int64.TryParse(mkey.Substring(p + 1), out this.producerSequenceId)) +{ +mkey = mkey.Substring(0, p); +} +else +{ +this.producerSequenceId = 0; +} } -producerId = new ProducerId(messageKey); + +producerId = new ProducerId(mkey); } public ProducerId ProducerId { -get { return producerId; } +get { return this.producerId; } set { this.producerId = value; } } public long ProducerSequenceId { -get { return producerSequenceId; } +get { return this.producerSequenceId; } set { this.producerSequenceId = value; } } public long BrokerSequenceId { -get { return brokerSequenceId; } +get { return this.brokerSequenceId; } set { this.brokerSequenceId = value; } } @@ -108,9 +116,9 @@ namespace Apache.NMS.Stomp.Commands { int answer = 0; -answer = (answer * 37) + HashCode(ProducerId); -answer = (answer * 37) + HashCode(ProducerSequenceId); -answer = (answer * 37) + HashCode(BrokerSequenceId); +answer = (answer * 37) + HashCode(this.ProducerId); +answer = (answer * 37) + HashCode(this.ProducerSequenceId); +answer = (answer * 37) + HashCode(this.BrokerSequenceId); return answer; } @@ -121,26 +129,15 @@ namespace Apache.NMS.Stomp.Commands { return Equals((MessageId) that); } + return false; } public virtual bool Equals(MessageId that) { -if(!Equals(this.ProducerId, that.ProducerId)) -{ -return false; -} -if(!Equals(this.ProducerSequenceId, that.ProducerSequenceId)) -{ -return false
svn commit: r1689933 - in /activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp: NmsInputChannelListener.cs NmsInputSessionChannelListener.cs NmsOutputChannel.cs
Author: jgomes Date: Wed Jul 8 18:51:28 2015 New Revision: 1689933 URL: http://svn.apache.org/r1689933 Log: Applied patch to keep the session object alive during transactions. Thanks, Andrea Montemaggio! Fixes [AMQNET-398]. (See https://issues.apache.org/jira/browse/AMQNET-398) Modified: activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputChannelListener.cs activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputSessionChannelListener.cs activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsOutputChannel.cs Modified: activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputChannelListener.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputChannelListener.cs?rev=1689933r1=1689932r2=1689933view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputChannelListener.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputChannelListener.cs Wed Jul 8 18:51:28 2015 @@ -324,15 +324,6 @@ namespace Apache.NMS.WCF #endregion /// summary - /// Dispatches the callback. - /// /summary - /// param name=stateThe state./param - internal void DispatchCallback(object state) - { - Dispatch((Message) state); - } - - /// summary /// Matches an incoming message to its waiting listener, /// using the FilterTable to dispatch the message to the correct /// listener. If no listener is waiting for the message, it is silently @@ -363,6 +354,10 @@ namespace Apache.NMS.WCF catch(Exception e) { Tracer.ErrorFormat(Error dispatching Message: {0}, e.ToString()); + if(null != _session _session.Transacted) + { + throw; + } } } Modified: activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputSessionChannelListener.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputSessionChannelListener.cs?rev=1689933r1=1689932r2=1689933view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputSessionChannelListener.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsInputSessionChannelListener.cs Wed Jul 8 18:51:28 2015 @@ -324,15 +324,6 @@ namespace Apache.NMS.WCF #endregion /// summary - /// Dispatches the callback. - /// /summary - /// param name=stateThe state./param - internal void DispatchCallback(object state) - { - Dispatch((Message) state); - } - - /// summary /// Matches an incoming message to its waiting listener, /// using the FilterTable to dispatch the message to the correct /// listener. If no listener is waiting for the message, it is silently Modified: activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsOutputChannel.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsOutputChannel.cs?rev=1689933r1=1689932r2=1689933view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsOutputChannel.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/src/main/csharp/NmsOutputChannel.cs Wed Jul 8 18:51:28 2015 @@ -71,23 +71,47 @@ namespace Apache.NMS.WCF ThrowIfDisposedOrNotOpen(); RemoteAddress.ApplyTo(message); - using(NMS.ISession session = _connection.CreateSession()) + NMS.ISession session = _connection.CreateSession(); + + if(!session.Transacted) + { + using(session) + { + DoSendMessageForSession(session, message); + } + } + else { - IDestination destination = SessionUtil.GetDestination(session, Destination, DestinationType
svn commit: r1689934 - in /activemq/activemq-dotnet/Apache.NMS.WCF/trunk: ./ src/main/csharp/NmsInputChannelListener.cs src/main/csharp/NmsInputSessionChannelListener.cs src/main/csharp/NmsOutputChann
Author: jgomes Date: Wed Jul 8 18:52:56 2015 New Revision: 1689934 URL: http://svn.apache.org/r1689934 Log: Merged revision(s) 1689933 from activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x: Applied patch to keep the session object alive during transactions. Thanks, Andrea Montemaggio! Fixes [AMQNET-398]. (See https://issues.apache.org/jira/browse/AMQNET-398) Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/ (props changed) activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannelListener.cs activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputSessionChannelListener.cs activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs Propchange: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Wed Jul 8 18:52:56 2015 @@ -0,0 +1 @@ +/activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x:1689933 Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannelListener.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannelListener.cs?rev=1689934r1=1689933r2=1689934view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannelListener.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannelListener.cs Wed Jul 8 18:52:56 2015 @@ -324,15 +324,6 @@ namespace Apache.NMS.WCF #endregion /// summary - /// Dispatches the callback. - /// /summary - /// param name=stateThe state./param - internal void DispatchCallback(object state) - { - Dispatch((Message) state); - } - - /// summary /// Matches an incoming message to its waiting listener, /// using the FilterTable to dispatch the message to the correct /// listener. If no listener is waiting for the message, it is silently @@ -363,6 +354,10 @@ namespace Apache.NMS.WCF catch(Exception e) { Tracer.ErrorFormat(Error dispatching Message: {0}, e.ToString()); + if(null != _session _session.Transacted) + { + throw; + } } } Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputSessionChannelListener.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputSessionChannelListener.cs?rev=1689934r1=1689933r2=1689934view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputSessionChannelListener.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputSessionChannelListener.cs Wed Jul 8 18:52:56 2015 @@ -324,15 +324,6 @@ namespace Apache.NMS.WCF #endregion /// summary - /// Dispatches the callback. - /// /summary - /// param name=stateThe state./param - internal void DispatchCallback(object state) - { - Dispatch((Message) state); - } - - /// summary /// Matches an incoming message to its waiting listener, /// using the FilterTable to dispatch the message to the correct /// listener. If no listener is waiting for the message, it is silently Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs?rev=1689934r1=1689933r2=1689934view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs Wed Jul 8 18:52:56 2015 @@ -71,23 +71,47 @@ namespace Apache.NMS.WCF ThrowIfDisposedOrNotOpen(); RemoteAddress.ApplyTo(message); - using(NMS.ISession session = _connection.CreateSession()) + NMS.ISession session = _connection.CreateSession(); + + if(!session.Transacted) + { + using(session
svn commit: r1689724 - in /activemq/activemq-dotnet/Apache.NMS.AMQP: branches/1.7.x/ branches/1.7.x/nant.build trunk/nant.build
Author: jgomes Date: Tue Jul 7 18:52:40 2015 New Revision: 1689724 URL: http://svn.apache.org/r1689724 Log: Branch NMS.AMQP trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0. Added: activemq/activemq-dotnet/Apache.NMS.AMQP/branches/1.7.x/ - copied from r1689721, activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/ Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/branches/1.7.x/nant.build?rev=1689724r1=1689721r2=1689724view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/branches/1.7.x/nant.build Tue Jul 7 18:52:40 2015 @@ -64,7 +64,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.7.1 / property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' -- Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build?rev=1689724r1=1689723r2=1689724view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build Tue Jul 7 18:52:40 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.AMQP / property name=project.group value=org.apache.activemq / -property name=project.version value=1.7.0 unless=${property::exists('project.version')} / +property name=project.version value=1.8.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for AMQP Class Library / property name=project.description value=Apache NMS for AMQP Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for AMQP using Apache QPID and Proton / @@ -64,7 +64,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.8.0 / property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' --
svn commit: r1689735 - in /activemq/activemq-dotnet/Apache.NMS.MQTT: branches/1.7.x/ branches/1.7.x/nant.build trunk/nant.build
Author: jgomes Date: Tue Jul 7 20:30:55 2015 New Revision: 1689735 URL: http://svn.apache.org/r1689735 Log: Branch NMS.MQTT trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0. Added: activemq/activemq-dotnet/Apache.NMS.MQTT/branches/1.7.x/ - copied from r1689734, activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/ Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant.build Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/branches/1.7.x/nant.build?rev=1689735r1=1689734r2=1689735view=diff == --- activemq/activemq-dotnet/Apache.NMS.MQTT/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/branches/1.7.x/nant.build Tue Jul 7 20:30:55 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.MQTT / property name=project.group value=org.apache.activemq / -property name=project.version value=1.7.0 unless=${property::exists('project.version')} / +property name=project.version value=1.7.1 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for MQTT Class Library / property name=project.description value=Apache NMS for MQTT Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for MQTT / @@ -50,7 +50,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.7.1 / if test=${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'} property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb / /if Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant.build?rev=1689735r1=1689734r2=1689735view=diff == --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant.build Tue Jul 7 20:30:55 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.MQTT / property name=project.group value=org.apache.activemq / -property name=project.version value=1.7.0 unless=${property::exists('project.version')} / +property name=project.version value=1.8.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for MQTT Class Library / property name=project.description value=Apache NMS for MQTT Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for MQTT / @@ -50,7 +50,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.8.0 / if test=${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'} property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb / /if
svn commit: r1689736 - in /activemq/activemq-dotnet/Apache.NMS.WCF: branches/1.7.x/ branches/1.7.x/nant.build trunk/nant.build
Author: jgomes Date: Tue Jul 7 20:42:32 2015 New Revision: 1689736 URL: http://svn.apache.org/r1689736 Log: Branch NMS.WCF trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0. Added: activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/ - copied from r1689735, activemq/activemq-dotnet/Apache.NMS.WCF/trunk/ Modified: activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build Modified: activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/nant.build?rev=1689736r1=1689735r2=1689736view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/branches/1.7.x/nant.build Tue Jul 7 20:42:32 2015 @@ -23,7 +23,7 @@ property name=basedir value=${project::get-base-directory()}/ property name=project.name value=Apache.NMS.WCF/ property name=project.group value=org.apache.activemq/ -property name=project.version value=1.6.0 unless=${property::exists('project.version')}/ +property name=project.version value=1.7.1 unless=${property::exists('project.version')}/ property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=WCF Provider for ActiveMQ Class Library/ property name=project.description value=WCF Provider for ActiveMQ Class Library (.Net Messaging Library Implementation): An implementation of Windows Communications Framework API for ActiveMQ/ @@ -51,7 +51,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS/ property name=vendor.apache.org.group value=org.apache.activemq/ -property name=vendor.apache.org.version value=1.6.0/ +property name=vendor.apache.org.version value=1.7.1/ property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' -- Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build?rev=1689736r1=1689735r2=1689736view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build Tue Jul 7 20:42:32 2015 @@ -23,7 +23,7 @@ property name=basedir value=${project::get-base-directory()}/ property name=project.name value=Apache.NMS.WCF/ property name=project.group value=org.apache.activemq/ -property name=project.version value=1.6.0 unless=${property::exists('project.version')}/ +property name=project.version value=1.8.0 unless=${property::exists('project.version')}/ property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=WCF Provider for ActiveMQ Class Library/ property name=project.description value=WCF Provider for ActiveMQ Class Library (.Net Messaging Library Implementation): An implementation of Windows Communications Framework API for ActiveMQ/ @@ -51,7 +51,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS/ property name=vendor.apache.org.group value=org.apache.activemq/ -property name=vendor.apache.org.version value=1.6.0/ +property name=vendor.apache.org.version value=1.8.0/ property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' --
svn commit: r1689734 - in /activemq/activemq-dotnet/Apache.NMS.MSMQ: branches/1.7.x/ branches/1.7.x/nant.build trunk/nant.build
Author: jgomes Date: Tue Jul 7 20:29:03 2015 New Revision: 1689734 URL: http://svn.apache.org/r1689734 Log: Branch NMS.MSMQ trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0. Added: activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.7.x/ - copied from r1689733, activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/ Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.7.x/nant.build?rev=1689734r1=1689733r2=1689734view=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.7.x/nant.build Tue Jul 7 20:29:03 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.MSMQ / property name=project.group value=org.apache.activemq / -property name=project.version value=1.7.0 unless=${property::exists('project.version')} / +property name=project.version value=1.7.1 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for MSMQ Class Library / property name=project.description value=Apache NMS for MSMQ Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for MSMQ / @@ -52,7 +52,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.7.1 / property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' -- Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build?rev=1689734r1=1689733r2=1689734view=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build Tue Jul 7 20:29:03 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.MSMQ / property name=project.group value=org.apache.activemq / -property name=project.version value=1.7.0 unless=${property::exists('project.version')} / +property name=project.version value=1.8.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for MSMQ Class Library / property name=project.description value=Apache NMS for MSMQ Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for MSMQ / @@ -52,7 +52,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.8.0 / property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' --
svn commit: r1689737 - /activemq/activemq-dotnet/Apache.NMS.ZMQ/branches/1.7.x/
Author: jgomes Date: Tue Jul 7 20:46:16 2015 New Revision: 1689737 URL: http://svn.apache.org/r1689737 Log: Branch NMS.ZMQ trunk to 1.7.x. Added: activemq/activemq-dotnet/Apache.NMS.ZMQ/branches/1.7.x/ - copied from r1689736, activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/
svn commit: r1689733 - in /activemq/activemq-dotnet/Apache.NMS.Stomp: branches/1.7.x/ branches/1.7.x/nant.build trunk/nant.build
Author: jgomes Date: Tue Jul 7 20:26:21 2015 New Revision: 1689733 URL: http://svn.apache.org/r1689733 Log: Branch NMS.Stomp trunk to 1.7.x, using NMS API 1.7.1. Update trunk to 1.8.0. Added: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/ - copied from r1689731, activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/ Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build?rev=1689733r1=1689731r2=1689733view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.7.x/nant.build Tue Jul 7 20:26:21 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.Stomp / property name=project.group value=org.apache.activemq / -property name=project.version value=1.7.0 unless=${property::exists('project.version')} / +property name=project.version value=1.7.1 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for Stomp Class Library / property name=project.description value=Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp / @@ -46,7 +46,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.7.1 / if test=${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'} property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb / /if Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build?rev=1689733r1=1689732r2=1689733view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build Tue Jul 7 20:26:21 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.Stomp / property name=project.group value=org.apache.activemq / -property name=project.version value=1.7.0 unless=${property::exists('project.version')} / +property name=project.version value=1.8.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for Stomp Class Library / property name=project.description value=Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp / @@ -46,7 +46,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.8.0 / if test=${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'} property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb / /if
svn commit: r1689516 - in /activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp: INetTxConnection.cs INetTxSession.cs
Author: jgomes Date: Mon Jul 6 22:41:04 2015 New Revision: 1689516 URL: http://svn.apache.org/r1689516 Log: Apply patch from Jose Alvarado. Thanks, Jose! Fixes [AMQNET-503]. (See https://issues.apache.org/jira/browse/AMQNET-503) Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxConnection.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxSession.cs Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxConnection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxConnection.cs?rev=1689516r1=1689515r2=1689516view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxConnection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxConnection.cs Mon Jul 6 22:41:04 2015 @@ -40,6 +40,10 @@ namespace Apache.NMS /// Creates a INetTxSession object and enlists in the specified Transaction. /// /summary INetTxSession CreateNetTxSession(Transaction tx); + +INetTxSession CreateNetTxSession(bool enlistsNativeMsDtcResource); + +INetTxSession CreateNetTxSession(Transaction tx, bool enlistsNativeMsDtcResource); #endif } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxSession.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxSession.cs?rev=1689516r1=1689515r2=1689516view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxSession.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/INetTxSession.cs Mon Jul 6 22:41:04 2015 @@ -29,7 +29,7 @@ namespace Apache.NMS /// The NMS Provider implements this interface by participating in the current ambient transaction /// as defined by the System.Transactions.Transaction.Current static member. Whenever a new /// Transaction is entered the NMS provider should enlist in that transaction. When there is no -/// ambient transaction then the NMS Prodiver should allow the INetTxSession instance to behave +/// ambient transaction then the NMS Provider should allow the INetTxSession instance to behave /// as a session that is in Auto Acknowledge mode. /// /// Calling the Commit or Rollback methods on a INetTxSession instance should throw an exception @@ -49,6 +49,8 @@ namespace Apache.NMS /// be thrown. /// /summary void Enlist(Transaction tx); + +bool EnlistsMsDtcNativeResource { get; set; } #endif } }
svn commit: r1689528 - in /activemq/activemq-dotnet/Apache.NMS/branches/1.7.x: ./ src/main/csharp/INetTxConnection.cs src/main/csharp/INetTxSession.cs
Author: jgomes Date: Tue Jul 7 00:01:40 2015 New Revision: 1689528 URL: http://svn.apache.org/r1689528 Log: Merged revision(s) 1689516 from activemq/activemq-dotnet/Apache.NMS/trunk: Apply patch from Jose Alvarado. Thanks, Jose! Fixes [AMQNET-503]. (See https://issues.apache.org/jira/browse/AMQNET-503) Modified: activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/ (props changed) activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxConnection.cs activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxSession.cs Propchange: activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Jul 7 00:01:40 2015 @@ -1 +1,2 @@ /activemq/activemq-dotnet/Apache.NMS/branches/1.5.x:1143990,1185320 +/activemq/activemq-dotnet/Apache.NMS/trunk:1689516 Modified: activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxConnection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxConnection.cs?rev=1689528r1=1689527r2=1689528view=diff == --- activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxConnection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxConnection.cs Tue Jul 7 00:01:40 2015 @@ -40,6 +40,10 @@ namespace Apache.NMS /// Creates a INetTxSession object and enlists in the specified Transaction. /// /summary INetTxSession CreateNetTxSession(Transaction tx); + +INetTxSession CreateNetTxSession(bool enlistsNativeMsDtcResource); + +INetTxSession CreateNetTxSession(Transaction tx, bool enlistsNativeMsDtcResource); #endif } } Modified: activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxSession.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxSession.cs?rev=1689528r1=1689527r2=1689528view=diff == --- activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxSession.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/branches/1.7.x/src/main/csharp/INetTxSession.cs Tue Jul 7 00:01:40 2015 @@ -29,7 +29,7 @@ namespace Apache.NMS /// The NMS Provider implements this interface by participating in the current ambient transaction /// as defined by the System.Transactions.Transaction.Current static member. Whenever a new /// Transaction is entered the NMS provider should enlist in that transaction. When there is no -/// ambient transaction then the NMS Prodiver should allow the INetTxSession instance to behave +/// ambient transaction then the NMS Provider should allow the INetTxSession instance to behave /// as a session that is in Auto Acknowledge mode. /// /// Calling the Commit or Rollback methods on a INetTxSession instance should throw an exception @@ -49,6 +49,8 @@ namespace Apache.NMS /// be thrown. /// /summary void Enlist(Transaction tx); + +bool EnlistsMsDtcNativeResource { get; set; } #endif } }
svn commit: r1689517 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src: main/csharp/NetTxConnection.cs main/csharp/NetTxMessageConsumer.cs main/csharp/NetTxSession.cs test/csharp/DtcTransac
Author: jgomes Date: Mon Jul 6 22:41:41 2015 New Revision: 1689517 URL: http://svn.apache.org/r1689517 Log: Apply patch from Jose Alvarado. Thanks, Jose! Fixes [AMQNET-503]. (See https://issues.apache.org/jira/browse/AMQNET-503) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxMessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxSession.cs activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/DtcTransactionsTestSupport.cs Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs?rev=1689517r1=1689516r2=1689517view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxConnection.cs Mon Jul 6 22:41:41 2015 @@ -51,6 +51,21 @@ namespace Apache.NMS.ActiveMQ return session; } +public INetTxSession CreateNetTxSession(Transaction tx, bool enlistNativeMsDtcResource) +{ +NetTxSession session = (NetTxSession)CreateSession(AcknowledgementMode.Transactional); +session.Enlist(tx); +session.EnlistsMsDtcNativeResource = enlistNativeMsDtcResource; +return session; +} + +public INetTxSession CreateNetTxSession(bool enlistNativeMsDtcResource) +{ +NetTxSession session = (NetTxSession)CreateSession(AcknowledgementMode.Transactional); +session.EnlistsMsDtcNativeResource = enlistNativeMsDtcResource; +return session; +} + protected override Session CreateActiveMQSession(AcknowledgementMode ackMode) { CheckConnected(); Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxMessageConsumer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxMessageConsumer.cs?rev=1689517r1=1689516r2=1689517view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxMessageConsumer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/NetTxMessageConsumer.cs Mon Jul 6 22:41:41 2015 @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Transactions; using Apache.NMS.ActiveMQ.Commands; namespace Apache.NMS.ActiveMQ @@ -75,9 +76,29 @@ namespace Apache.NMS.ActiveMQ // distributed TX manager we need to wait whenever the TX is being // controlled by the DTC as it completes all operations async and // we cannot start consumption again until all its tasks have completed.) -waitForDtcWaitHandle = this.transactionContext.InNetTransaction - this.transactionContext.NetTxState == - NetTxTransactionContext.TxState.Pending; +var currentTransactionId = transactionContext.TransactionId as XATransactionId; +string currentLocalTxId = currentTransactionId != null +? UTF8Encoding.UTF8.GetString(currentTransactionId.GlobalTransactionId) +: NONE; + +if (Transaction.Current != null) +{ +waitForDtcWaitHandle = this.transactionContext.InNetTransaction + this.transactionContext.NetTxState == NetTxTransactionContext.TxState.Pending || + currentLocalTxId != Transaction.Current.TransactionInformation.LocalIdentifier; +} +else +{ +waitForDtcWaitHandle = this.transactionContext.InNetTransaction + this.transactionContext.NetTxState == NetTxTransactionContext.TxState.Pending; +} + +} + +//if session EnlistMsDtcNativeResource the transaction does not need to wait +if (this.session.EnlistsMsDtcNativeResource) +{ +waitForDtcWaitHandle = false; } if (waitForDtcWaitHandle) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp
svn commit: r1689520 - in /activemq/activemq-dotnet/Apache.NMS.EMS: branches/1.7.x/ trunk/nant.build
Author: jgomes Date: Mon Jul 6 23:25:42 2015 New Revision: 1689520 URL: http://svn.apache.org/r1689520 Log: Branch Apache.NMS.EMS trunk to 1.7.x. Set trunk to 1.8.0. Added: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ - copied from r1689518, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/ Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build?rev=1689520r1=1689519r2=1689520view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build Mon Jul 6 23:25:42 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.EMS / property name=project.group value=org.apache.activemq / - property name=project.version value=1.7.0 unless=${property::exists('project.version')} / + property name=project.version value=1.8.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for EMS Class Library / property name=project.description value=Apache NMS for EMS Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for EMS / @@ -56,7 +56,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / - property name=vendor.apache.org.version value=1.7.0 / + property name=vendor.apache.org.version value=1.8.0 / property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' --
svn commit: r1689526 - in /activemq/activemq-dotnet/Apache.NMS.EMS: branches/1.7.x/nant.build tags/1.7.0/ tags/1.7.0/nant.build
Author: jgomes Date: Mon Jul 6 23:50:18 2015 New Revision: 1689526 URL: http://svn.apache.org/r1689526 Log: Tag Apache.NMS.EMS 1.7.x to as 1.7.0. Update the 1.7.x branch to use Apache.NMS 1.7.1. Added: activemq/activemq-dotnet/Apache.NMS.EMS/tags/1.7.0/ - copied from r1689520, activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.EMS/tags/1.7.0/nant.build Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build?rev=1689526r1=1689525r2=1689526view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/nant.build Mon Jul 6 23:50:18 2015 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.EMS / property name=project.group value=org.apache.activemq / - property name=project.version value=1.7.0 unless=${property::exists('project.version')} / + property name=project.version value=1.7.1 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for EMS Class Library / property name=project.description value=Apache NMS for EMS Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for EMS / @@ -56,7 +56,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / - property name=vendor.apache.org.version value=1.7.0 / + property name=vendor.apache.org.version value=1.7.1 / property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' -- Modified: activemq/activemq-dotnet/Apache.NMS.EMS/tags/1.7.0/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/tags/1.7.0/nant.build?rev=1689526r1=1689520r2=1689526view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/tags/1.7.0/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/tags/1.7.0/nant.build Mon Jul 6 23:50:18 2015 @@ -23,7 +23,7 @@ property name=project.name value=Apache.NMS.EMS / property name=project.group value=org.apache.activemq / property name=project.version value=1.7.0 unless=${property::exists('project.version')} / - property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / + property name=project.release.type value=GA unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for EMS Class Library / property name=project.description value=Apache NMS for EMS Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for EMS /
svn commit: r1689529 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x: ./ nant.build src/main/csharp/NetTxConnection.cs src/main/csharp/NetTxMessageConsumer.cs src/main/csharp/NetTxSe
Author: jgomes Date: Tue Jul 7 00:02:01 2015 New Revision: 1689529 URL: http://svn.apache.org/r1689529 Log: Merged revision(s) 1689517 from activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk: Apply patch from Jose Alvarado. Thanks, Jose! Fixes [AMQNET-503]. (See https://issues.apache.org/jira/browse/AMQNET-503) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/ (props changed) activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxMessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxSession.cs activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/test/csharp/DtcTransactionsTestSupport.cs Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Jul 7 00:02:01 2015 @@ -1,3 +1,4 @@ /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x:1082291,1135831,1137081,1171843,1171874,1177390,1177395,1186568,1187123,1238881,1293360,1294890,1295257,1311395,1312026,1374469,1375295,1376782 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0:692591,693525 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.1.0:788230,788233,790183 +/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:1689517 Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build?rev=1689529r1=1689528r2=1689529view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/nant.build Tue Jul 7 00:02:01 2015 @@ -51,7 +51,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.7.0 / +property name=vendor.apache.org.version value=1.7.1 / if test=${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'} property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb / /if Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs?rev=1689529r1=1689528r2=1689529view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxConnection.cs Tue Jul 7 00:02:01 2015 @@ -51,6 +51,21 @@ namespace Apache.NMS.ActiveMQ return session; } +public INetTxSession CreateNetTxSession(Transaction tx, bool enlistNativeMsDtcResource) +{ +NetTxSession session = (NetTxSession)CreateSession(AcknowledgementMode.Transactional); +session.Enlist(tx); +session.EnlistsMsDtcNativeResource = enlistNativeMsDtcResource; +return session; +} + +public INetTxSession CreateNetTxSession(bool enlistNativeMsDtcResource) +{ +NetTxSession session = (NetTxSession)CreateSession(AcknowledgementMode.Transactional); +session.EnlistsMsDtcNativeResource = enlistNativeMsDtcResource; +return session; +} + protected override Session CreateActiveMQSession(AcknowledgementMode ackMode) { CheckConnected(); Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxMessageConsumer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxMessageConsumer.cs?rev=1689529r1=1689528r2=1689529view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxMessageConsumer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/NetTxMessageConsumer.cs Tue Jul 7 00:02:01 2015 @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Transactions; using Apache.NMS.ActiveMQ.Commands; namespace Apache.NMS.ActiveMQ @@ -75,9 +76,29 @@ namespace Apache.NMS.ActiveMQ
svn commit: r1630201 - in /activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp: AsyncConsumeTest.cs NMSTestSupport.cs
Author: jgomes Date: Wed Oct 8 19:06:33 2014 New Revision: 1630201 URL: http://svn.apache.org/r1630201 Log: Add new CreateConnectionAndStart() helper function to streamline test creation and syntax. Update AsyncConsumeTest.cs with new API as example code. Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs?rev=1630201r1=1630200r2=1630201view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs Wed Oct 8 19:06:33 2014 @@ -16,7 +16,6 @@ */ using System.Threading; -using Apache.NMS.Util; using NUnit.Framework; namespace Apache.NMS.Test @@ -52,25 +51,22 @@ namespace Apache.NMS.Test [Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)] MsgDeliveryMode deliveryMode) { - using(IConnection connection = CreateConnection(GetTestClientId())) - { - connection.Start(); - using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)) - using(IDestination destination = CreateDestination(session, DestinationType.Queue)) - using(IMessageConsumer consumer = session.CreateConsumer(destination)) - using(IMessageProducer producer = session.CreateProducer(destination)) - { - producer.DeliveryMode = deliveryMode; - consumer.Listener += new MessageListener(OnMessage); + using(IConnection connection = CreateConnectionAndStart(GetTestClientId())) + using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)) + using(IDestination destination = CreateDestination(session, DestinationType.Queue)) + using(IMessageConsumer consumer = session.CreateConsumer(destination)) + using(IMessageProducer producer = session.CreateProducer(destination)) + { + producer.DeliveryMode = deliveryMode; + consumer.Listener += new MessageListener(OnMessage); + + IMessage request = session.CreateMessage(); + request.NMSCorrelationID = AsyncConsume; + request.NMSType = Test; + producer.Send(request); - IMessage request = session.CreateMessage(); - request.NMSCorrelationID = AsyncConsume; - request.NMSType = Test; - producer.Send(request); - - WaitForMessageToArrive(); - Assert.AreEqual(request.NMSCorrelationID, receivedMsg.NMSCorrelationID, Invalid correlation ID.); - } + WaitForMessageToArrive(); + Assert.AreEqual(request.NMSCorrelationID, receivedMsg.NMSCorrelationID, Invalid correlation ID.); } } @@ -79,26 +75,26 @@ namespace Apache.NMS.Test [Values(MsgDeliveryMode.Persistent, MsgDeliveryMode.NonPersistent)] MsgDeliveryMode deliveryMode) { - using(IConnection connection = CreateConnection(GetTestClientId())) + using(IConnection connection = CreateConnectionAndStart(GetTestClientId())) + using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)) + using(IDestination destination = CreateDestination(session, DestinationType.Queue)) { - connection.Start(); - using(ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)) - using(IDestination destination = CreateDestination(session, DestinationType.Queue)) + string correlationId = AsyncConsumeAfterSend; + using(IMessageProducer producer = session.CreateProducer(destination
svn commit: r1630205 - /activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs
Author: jgomes Date: Wed Oct 8 19:13:19 2014 New Revision: 1630205 URL: http://svn.apache.org/r1630205 Log: Fix default parameter for backward compatibility. Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs?rev=1630205r1=1630204r2=1630205view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NMSTestSupport.cs Wed Oct 8 19:13:19 2014 @@ -392,9 +392,18 @@ namespace Apache.NMS.Test /// summary /// Create a new connection to the broker, and start it. /// /summary + /// returns/returns + public virtual IConnection CreateConnectionAndStart() + { + return CreateConnectionAndStart(null); + } + + /// summary + /// Create a new connection to the broker, and start it. + /// /summary /// param name=newClientIdClient ID of the new connection./param /// returns/returns - public virtual IConnection CreateConnectionAndStart(string newClientId = null) + public virtual IConnection CreateConnectionAndStart(string newClientId) { IConnection newConnection = CreateConnection(newClientId); newConnection.Start();
svn commit: r1630251 - in /activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp: BaseMessage.cs MessageConsumer.cs MessageProducer.cs Session.cs
Author: jgomes Date: Wed Oct 8 23:17:41 2014 New Revision: 1630251 URL: http://svn.apache.org/r1630251 Log: Fix serializing/deserializing the message properties. Use the existing PrimitiveMap marshal/unmarshal functions. Add additional exception handling in the MessageConsumer to pass the BadConsumerTest unit test. Fixes [AMQNET-491]. (See https://issues.apache.org/jira/browse/AMQNET-491) Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageProducer.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Session.cs Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs?rev=1630251r1=1630250r2=1630251view=diff == --- activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs Wed Oct 8 23:17:41 2014 @@ -84,6 +84,11 @@ namespace Apache.NMS.ZMQ get { return propertiesMap; } } + internal PrimitiveMap PropertiesMap + { + get { return propertiesMap; } + set { propertiesMap = value; } + } // NMS headers Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageConsumer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageConsumer.cs?rev=1630251r1=1630250r2=1630251view=diff == --- activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageConsumer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageConsumer.cs Wed Oct 8 23:17:41 2014 @@ -53,13 +53,35 @@ namespace Apache.NMS.ZMQ { // UNUSED_PARAM(selector); // Selectors are not currently supported - if(null == sess.Connection.Context) + if(null == sess + || null == sess.Connection + || null == sess.Connection.Context) { throw new NMSConnectionException(); } + Destination theDest = dest as Destination; + + if(null == theDest) + { + throw new InvalidDestinationException(Consumer cannot receive on Null Destinations.); + } + else if(null == theDest.Name) + { + throw new InvalidDestinationException(The destination object was not given a physical name.); + } + else if(theDest.IsTemporary) + { + String physicalName = theDest.Name; + + if(String.IsNullOrEmpty(physicalName)) + { + throw new InvalidDestinationException(Physical name of Destination should be valid: + theDest); + } + } + this.session = sess; - this.destination = (Destination) dest; + this.destination = theDest; this.rawDestinationName = Destination.encoding.GetBytes(this.destination.Name); this.acknowledgementMode = ackMode; } @@ -268,7 +290,7 @@ namespace Apache.NMS.ZMQ /// /returns protected virtual IMessage ToNmsMessage(byte[] msgData) { - IMessage nmsMessage = null; + BaseMessage nmsMessage = null; int messageType = WireFormat.MT_UNKNOWN; int fieldType = WireFormat.MFT_NONE; DateTime messageTimestamp = DateTime.UtcNow; @@ -278,7 +300,7 @@ namespace Apache.NMS.ZMQ MsgDeliveryMode messageDeliveryMode = MsgDeliveryMode.NonPersistent; MsgPriority messagePriority = MsgPriority.Normal; TimeSpan messageTimeToLive = TimeSpan.FromTicks(0); - IPrimitiveMap messageProperties = null; + byte[] messageProperties = null; int fieldLen; int index = 0; string messageID = string.Empty
svn commit: r1630267 - in /activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp: BaseMessage.cs Destination.cs MessageConsumer.cs MessageProducer.cs TemporaryQueue.cs TemporaryTopic.cs
Author: jgomes Date: Thu Oct 9 01:38:53 2014 New Revision: 1630267 URL: http://svn.apache.org/r1630267 Log: Add support for serializing/deserializing BytesMessages. Fixes [AMQNET-491]. (See https://issues.apache.org/jira/browse/AMQNET-491) Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageProducer.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/TemporaryQueue.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/TemporaryTopic.cs Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs?rev=1630267r1=1630266r2=1630267view=diff == --- activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs Thu Oct 9 01:38:53 2014 @@ -36,12 +36,19 @@ namespace Apache.NMS.ZMQ private string type; private event AcknowledgeHandler Acknowledger; private DateTime timestamp = new DateTime(); + private bool readOnlyMsgProperties = false; private bool readOnlyMsgBody = false; - public bool ReadOnlyBody + public virtual bool ReadOnlyProperties { - get { return readOnlyMsgBody; } - set { readOnlyMsgBody = value; } + get { return this.readOnlyMsgProperties; } + set { this.readOnlyMsgProperties = value; } + } + + public virtual bool ReadOnlyBody + { + get { return this.readOnlyMsgBody; } + set { this.readOnlyMsgBody = value; } } // IMessage interface @@ -155,7 +162,6 @@ namespace Apache.NMS.ZMQ set { } } - /// summary /// The destination that the consumer of this message should send replies to /// /summary @@ -190,7 +196,6 @@ namespace Apache.NMS.ZMQ set { type = value; } } - public object GetObjectProperty(string name) { return null; @@ -200,9 +205,15 @@ namespace Apache.NMS.ZMQ { } + public virtual void OnSend() + { + this.ReadOnlyProperties = true; + this.ReadOnlyBody = true; + } + protected void FailIfReadOnlyBody() { - if(ReadOnlyBody == true) + if(ReadOnlyBody) { throw new MessageNotWriteableException(Message is in Read-Only mode.); } @@ -210,7 +221,7 @@ namespace Apache.NMS.ZMQ protected void FailIfWriteOnlyBody() { - if(ReadOnlyBody == false) + if(!ReadOnlyBody) { throw new MessageNotReadableException(Message is in Write-Only mode.); } Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs?rev=1630267r1=1630266r2=1630267view=diff == --- activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs Thu Oct 9 01:38:53 2014 @@ -36,6 +36,7 @@ namespace Apache.NMS.ZMQ protected ZmqSocket producerEndpoint = null; protected ZmqSocket consumerEndpoint = null; protected string destinationName; + internal byte[] rawDestinationName; private bool disposed = false; @@ -47,6 +48,7 @@ namespace Apache.NMS.ZMQ { this.session = session; this.destinationName = destName; + this.rawDestinationName = Destination.encoding.GetBytes(this.destinationName); this.session.RegisterDestination(this); } @@ -88,23 +90,8 @@ namespace Apache.NMS.ZMQ /// /summary protected virtual void OnDispose
svn commit: r1619224 - /activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs
Author: jgomes Date: Wed Aug 20 20:53:13 2014 New Revision: 1619224 URL: http://svn.apache.org/r1619224 Log: Add default provider mapping for AMQP. Fixes [AMQNET-454]. (See https://issues.apache.org/jira/browse/AMQNET-454) Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs?rev=1619224r1=1619223r2=1619224view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs Wed Aug 20 20:53:13 2014 @@ -62,8 +62,9 @@ namespace Apache.NMS schemaProviderFactoryMap[mqtt] = new ProviderFactoryInfo(Apache.NMS.MQTT, Apache.NMS.MQTT.ConnectionFactory); schemaProviderFactoryMap[msmq] = new ProviderFactoryInfo(Apache.NMS.MSMQ, Apache.NMS.MSMQ.ConnectionFactory); schemaProviderFactoryMap[stomp] = new ProviderFactoryInfo(Apache.NMS.Stomp, Apache.NMS.Stomp.ConnectionFactory); - schemaProviderFactoryMap[xms] = new ProviderFactoryInfo(Apache.NMS.XMS, Apache.NMS.XMS.ConnectionFactory); - schemaProviderFactoryMap[zmq] = new ProviderFactoryInfo(Apache.NMS.ZMQ, Apache.NMS.ZMQ.ConnectionFactory); + schemaProviderFactoryMap[xms] = new ProviderFactoryInfo(Apache.NMS.XMS, Apache.NMS.XMS.ConnectionFactory); + schemaProviderFactoryMap[zmq] = new ProviderFactoryInfo(Apache.NMS.ZMQ, Apache.NMS.ZMQ.ConnectionFactory); + schemaProviderFactoryMap[amqp] = new ProviderFactoryInfo(Apache.NMS.AMQP, Apache.NMS.AMQP.ConnectionFactory); } /// summary
svn commit: r1618994 - in /activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239: ./ net-2.0/ net-2.0/debug/ net-2.0/release/ net-4.0/ net-4.0/debug/ net-4.0/release/
Author: jgomes Date: Tue Aug 19 21:18:06 2014 New Revision: 1618994 URL: http://svn.apache.org/r1618994 Log: Move the release DLLs into a common folder. Fix for AMQNET-454. Added: activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/boost_chrono-vc90-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/boost_chrono-vc90-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/boost_date_time-vc90-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/boost_date_time-vc90-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/boost_program_options-vc90-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/boost_program_options-vc90-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/boost_system-vc90-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/boost_system-vc90-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/boost_thread-vc90-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/boost_thread-vc90-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/org.apache.qpid.messaging.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/org.apache.qpid.messaging.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/qpid-proton.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/qpid-proton.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/qpidclient.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/qpidclient.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/qpidcommon.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/qpidcommon.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/qpidmessaging.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/qpidmessaging.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/qpidtypes.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-2.0/release/qpidtypes.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/boost_chrono-vc100-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/release/boost_chrono-vc100-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/boost_date_time-vc100-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/release/boost_date_time-vc100-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/boost_program_options-vc100-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/release/boost_program_options-vc100-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/boost_system-vc100-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/release/boost_system-vc100-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/boost_thread-vc100-mt-1_47.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/release/boost_thread-vc100-mt-1_47.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/org.apache.qpid.messaging.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/release/org.apache.qpid.messaging.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/qpid-proton.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/release/qpid-proton.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/qpidclient.dll - copied unchanged from r1618992, activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/release/qpidclient.dll activemq/activemq-dotnet/vendor/QPid/Apache.QPID/0.28.0.16239/net-4.0/qpidcommon.dll - copied unchanged from r1618992
svn commit: r1618995 - in /activemq/activemq-dotnet/Apache.NMS.AMQP/trunk: ./ src/test/csharp/HelloWorld/
Author: jgomes Date: Tue Aug 19 21:20:45 2014 New Revision: 1618995 URL: http://svn.apache.org/r1618995 Log: Apply patch #30 to lock x86 only configurations and match the changes to vendor dependency to only use release build DLLs. Contributed by Chuck Rolke. Thanks! Fixes [AMQNET-454]. (See https://issues.apache.org/jira/browse/AMQNET-454) Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/test/csharp/HelloWorld/HelloWorld.cs activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/vs2008-HelloWorld.csproj activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/vs2008-amqp-test.csproj activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/vs2008-amqp.csproj activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/vs2008-amqp.sln activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/vs2010-amqp-test.csproj activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/vs2010-amqp.csproj activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/vs2010-amqp.sln Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build?rev=1618995r1=1618994r2=1618995view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build Tue Aug 19 21:20:45 2014 @@ -28,16 +28,16 @@ property name=project.description value=Apache NMS for AMQP Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for AMQP using Apache QPID and Proton / !-- Native Qpid DLLs -- -property name=boost_chrono value=boost_chrono-${vcver}-mt${boostdebug}-1_47.dll dynamic=true / -property name=boost_date_time value=boost_date_time-${vcver}-mt${boostdebug}-1_47.dll dynamic=true / -property name=boost_program_options value=boost_program_options-${vcver}-mt${boostdebug}-1_47.dll dynamic=true / -property name=boost_system value=boost_system-${vcver}-mt${boostdebug}-1_47.dll dynamic=true / -property name=boost_thread value=boost_thread-${vcver}-mt${boostdebug}-1_47.dll dynamic=true / -property name=qpidclient value=qpidclient${debugsuffix}.dlldynamic=true / -property name=qpidcommon value=qpidcommon${debugsuffix}.dlldynamic=true / -property name=qpidmessaging value=qpidmessaging${debugsuffix}.dll dynamic=true / -property name=qpid-proton value=qpid-proton${debugsuffix}.dll dynamic=true / -property name=qpidtypes value=qpidtypes${debugsuffix}.dll dynamic=true / +property name=boost_chrono value=boost_chrono-${vcver}-mt-1_47.dll dynamic=true / +property name=boost_date_time value=boost_date_time-${vcver}-mt-1_47.dll dynamic=true / +property name=boost_program_options value=boost_program_options-${vcver}-mt-1_47.dll dynamic=true / +property name=boost_system value=boost_system-${vcver}-mt-1_47.dll dynamic=true / +property name=boost_thread value=boost_thread-${vcver}-mt-1_47.dll dynamic=true / +property name=qpidclientvalue=qpidclient.dll dynamic=true / +property name=qpidcommonvalue=qpidcommon.dll dynamic=true / +property name=qpidmessaging value=qpidmessaging.dll dynamic=true / +property name=qpid-proton value=qpid-proton.dll dynamic=true / +property name=qpidtypes value=qpidtypes.dll dynamic=true / !-- Repository organized as: organization/module/version/plaform/artifact, platform might be something like 'all' or 'net-2.0/release' -- property name=nunit.dll value=${basedir}/lib/NUnit/${current.build.framework}/nunit.framework.dll dynamic=true / @@ -53,9 +53,6 @@ to align .NET build with underlying unmanaged C runtime. -- property name=build.framework.strings value=net-2.0,net-4.0/ -!-- Limit to debug until lib\Apache.Qpid\net-X.0 gets debug/release subdirectories -- -property name=build.config.stringsvalue=debug / - target name=vendor-init description=Initializes Vendor library from local repository. !-- Vendor specific info. The prefix of 'vendor.apache.org' is taken from the property @@ -82,10 +79,7 @@ property name=vendor.qpid.apache.org.version value=0.28.0.16239 / !-- net-4.0 built with VS2010 (vc100), net-2.0 built with VS2008 (vc90) -- property name=vcver value=${if(current.build.framework == 'net-4.0', 'vc100', 'vc90')} / - property name=debugsuffix
svn commit: r1617620 - in /activemq/activemq-dotnet/Apache.NMS.AMQP/trunk: nant-common.xml nant.build
Author: jgomes Date: Tue Aug 12 23:01:31 2014 New Revision: 1617620 URL: http://svn.apache.org/r1617620 Log: Refactored to preserve the standard nant-common.xml. The unmanaged content is included along with the other project content. Fixes [AMQNET-454]. (See https://issues.apache.org/jira/browse/AMQNET-454) Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml?rev=1617620r1=1617619r2=1617620view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml Tue Aug 12 23:01:31 2014 @@ -384,7 +384,6 @@ copy todir=${build.bin.dir} file=${content.filename} if=${not file::up-to-date(content.filename, '${build.bin.dir}/${content.filename}')} / /do /foreach -call target=copy-unmanaged-content / /target !-- -- Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build?rev=1617620r1=1617619r2=1617620view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build Tue Aug 12 23:01:31 2014 @@ -118,9 +118,29 @@ include name=${Apache.NMS.pdb} / include name=${Apache.NMS.Test.dll} / include name=${Apache.NMS.Test.pdb} / - include name=${Apache.Qpid.dll} / +include name=${Apache.Qpid.dll} / include name=${nunit.dll} / include name=${NUnit.Projectfile} / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_chrono-vc100-mt-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_chrono-vc100-mt-gd-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_date_time-vc100-mt-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_date_time-vc100-mt-gd-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_program_options-vc100-mt-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_program_options-vc100-mt-gd-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_system-vc100-mt-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_system-vc100-mt-gd-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_thread-vc100-mt-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost_thread-vc100-mt-gd-1_47.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpid-proton.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpid-protond.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpidclient.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpidclientd.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpidcommon.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpidcommond.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpidmessaging.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpidmessagingd.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpidtypes.dll / +include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpidtypesd.dll / /fileset fileset id=install.filenames @@ -132,19 +152,6 @@ /target -target name=copy-unmanaged-content description=Copies native DLLs from \lib to \build -foreach item=File property=filename -in items -include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/qpid* / -include name=${basedir}/lib/Apache.Qpid/${current.build.framework}/boost* / -/items /in -do -echo message=Copying unmanaged: ${filename} / -copy todir=${build.bin.dir} file=${filename} if=${not file::up-to-date(filename, '${build.bin.dir}/${filename}')} / -/do
svn commit: r1616059 - /activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:02:46 2014 New Revision: 1616059 URL: http://svn.apache.org/r1616059 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml?rev=1616059r1=1616058r2=1616059view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml Wed Aug 6 01:02:46 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616062 - /activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:03:49 2014 New Revision: 1616062 URL: http://svn.apache.org/r1616062 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml?rev=1616062r1=1616061r2=1616062view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant-common.xml Wed Aug 6 01:03:49 2014 @@ -43,13 +43,13 @@ property name=download.skip value=false unless=${property::exists('download.skip')}/ property name=install.skipvalue=false unless=${property::exists('install.skip')}/ property name=compile.skipvalue=false unless=${property::exists('compile.skip')} / -property name=current.build.configvalue=${if(project.release.type == 'SNAPSHOT', 'debug', 'release')} overwrite=false / +property name=current.build.configvalue=${if(project.release.type == 'release', 'release', 'debug')} overwrite=false / property name=current.build.framework value=${framework::get-target-framework()} overwrite=false / property name=current.build.defines value=${build.defines} / 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')}/ property name=current.build.framework.assembly.dir value=${framework::get-assembly-directory(framework::get-target-framework())} dynamic=true / -property name=build.config.stringsvalue=debug,release unless=${property::exists('build.config.strings')} / +property name=build.config.strings value=${if(property::exists('configuration'), configuration, if(build.skip.release == 'true', 'debug', 'debug,release'))} dynamic=true / !-- Figure out the user's HOME directory -- property name=user.home value=${environment::get-variable('HOME')} @@ -384,7 +384,6 @@ copy todir=${build.bin.dir} file=${content.filename} if=${not file::up-to-date(content.filename, '${build.bin.dir}/${content.filename}')} / /do /foreach -call target=copy-unmanaged-content / /target !-- -- @@ -507,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616060 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:03:16 2014 New Revision: 1616060 URL: http://svn.apache.org/r1616060 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/nant-common.xml?rev=1616060r1=1616059r2=1616060view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/nant-common.xml Wed Aug 6 01:03:16 2014 @@ -206,6 +206,9 @@ property name=current.build.framework.sign value=true / property name=link.sdkdoc.version value=SDK_v2_0 / property name=link.sdkdoc.web value=true / +if test=${framework::exists(current.build.framework)} +property name=nant.settings.currentframework value=${current.build.framework} / +/if !-- Use the .NET 3.5 compiler for improved language features. Still targets same runtime. -- if test=${framework::exists('net-3.5')} property name=nant.settings.currentframework value=net-3.5 / @@ -452,7 +455,7 @@ property name=repo.task.src value=${local.repo.vendor.path}/${repo.task.artifact} / copy file=${repo.task.src} tofile=${lib.task.dest} if=${file::exists(repo.task.src)} / if test=${not file::exists(lib.task.dest)} -echo message=Required dependent assembly ${repo.task.artifact} from ${vendor.name} for ${current.build.framework.name} is not available. Build skipped. / +echo message=Required dependent assembly ${repo.task.artifact} from ${vendor.name} for ${current.build.framework} is not available. Build skipped. / property name=build.skip value=true / /if /foreach @@ -484,7 +487,7 @@ exec program=nunit-console failonerror=true workingdir=build/${current.build.framework}/${current.build.config} arg value=${NUnit.Projectfile} / arg value=-labels / -arg value=-exclude=Manual / +arg value=-exclude=Manual,LongRunning / arg value=-xml=Nunit.TestOutput.xml / /exec /if @@ -503,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616061 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:03:28 2014 New Revision: 1616061 URL: http://svn.apache.org/r1616061 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml?rev=1616061r1=1616060r2=1616061view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml Wed Aug 6 01:03:28 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616064 - /activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:04:21 2014 New Revision: 1616064 URL: http://svn.apache.org/r1616064 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/nant-common.xml?rev=1616064r1=1616063r2=1616064view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/nant-common.xml Wed Aug 6 01:04:21 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616063 - /activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:04:05 2014 New Revision: 1616063 URL: http://svn.apache.org/r1616063 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml?rev=1616063r1=1616062r2=1616063view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml Wed Aug 6 01:04:05 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616065 - /activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:04:39 2014 New Revision: 1616065 URL: http://svn.apache.org/r1616065 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant-common.xml?rev=1616065r1=1616064r2=1616065view=diff == --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/nant-common.xml Wed Aug 6 01:04:39 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616067 - /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:04:53 2014 New Revision: 1616067 URL: http://svn.apache.org/r1616067 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml?rev=1616067r1=1616066r2=1616067view=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml Wed Aug 6 01:04:53 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616070 - /activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:05:35 2014 New Revision: 1616070 URL: http://svn.apache.org/r1616070 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/nant-common.xml?rev=1616070r1=1616069r2=1616070view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/nant-common.xml Wed Aug 6 01:05:35 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616069 - /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:05:25 2014 New Revision: 1616069 URL: http://svn.apache.org/r1616069 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml?rev=1616069r1=1616068r2=1616069view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml Wed Aug 6 01:05:25 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616068 - /activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.6.x/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:05:06 2014 New Revision: 1616068 URL: http://svn.apache.org/r1616068 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.6.x/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.6.x/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.6.x/nant-common.xml?rev=1616068r1=1616067r2=1616068view=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.6.x/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/branches/1.6.x/nant-common.xml Wed Aug 6 01:05:06 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1616071 - /activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml
Author: jgomes Date: Wed Aug 6 01:05:52 2014 New Revision: 1616071 URL: http://svn.apache.org/r1616071 Log: Clean the individual configurations. Fixes [AMQNET-486]. (See https://issues.apache.org/jira/browse/AMQNET-486) Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml?rev=1616071r1=1616070r2=1616071view=diff == --- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml (original) +++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml Wed Aug 6 01:05:52 2014 @@ -506,9 +506,18 @@ if test=${target::exists('clean-init')} call target=clean-init / /if -delete dir=build if=${directory::exists('build')} / -delete dir=obj if=${directory::exists('obj')} / -delete dir=package if=${directory::exists('package')} / +foreach item=String in=${build.framework.strings} delim=, property=current.build.framework +foreach item=String in=${build.config.strings} delim=, property=current.build.config +call target=clean-proj / +/foreach +/foreach +/target + +target name=clean-proj depends=init description=Deletes specific project build +property name=clean.dir value=build/${current.build.framework}/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / +property name=clean.dir value=package/${current.build.config} / +delete dir=${clean.dir} if=${directory::exists(clean.dir)} / /target target name=package description=Bundle the source and binary distributions.
svn commit: r1597145 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk: src/main/csharp/MessageConsumer.cs src/main/csharp/Session.cs src/test/csharp/MessageConsumerTest.cs vs2008-stomp-test.cspro
Author: jgomes Date: Fri May 23 18:26:34 2014 New Revision: 1597145 URL: http://svn.apache.org/r1597145 Log: Copy the ignoreExpiration implementation from the OpenWire provider. Fixes [AMQNET-478]. (See https://issues.apache.org/jira/browse/AMQNET-478) Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/MessageConsumerTest.cs Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs?rev=1597145r1=1597144r2=1597145view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs Fri May 23 18:26:34 2014 @@ -15,6 +15,7 @@ * limitations under the License. */ using System; +using System.Collections.Specialized; using System.Threading; using System.Collections.Generic; using Apache.NMS.Stomp.Commands; @@ -58,14 +59,45 @@ namespace Apache.NMS.Stomp private IRedeliveryPolicy redeliveryPolicy; private Exception failureError; -// Constructor internal to prevent clients from creating an instance. -internal MessageConsumer(Session session, ConsumerInfo info) + // Constructor internal to prevent clients from creating an instance. +internal MessageConsumer(Session session, ConsumerId id, Destination destination, string name, string selector, int prefetch, bool noLocal) { -this.session = session; -this.info = info; + if(destination == null) + { + throw new InvalidDestinationException(Consumer cannot receive on Null Destinations.); + } + + this.session = session; this.redeliveryPolicy = this.session.Connection.RedeliveryPolicy; this.messageTransformation = this.session.Connection.MessageTransformation; -} + + this.info = new ConsumerInfo(); + this.info.ConsumerId = id; + this.info.Destination = Destination.Transform(destination); + this.info.SubscriptionName = name; + this.info.Selector = selector; + this.info.PrefetchSize = prefetch; + this.info.MaximumPendingMessageLimit = session.Connection.PrefetchPolicy.MaximumPendingMessageLimit; + this.info.NoLocal = noLocal; + this.info.DispatchAsync = session.DispatchAsync; + this.info.Retroactive = session.Retroactive; + this.info.Exclusive = session.Exclusive; + this.info.Priority = session.Priority; + this.info.AckMode = session.AcknowledgementMode; + + // If the destination contained a URI query, then use it to set public properties + // on the ConsumerInfo + if(destination.Options != null) + { + // Get options prefixed with consumer.* + StringDictionary options = URISupport.GetProperties(destination.Options, consumer.); + // Extract out custom extension options consumer.nms.* + StringDictionary customConsumerOptions = URISupport.ExtractProperties(options, nms.); + + URISupport.SetProperties(this.info, options); + URISupport.SetProperties(this, customConsumerOptions, nms.); + } + } ~MessageConsumer() { @@ -79,7 +111,12 @@ namespace Apache.NMS.Stomp get { return info.ConsumerId; } } -public int PrefetchSize + public ConsumerInfo ConsumerInfo + { + get { return this.info; } + } + + public int PrefetchSize { get { return this.info.PrefetchSize; } } @@ -90,18 +127,26 @@ namespace Apache.NMS.Stomp set { this.redeliveryPolicy = value; } } -private ConsumerTransformerDelegate consumerTransformer; -public ConsumerTransformerDelegate ConsumerTransformer -{ -get { return this.consumerTransformer; } -set { this.consumerTransformer = value
svn commit: r1596990 - in /activemq/activemq-dotnet/Apache.NMS/trunk: NOTICE.txt Resources/ Resources/AboutResources.txt Resources/Resource.Designer.cs Resources/Values/ Resources/Values/Strings.xml v
Author: jgomes Date: Thu May 22 23:47:22 2014 New Revision: 1596990 URL: http://svn.apache.org/r1596990 Log: Add VisualStudio 2013 solution and Xamarin Android project. Fixes [AMQNET-477]. (See https://issues.apache.org/jira/browse/AMQNET-477) Added: activemq/activemq-dotnet/Apache.NMS/trunk/Resources/ (with props) activemq/activemq-dotnet/Apache.NMS/trunk/Resources/AboutResources.txt activemq/activemq-dotnet/Apache.NMS/trunk/Resources/Resource.Designer.cs activemq/activemq-dotnet/Apache.NMS/trunk/Resources/Values/ (with props) activemq/activemq-dotnet/Apache.NMS/trunk/Resources/Values/Strings.xml activemq/activemq-dotnet/Apache.NMS/trunk/vs2013-nms-android.csproj activemq/activemq-dotnet/Apache.NMS/trunk/vs2013-nms.sln Modified: activemq/activemq-dotnet/Apache.NMS/trunk/NOTICE.txt Modified: activemq/activemq-dotnet/Apache.NMS/trunk/NOTICE.txt URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/NOTICE.txt?rev=1596990r1=1596989r2=1596990view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/NOTICE.txt (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/NOTICE.txt Thu May 22 23:47:22 2014 @@ -5,7 +5,7 @@ = Apache ActiveMQ -Copyright 2005-2006 The Apache Software Foundation +Copyright 2005-2014 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). Propchange: activemq/activemq-dotnet/Apache.NMS/trunk/Resources/ -- bugtraq:label = Issue#: Propchange: activemq/activemq-dotnet/Apache.NMS/trunk/Resources/ -- --- bugtraq:message (added) +++ bugtraq:message Thu May 22 23:47:22 2014 @@ -0,0 +1 @@ +Fixes [AMQNET-%BUGID%]. (See https://issues.apache.org/jira/browse/AMQNET-%BUGID%) Propchange: activemq/activemq-dotnet/Apache.NMS/trunk/Resources/ -- bugtraq:url = https://issues.apache.org/jira/browse/AMQNET-%BUGID% Added: activemq/activemq-dotnet/Apache.NMS/trunk/Resources/AboutResources.txt URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/Resources/AboutResources.txt?rev=1596990view=auto == --- activemq/activemq-dotnet/Apache.NMS/trunk/Resources/AboutResources.txt (added) +++ activemq/activemq-dotnet/Apache.NMS/trunk/Resources/AboutResources.txt Thu May 22 23:47:22 2014 @@ -0,0 +1,50 @@ +Images, layout descriptions, binary blobs and string dictionaries can be included +in your application as resource files. Various Android APIs are designed to +operate on the resource IDs instead of dealing with images, strings or binary blobs +directly. + +For example, a sample Android app that contains a user interface layout (main.xml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) +would keep its resources in the Resources directory of the application: + +Resources/ +drawable-hdpi/ +icon.png + +drawable-ldpi/ +icon.png + +drawable-mdpi/ +icon.png + +layout/ +main.xml + +values/ +strings.xml + +In order to get the build system to recognize Android resources, set the build action to +AndroidResource. The native Android APIs do not operate directly with filenames, but +instead operate on resource IDs. When you compile an Android application that uses resources, +the build system will package the resources for distribution and generate a class called +Resource that contains the tokens for each one of the resources included. For example, +for the above Resources layout, this is what the Resource class would expose: + +public class Resource { +public class drawable { +public const int icon = 0x123; +} + +public class layout { +public const int main = 0x456; +} + +public class strings { +public const int first_string = 0xabc; +public const int second_string = 0xbcd; +} +} + +You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main +to reference the layout/main.xml file, or Resource.strings.first_string to reference the first +string in the dictionary file values/strings.xml. \ No newline at end of file Added: activemq/activemq-dotnet/Apache.NMS/trunk/Resources/Resource.Designer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/Resources/Resource.Designer.cs?rev=1596990view=auto == --- activemq/activemq-dotnet/Apache.NMS/trunk/Resources/Resource.Designer.cs (added
svn commit: r1596992 - in /activemq/activemq-dotnet/Apache.NMS.MQTT/trunk: ./ Resources/ Resources/Values/ src/main/csharp/Properties/
Author: jgomes Date: Thu May 22 23:51:20 2014 New Revision: 1596992 URL: http://svn.apache.org/r1596992 Log: Add VisualStudio 2013 solution and Xamarin Android project. Fixes [AMQNET-477]. (See https://issues.apache.org/jira/browse/AMQNET-477) Added: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/ (with props) activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/AboutResources.txt activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/Resource.Designer.cs activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/Values/ (with props) activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/Values/Strings.xml activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Properties/ (with props) activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2013-mqtt-android.csproj activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2013-mqtt.sln Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/README.txt Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/README.txt URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/README.txt?rev=1596992r1=1596991r2=1596992view=diff == --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/README.txt (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/README.txt Thu May 22 23:51:20 2014 @@ -1,6 +1,6 @@ === Welcome to: - * Apache.NMS.ActiveMQ : Apache NMS for MQTT Client Library + * Apache.NMS.MQTT : Apache NMS for MQTT Client Library === For more information see http://activemq.apache.org/nms @@ -9,7 +9,7 @@ For more information see http://activemq Building With NAnt 0.91 see http://nant.sourceforge.net/ === -NAnt version 0.86 91 newer is required to build Apache.NMS.ActiveMQ. Version 0.90 +NAnt version 0.86 91 newer is required to build Apache.NMS.MQTT. Version 0.90 or newer is highly recommended. To build the code using NAnt, run: @@ -36,7 +36,7 @@ To generate the documentation, run: nant sandcastle-all === -Building With Visual Studio 2008 +Building With Visual Studio 2010 === First build the project with nant, this will download and install Propchange: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/ -- bugtraq:label = Issue#: Propchange: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/ -- --- bugtraq:message (added) +++ bugtraq:message Thu May 22 23:51:20 2014 @@ -0,0 +1 @@ +Fixes [AMQNET-%BUGID%]. (See https://issues.apache.org/jira/browse/AMQNET-%BUGID%) Propchange: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/ -- bugtraq:url = https://issues.apache.org/jira/browse/AMQNET-%BUGID% Added: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/AboutResources.txt URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/AboutResources.txt?rev=1596992view=auto == --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/AboutResources.txt (added) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/Resources/AboutResources.txt Thu May 22 23:51:20 2014 @@ -0,0 +1,50 @@ +Images, layout descriptions, binary blobs and string dictionaries can be included +in your application as resource files. Various Android APIs are designed to +operate on the resource IDs instead of dealing with images, strings or binary blobs +directly. + +For example, a sample Android app that contains a user interface layout (main.xml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) +would keep its resources in the Resources directory of the application: + +Resources/ +drawable-hdpi/ +icon.png + +drawable-ldpi/ +icon.png + +drawable-mdpi/ +icon.png + +layout/ +main.xml + +values/ +strings.xml + +In order to get the build system to recognize Android resources, set the build action to +AndroidResource. The native Android APIs do not operate directly with filenames, but +instead operate on resource IDs. When you compile an Android application that uses resources, +the build system will package the resources for distribution and generate a class called +Resource that contains the tokens for each one of the resources included. For example, +for the above Resources layout
svn commit: r1596991 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk: ./ Resources/ Resources/Values/ src/main/csharp/Properties/
Author: jgomes Date: Thu May 22 23:50:45 2014 New Revision: 1596991 URL: http://svn.apache.org/r1596991 Log: Add VisualStudio 2013 solution and Xamarin Android project. Fixes [AMQNET-477]. (See https://issues.apache.org/jira/browse/AMQNET-477) Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/ (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/AboutResources.txt activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/Resource.Designer.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/Values/ (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/Values/Strings.xml activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Properties/ (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2013-stomp-android.csproj activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2013-stomp.sln Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/ -- bugtraq:label = Issue#: Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/ -- --- bugtraq:message (added) +++ bugtraq:message Thu May 22 23:50:45 2014 @@ -0,0 +1 @@ +Fixes [AMQNET-%BUGID%]. (See https://issues.apache.org/jira/browse/AMQNET-%BUGID%) Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/ -- bugtraq:url = https://issues.apache.org/jira/browse/AMQNET-%BUGID% Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/AboutResources.txt URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/AboutResources.txt?rev=1596991view=auto == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/AboutResources.txt (added) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/AboutResources.txt Thu May 22 23:50:45 2014 @@ -0,0 +1,50 @@ +Images, layout descriptions, binary blobs and string dictionaries can be included +in your application as resource files. Various Android APIs are designed to +operate on the resource IDs instead of dealing with images, strings or binary blobs +directly. + +For example, a sample Android app that contains a user interface layout (main.xml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) +would keep its resources in the Resources directory of the application: + +Resources/ +drawable-hdpi/ +icon.png + +drawable-ldpi/ +icon.png + +drawable-mdpi/ +icon.png + +layout/ +main.xml + +values/ +strings.xml + +In order to get the build system to recognize Android resources, set the build action to +AndroidResource. The native Android APIs do not operate directly with filenames, but +instead operate on resource IDs. When you compile an Android application that uses resources, +the build system will package the resources for distribution and generate a class called +Resource that contains the tokens for each one of the resources included. For example, +for the above Resources layout, this is what the Resource class would expose: + +public class Resource { +public class drawable { +public const int icon = 0x123; +} + +public class layout { +public const int main = 0x456; +} + +public class strings { +public const int first_string = 0xabc; +public const int second_string = 0xbcd; +} +} + +You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main +to reference the layout/main.xml file, or Resource.strings.first_string to reference the first +string in the dictionary file values/strings.xml. \ No newline at end of file Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/Resource.Designer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/Resource.Designer.cs?rev=1596991view=auto == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/Resource.Designer.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/Resources/Resource.Designer.cs Thu May 22 23:50:45 2014 @@ -0,0 +1,60 @@ +#pragma warning disable 1591 +//-- +// auto-generated +// This code was generated by a tool. +// Runtime Version:4.0.30319.18444 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// /auto-generated +//-- + +[assembly: global
svn commit: r1589320 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x: ./ src/main/csharp/Transport/Tcp/TcpTransport.cs
Author: jgomes Date: Wed Apr 23 00:03:25 2014 New Revision: 1589320 URL: http://svn.apache.org/r1589320 Log: Merged revision(s) 1550241 from activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk: Move the blocking code outside of the lock section to avoid race condition when shutting down. Fixes [AMQNET-338]. (See https://issues.apache.org/jira/browse/AMQNET-338) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/ (props changed) activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Transport/Tcp/TcpTransport.cs Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/ -- Merged /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:r1550241 Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Transport/Tcp/TcpTransport.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Transport/Tcp/TcpTransport.cs?rev=1589320r1=1589319r2=1589320view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Transport/Tcp/TcpTransport.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Transport/Tcp/TcpTransport.cs Wed Apr 23 00:03:25 2014 @@ -188,6 +188,8 @@ namespace Apache.NMS.ActiveMQ.Transport. public void Close() { + Thread theReadThread = null; + lock(myLock) { if(closed.CompareAndSet(false, true)) @@ -238,20 +240,27 @@ namespace Apache.NMS.ActiveMQ.Transport. { } - if(null != readThread) + theReadThread = this.readThread; + this.readThread = null; + this.started = false; + } + } + + // Don't block on closing the read thread within the lock scope. + if(null != theReadThread) + { + try + { + if(Thread.CurrentThread != theReadThread theReadThread.IsAlive) { - if(Thread.CurrentThread != readThread readThread.IsAlive) + if(!theReadThread.Join((int) MAX_THREAD_WAIT.TotalMilliseconds)) { - if(!readThread.Join((int) MAX_THREAD_WAIT.TotalMilliseconds)) - { - readThread.Abort(); - } + theReadThread.Abort(); } - - readThread = null; } - - started = false; + } + catch + { } } }
svn commit: r1586176 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
Author: jgomes Date: Wed Apr 9 23:55:39 2014 New Revision: 1586176 URL: http://svn.apache.org/r1586176 Log: Use the producer Id passed in to the create function. Fixes [AMQNET-475]. (See https://issues.apache.org/jira/browse/AMQNET-475) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs?rev=1586176r1=1586175r2=1586176view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs Wed Apr 9 23:55:39 2014 @@ -455,7 +455,7 @@ namespace Apache.NMS.ActiveMQ internal virtual MessageProducer DoCreateMessageProducer(ProducerId id, ActiveMQDestination destination) { -return new MessageProducer(this, GetNextProducerId(), destination, this.RequestTimeout); +return new MessageProducer(this, id, destination, this.RequestTimeout); } public IMessageConsumer CreateConsumer(IDestination destination)
svn commit: r1579357 - in /activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src: main/csharp/BaseMessage.cs main/csharp/Connection.cs main/csharp/Destination.cs main/csharp/MessageConsumer.cs main/csharp
Author: jgomes Date: Wed Mar 19 19:09:34 2014 New Revision: 1579357 URL: http://svn.apache.org/r1579357 Log: Implement disposable pattern for Connection. Only dispose the producer endpoint after its final release. Add overloaded send/receive API for destinations. Initialize the sockets on the correct message handler thread. Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Connection.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageProducer.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/test/csharp/ZMQTest.cs Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs?rev=1579357r1=1579356r2=1579357view=diff == --- activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/BaseMessage.cs Wed Mar 19 19:09:34 2014 @@ -29,7 +29,7 @@ namespace Apache.NMS.ZMQ private string correlationId; private TimeSpan timeToLive; private string messageId; - private MsgDeliveryMode deliveryMode; + private MsgDeliveryMode deliveryMode = MsgDeliveryMode.NonPersistent; private MsgPriority priority; private Destination replyTo; private byte[] content; Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Connection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Connection.cs?rev=1579357r1=1579356r2=1579357view=diff == --- activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Connection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Connection.cs Wed Mar 19 19:09:34 2014 @@ -19,6 +19,7 @@ using System; using ZeroMQ; using System.Collections.Generic; using System.Text; +using System.Collections; namespace Apache.NMS.ZMQ { @@ -46,24 +47,87 @@ namespace Apache.NMS.ZMQ /// summary /// ZMQ context /// /summary + private static object contextLock = new object(); + private static int instanceCount = 0; private static ZmqContext _context; - private static Dictionarystring, ProducerRef producerCache; - private static object producerCacheLock; + private static Dictionarystring, ProducerRef producerCache = new Dictionarystring, ProducerRef(); + private static object producerCacheLock = new object(); + private TimeSpan zeroTimeout = new TimeSpan(0); - static Connection() + private bool disposed = false; + + private static void InitContext() + { + lock(contextLock) + { + if(0 == instanceCount++) + { + Connection._context = ZmqContext.Create(); + } + } + } + + private static void DestroyContext() { - Connection._context = ZmqContext.Create(); - Connection.producerCache = new Dictionarystring, ProducerRef(); - Connection.producerCacheLock = new object(); + lock(contextLock) + { + if(0 == --instanceCount) + { + Connection._context.Dispose(); + } + } } public Connection(Uri connectionUri) { + InitContext(); this.brokerUri = connectionUri; this.producerContextBinding = string.Format({0}://*:{1}, this.brokerUri.Scheme, this.brokerUri.Port); this.consumerContextBinding = string.Format({0}://{1}:{2}, brokerUri.Scheme, brokerUri.Host, this.brokerUri.Port); } + ~Connection() + { + Dispose(false); + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + private void Dispose
svn commit: r1576847 - /activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/BaseMessage.cs
Author: jgomes Date: Wed Mar 12 18:36:05 2014 New Revision: 1576847 URL: http://svn.apache.org/r1576847 Log: Added GetHashCode() implementation. When overriding Equals(), this should also be implemented. Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/BaseMessage.cs Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/BaseMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/BaseMessage.cs?rev=1576847r1=1576846r2=1576847view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/BaseMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/BaseMessage.cs Wed Mar 12 18:36:05 2014 @@ -209,6 +209,62 @@ namespace Apache.NMS.Amqp return true; } + public override int GetHashCode() + { + int hashCode = 0; + + if(propertiesMap != null) + { + hashCode ^= propertiesMap.GetHashCode(); + } + + if(destination != null) + { + hashCode ^= destination.GetHashCode(); + } + + if(correlationId != null) + { + hashCode ^= correlationId.GetHashCode(); + } + + if(timeToLive != null) + { + hashCode ^= timeToLive.GetHashCode(); + } + + if(messageId != null) + { + hashCode ^= messageId.GetHashCode(); + } + + hashCode ^= deliveryMode.GetHashCode(); + hashCode ^= priority.GetHashCode(); + + if(replyTo != null) + { + hashCode ^= replyTo.GetHashCode(); + } + + if(content != null) + { + hashCode ^= content.GetHashCode(); + } + + if(type != null) + { + hashCode ^= type.GetHashCode(); + } + + if(timestamp != null) + { + hashCode ^= timestamp.GetHashCode(); + } + + hashCode ^= readOnlyMsgBody.GetHashCode(); + return hashCode; + } + public bool ReadOnlyBody { get { return readOnlyMsgBody; }
svn commit: r1576986 - in /activemq/activemq-dotnet/Apache.NMS/trunk/src: main/csharp/IDestination.cs test/csharp/Commands/Destination.cs
Author: jgomes Date: Wed Mar 12 23:09:42 2014 New Revision: 1576986 URL: http://svn.apache.org/r1576986 Log: Add IDisposable interface to IDestination. Fixes [AMQNET-473]. (See https://issues.apache.org/jira/browse/AMQNET-473) Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IDestination.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IDestination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IDestination.cs?rev=1576986r1=1576985r2=1576986view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IDestination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IDestination.cs Wed Mar 12 23:09:42 2014 @@ -26,23 +26,18 @@ namespace Apache.NMS TemporaryQueue, TemporaryTopic } - - + /// summary /// A base interface for destinations such as queues or topics /// /summary - public interface IDestination + public interface IDestination : System.IDisposable { - DestinationType DestinationType { get; } bool IsTopic { get; } - bool IsQueue { get; } - bool IsTemporary { get; } } - } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs?rev=1576986r1=1576985r2=1576986view=diff == --- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/Commands/Destination.cs Wed Mar 12 23:09:42 2014 @@ -49,6 +49,8 @@ namespace Apache.NMS.Commands private String physicalName = ; private StringDictionary options = null; + private bool disposed = false; + /// summary /// The Default Constructor /// /summary @@ -65,7 +67,47 @@ namespace Apache.NMS.Commands setPhysicalName(name); } -public bool IsTopic + ~Destination() + { + Dispose(false); + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + private void Dispose(bool disposing) + { + if(disposed) + { + return; + } + + if(disposing) + { + try + { + OnDispose(); + } + catch(Exception ex) + { + Tracer.ErrorFormat(Exception disposing Destination {0}: {1}, this.physicalName, ex.Message); + } + } + + disposed = true; + } + + /// summary + /// Child classes can override this method to perform clean-up logic. + /// /summary + protected virtual void OnDispose() + { + } + + public bool IsTopic { get {
svn commit: r1576987 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ActiveMQDestination.cs
Author: jgomes Date: Wed Mar 12 23:10:26 2014 New Revision: 1576987 URL: http://svn.apache.org/r1576987 Log: Add IDisposable interface to IDestination. Fixes [AMQNET-473]. (See https://issues.apache.org/jira/browse/AMQNET-473) Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ActiveMQDestination.cs Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ActiveMQDestination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ActiveMQDestination.cs?rev=1576987r1=1576986r2=1576987view=diff == --- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ActiveMQDestination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ActiveMQDestination.cs Wed Mar 12 23:10:26 2014 @@ -95,6 +95,10 @@ namespace Apache.NMS.ActiveMQ.Commands //this.advisory = name != null name.StartsWith(ADVISORY_PREFIX); } +public void Dispose() +{ +} + public bool IsTopic { get
svn commit: r1576988 - in /activemq/activemq-dotnet/Apache.NMS.AMQP/trunk: nant.build src/main/csharp/Destination.cs
Author: jgomes Date: Wed Mar 12 23:12:31 2014 New Revision: 1576988 URL: http://svn.apache.org/r1576988 Log: Add IDisposable interface to IDestination. Fixes [AMQNET-473]. (See https://issues.apache.org/jira/browse/AMQNET-473) Set the NMS version dependency to 1.7.0 for trunk development. Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Destination.cs Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build?rev=1576988r1=1576987r2=1576988view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/nant.build Wed Mar 12 23:12:31 2014 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.AMQP / property name=project.group value=org.apache.activemq / -property name=project.version value=1.6.0 unless=${property::exists('project.version')} / +property name=project.version value=1.7.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for AMQP Class Library / property name=project.description value=Apache NMS for AMQP Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for AMQP using Apache QPID and Proton / Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Destination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Destination.cs?rev=1576988r1=1576987r2=1576988view=diff == --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Destination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Destination.cs Wed Mar 12 23:12:31 2014 @@ -100,6 +100,12 @@ namespace Apache.NMS.Amqp qpidAddress = new Org.Apache.Qpid.Messaging.Address(other.Address); } + /** +* Dispose of the destination object. +*/ + public void Dispose() + { + } /** * Path property @@ -195,7 +201,6 @@ namespace Apache.NMS.Amqp return result; } - /** * Qpid Address accessor * Name property
svn commit: r1576990 - in /activemq/activemq-dotnet/Apache.NMS.EMS/trunk: nant.build src/main/csharp/Queue.cs src/main/csharp/Session.cs src/main/csharp/TemporaryTopic.cs src/main/csharp/Topic.cs
Author: jgomes Date: Wed Mar 12 23:14:08 2014 New Revision: 1576990 URL: http://svn.apache.org/r1576990 Log: Add IDisposable interface to IDestination. Fixes [AMQNET-473]. (See https://issues.apache.org/jira/browse/AMQNET-473) Set the NMS version dependency to 1.7.0 for trunk development. Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Queue.cs activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/TemporaryTopic.cs activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Topic.cs Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build?rev=1576990r1=1576989r2=1576990view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build Wed Mar 12 23:14:08 2014 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.EMS / property name=project.group value=org.apache.activemq / - property name=project.version value=1.6.0 unless=${property::exists('project.version')} / + property name=project.version value=1.7.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for EMS Class Library / property name=project.description value=Apache NMS for EMS Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for EMS / @@ -56,7 +56,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / - property name=vendor.apache.org.version value=1.6.0 / + property name=vendor.apache.org.version value=1.7.0 / property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' -- Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Queue.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Queue.cs?rev=1576990r1=1576989r2=1576990view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Queue.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Queue.cs Wed Mar 12 23:14:08 2014 @@ -30,7 +30,11 @@ namespace Apache.NMS.EMS { } - #region IQueue Members +public void Dispose() +{ +} + +#region IQueue Members public string QueueName { Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs?rev=1576990r1=1576989r2=1576990view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs Wed Mar 12 23:14:08 2014 @@ -407,9 +407,11 @@ namespace Apache.NMS.EMS #region Transaction State Events +#pragma warning disable 0067 public event SessionTxEventDelegate TransactionStartedListener; public event SessionTxEventDelegate TransactionCommittedListener; public event SessionTxEventDelegate TransactionRolledBackListener; +#pragma warning restore 0067 #endregion Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/TemporaryTopic.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/TemporaryTopic.cs?rev=1576990r1=1576989r2=1576990view=diff == --- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/TemporaryTopic.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/TemporaryTopic.cs Wed Mar 12 23:14:08 2014 @@ -30,7 +30,7 @@ namespace Apache.NMS.EMS { } - #region IDestination Members +#region IDestination Members public new Apache.NMS.DestinationType DestinationType { Modified: activemq/activemq-dotnet
svn commit: r1576992 - in /activemq/activemq-dotnet/Apache.NMS.MQTT/trunk: ./ src/main/csharp/ src/test/csharp/
Author: jgomes Date: Wed Mar 12 23:16:10 2014 New Revision: 1576992 URL: http://svn.apache.org/r1576992 Log: Add IDisposable interface to IDestination. Fixes [AMQNET-473]. (See https://issues.apache.org/jira/browse/AMQNET-473) Rename the vs2008 projects to vs2010. They were actually VS 2010 format projects already, so they should be consistently named. Added: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2010-mqtt-tests.csproj - copied, changed from r1576553, activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2008-mqtt-tests.csproj activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2010-mqtt.csproj - copied, changed from r1576553, activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2008-mqtt.csproj activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2010-mqtt.sln - copied, changed from r1576553, activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2008-mqtt.sln Removed: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2008-mqtt-tests.csproj activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2008-mqtt.csproj activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2008-mqtt.sln Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Connection.cs activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Topic.cs activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/MQTTSessionTest.cs Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Connection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Connection.cs?rev=1576992r1=1576991r2=1576992view=diff == --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Connection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Connection.cs Wed Mar 12 23:16:10 2014 @@ -82,13 +82,17 @@ namespace Apache.NMS.MQTT /// An asynchronous listener that is notified when a Fault tolerant connection /// has been interrupted. /// /summary + #pragma warning disable 0067 public event ConnectionInterruptedListener ConnectionInterruptedListener; + #pragma warning restore 0067 /// summary /// An asynchronous listener that is notified when a Fault tolerant connection /// has been resumed. /// /summary + #pragma warning disable 0067 public event ConnectionResumedListener ConnectionResumedListener; + #pragma warning restore 0067 private ConsumerTransformerDelegate consumerTransformer; public ConsumerTransformerDelegate ConsumerTransformer Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Topic.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Topic.cs?rev=1576992r1=1576991r2=1576992view=diff == --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Topic.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/main/csharp/Topic.cs Wed Mar 12 23:16:10 2014 @@ -32,6 +32,10 @@ namespace Apache.NMS.MQTT this.name = name; } + public void Dispose() + { + } + public string TopicName { get { return this.name; } Modified: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/MQTTSessionTest.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/MQTTSessionTest.cs?rev=1576992r1=1576991r2=1576992view=diff == --- activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/MQTTSessionTest.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/src/test/csharp/MQTTSessionTest.cs Wed Mar 12 23:16:10 2014 @@ -16,7 +16,6 @@ // using System; using Apache.NMS.Test; -using Apache.NMS.MQTT; using NUnit.Framework; namespace Apache.NMS.MQTT.Test @@ -27,7 +26,7 @@ namespace Apache.NMS.MQTT.Test private IConnection connection; [SetUp] -public void SetUp() +public override void SetUp() { Apache.NMS.Tracer.Trace = new NmsConsoleTracer(); base.SetUp(); Copied: activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2010-mqtt-tests.csproj (from r1576553, activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2008-mqtt-tests.csproj) URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2010-mqtt-tests.csproj?p2=activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2010-mqtt-tests.csprojp1=activemq/activemq-dotnet/Apache.NMS.MQTT/trunk/vs2008-mqtt-tests.csprojr1
svn commit: r1576993 - in /activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk: nant.build src/main/csharp/Destination.cs src/main/csharp/Session.cs
Author: jgomes Date: Wed Mar 12 23:16:49 2014 New Revision: 1576993 URL: http://svn.apache.org/r1576993 Log: Add IDisposable interface to IDestination. Fixes [AMQNET-473]. (See https://issues.apache.org/jira/browse/AMQNET-473) Set the NMS version dependency to 1.7.0 for trunk development. Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Destination.cs activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build?rev=1576993r1=1576992r2=1576993view=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build Wed Mar 12 23:16:49 2014 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.MSMQ / property name=project.group value=org.apache.activemq / -property name=project.version value=1.6.0 unless=${property::exists('project.version')} / +property name=project.version value=1.7.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for MSMQ Class Library / property name=project.description value=Apache NMS for MSMQ Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for MSMQ / @@ -52,7 +52,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.6.0 / +property name=vendor.apache.org.version value=1.7.0 / property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb / !-- Property grouping for 'vendor.nunit.org' -- Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Destination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Destination.cs?rev=1576993r1=1576992r2=1576993view=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Destination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Destination.cs Wed Mar 12 23:16:49 2014 @@ -43,6 +43,10 @@ namespace Apache.NMS.MSMQ Path = name; } +public void Dispose() +{ +} + public String Path { get { return this.path; } Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs?rev=1576993r1=1576992r2=1576993view=diff == --- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs Wed Mar 12 23:16:49 2014 @@ -265,9 +265,11 @@ namespace Apache.NMS.MSMQ #region Transaction State Events +#pragma warning disable 0067 public event SessionTxEventDelegate TransactionStartedListener; public event SessionTxEventDelegate TransactionCommittedListener; public event SessionTxEventDelegate TransactionRolledBackListener; +#pragma warning restore 0067 #endregion
svn commit: r1576995 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk: nant.build src/main/csharp/Commands/Destination.cs
Author: jgomes Date: Wed Mar 12 23:17:14 2014 New Revision: 1576995 URL: http://svn.apache.org/r1576995 Log: Add IDisposable interface to IDestination. Fixes [AMQNET-473]. (See https://issues.apache.org/jira/browse/AMQNET-473) Set the NMS version dependency to 1.7.0 for trunk development. Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build?rev=1576995r1=1576994r2=1576995view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant.build Wed Mar 12 23:17:14 2014 @@ -22,7 +22,7 @@ property name=basedir value=${project::get-base-directory()} / property name=project.name value=Apache.NMS.Stomp / property name=project.group value=org.apache.activemq / -property name=project.version value=1.6.0 unless=${property::exists('project.version')} / +property name=project.version value=1.7.0 unless=${property::exists('project.version')} / property name=project.release.type value=SNAPSHOT unless=${property::exists('project.release.type')} / property name=project.short_description value=Apache NMS for Stomp Class Library / property name=project.description value=Apache NMS for Stomp Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for Stomp / @@ -46,7 +46,7 @@ !-- Property grouping for 'vendor.apache.org' -- property name=vendor.apache.org.name value=Apache.NMS / property name=vendor.apache.org.group value=org.apache.activemq / -property name=vendor.apache.org.version value=1.6.0 / +property name=vendor.apache.org.version value=1.7.0 / if test=${current.build.framework == 'mono-2.0' or current.build.framework == 'mono-4.0'} property name=vendor.apache.org.filenames value=Apache.NMS.dll,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.dll.mdb / /if Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs?rev=1576995r1=1576994r2=1576995view=diff == --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs Wed Mar 12 23:17:14 2014 @@ -67,6 +67,10 @@ namespace Apache.NMS.Stomp.Commands SetPhysicalName(name); } +public void Dispose() +{ +} + public bool IsTopic { get
svn commit: r1576997 - in /activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src: main/csharp/ test/csharp/
Author: jgomes Date: Wed Mar 12 23:19:06 2014 New Revision: 1576997 URL: http://svn.apache.org/r1576997 Log: Add IDisposable interface to IDestination. Fixes [AMQNET-473]. (See https://issues.apache.org/jira/browse/AMQNET-473) Complete provider implementation for ZeroMQ. Fixes [AMQNET-333]. (See https://issues.apache.org/jira/browse/AMQNET-333) Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/MessageProducer.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Queue.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/TemporaryQueue.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/TemporaryTopic.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Topic.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/test/csharp/MultiProducersMultiConsumers.cs activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/test/csharp/ZMQTest.cs Modified: activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs?rev=1576997r1=1576996r2=1576997view=diff == --- activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Destination.cs Wed Mar 12 23:19:06 2014 @@ -34,6 +34,8 @@ namespace Apache.NMS.ZMQ protected ZmqSocket consumerEndpoint = null; protected string destinationName; + private bool disposed = false; + /// summary /// Construct the Destination with a defined physical name. /// /summary @@ -46,16 +48,58 @@ namespace Apache.NMS.ZMQ ~Destination() { - // TODO: Implement IDisposable pattern + Dispose(false); + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + private void Dispose(bool disposing) + { + if(disposed) + { + return; + } + + if(disposing) + { + try + { + OnDispose(); + } + catch(Exception ex) + { + Tracer.ErrorFormat(Exception disposing Destination {0}: {1}, this.Name, ex.Message); + } + } + + disposed = true; + } + + /// summary + /// Child classes can override this method to perform clean-up logic. + /// /summary + protected virtual void OnDispose() + { if(null != this.producerEndpoint) { - this.session.Connection.ReleaseProducer(this.producerEndpoint); + if(null != this.session +null != this.session.Connection) + { + this.session.Connection.ReleaseProducer(this.producerEndpoint); + } + + this.producerEndpoint.Dispose(); this.producerEndpoint = null; } if(null != this.consumerEndpoint) { this.session.Connection.ReleaseConsumer(this.consumerEndpoint); + this.consumerEndpoint.Dispose(); this.consumerEndpoint = null; } } @@ -69,8 +113,8 @@ namespace Apache.NMS.ZMQ { get { - return DestinationType == DestinationType.Topic - || DestinationType == DestinationType.TemporaryTopic; + return this.DestinationType == DestinationType.Topic + || this.DestinationType == DestinationType.TemporaryTopic; } } @@ -78,8 +122,8 @@ namespace Apache.NMS.ZMQ { get { - return
svn commit: r1577004 - /activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/
Author: jgomes Date: Wed Mar 12 23:29:10 2014 New Revision: 1577004 URL: http://svn.apache.org/r1577004 Log: Branch 1.6.x version. Added: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/ (props changed) - copied from r1555200, activemq/activemq-dotnet/Apache.NMS.EMS/trunk/ Propchange: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/ -- --- svn:ignore (added) +++ svn:ignore Wed Mar 12 23:29:10 2014 @@ -0,0 +1,6 @@ +build +obj +*.suo +lib +package +.project Propchange: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.6.x/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Wed Mar 12 23:29:10 2014 @@ -0,0 +1 @@ +/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.5.x:1172914
svn commit: r1577005 - /activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/
Author: jgomes Date: Wed Mar 12 23:30:27 2014 New Revision: 1577005 URL: http://svn.apache.org/r1577005 Log: Branch 1.6.x version. Added: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/ (props changed) - copied from r1562844, activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/ Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/ -- --- svn:ignore (added) +++ svn:ignore Wed Mar 12 23:30:27 2014 @@ -0,0 +1,11 @@ +*.suo +.project +.settings +build +lib +obj +package +vs2008-stomp-test.pidb +vs2008-stomp.pidb +vs2008-stomp.userprefs +TestResult.xml Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.6.x/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Wed Mar 12 23:30:27 2014 @@ -0,0 +1 @@ +/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x:1135832,1137086,1294897,1295259,1374470,1375156,1375292,1376784