SPRNET-1365 - Update to ActiveMQ NMS 1.4
SPRNET-1369 - NmsTemplate was not attempting to start the connection when calling RecieveAndConvert
This commit is contained in:
@@ -103,6 +103,16 @@ namespace Spring.Messaging.Nms.Connections
|
||||
// It's a cached MessageConsumer...
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Delegate that is called each time a Message is dispatched to allow the client to do
|
||||
/// any necessary transformations on the received message before it is delivered.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { return target.ConsumerTransformer; }
|
||||
set { target.ConsumerTransformer = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose of wrapped MessageConsumer
|
||||
|
||||
@@ -187,6 +187,19 @@ namespace Spring.Messaging.Nms.Connections
|
||||
{
|
||||
return target.CreateStreamMessage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A delegate that is called each time a Message is sent from this Producer which allows
|
||||
/// the application to perform any needed transformations on the Message before it is sent.
|
||||
/// The Session instance sets the delegate on each Producer it creates.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ProducerTransformerDelegate ProducerTransformer
|
||||
{
|
||||
get { return target.ProducerTransformer; }
|
||||
set { target.ProducerTransformer = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -534,6 +534,29 @@ namespace Spring.Messaging.Nms.Connections
|
||||
target.Rollback();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Delegate that is called each time a Message is dispatched to allow the client to do
|
||||
/// any necessary transformations on the received message before it is delivered.
|
||||
/// The Session instance sets the delegate on each Consumer it creates.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { return target.ConsumerTransformer; }
|
||||
set { target.ConsumerTransformer = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A delegate that is called each time a Message is sent from this Producer which allows
|
||||
/// the application to perform any needed transformations on the Message before it is sent.
|
||||
/// The Session instance sets the delegate on each Producer it creates.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ProducerTransformerDelegate ProducerTransformer
|
||||
{
|
||||
get { return target.ProducerTransformer; }
|
||||
set { target.ProducerTransformer = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the request timeout.
|
||||
/// </summary>
|
||||
|
||||
@@ -218,6 +218,34 @@ namespace Spring.Messaging.Nms.Connections
|
||||
set { targetConnectionFactory.RedeliveryPolicy = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Delegate that is called each time a Message is dispatched to allow the client to do
|
||||
/// any necessary transformations on the received message before it is delivered. The
|
||||
/// ConnectionFactory sets the provided delegate instance on each Connection instance that
|
||||
/// is created from this factory, each connection in turn passes the delegate along to each
|
||||
/// Session it creates which then passes that along to the Consumers it creates.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { return targetConnectionFactory.ConsumerTransformer; }
|
||||
set { targetConnectionFactory.ConsumerTransformer = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A delegate that is called each time a Message is sent from this Producer which allows
|
||||
/// the application to perform any needed transformations on the Message before it is sent.
|
||||
/// The ConnectionFactory sets the provided delegate instance on each Connection instance that
|
||||
/// is created from this factory, each connection in turn passes the delegate along to each
|
||||
/// Session it creates which then passes that along to the Producers it creates.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ProducerTransformerDelegate ProducerTransformer
|
||||
{
|
||||
get { return targetConnectionFactory.ProducerTransformer; }
|
||||
set { targetConnectionFactory.ProducerTransformer = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the connection monitor.
|
||||
/// </summary>
|
||||
@@ -478,6 +506,18 @@ namespace Spring.Messaging.Nms.Connections
|
||||
// don't pass the call to the target.
|
||||
}
|
||||
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { return target.ConsumerTransformer; }
|
||||
set { target.ConsumerTransformer = value; }
|
||||
}
|
||||
|
||||
public ProducerTransformerDelegate ProducerTransformer
|
||||
{
|
||||
get { return target.ProducerTransformer; }
|
||||
set { target.ProducerTransformer = value; }
|
||||
}
|
||||
|
||||
public TimeSpan RequestTimeout
|
||||
{
|
||||
get { return target.RequestTimeout; }
|
||||
|
||||
@@ -958,8 +958,8 @@ namespace Spring.Messaging.Nms.Core
|
||||
/// </returns>
|
||||
/// <throws>NMSException if there is any problem</throws>
|
||||
public IMessage Receive(IDestination destination)
|
||||
{
|
||||
return Execute(new ReceiveCallback(this, destination)) as IMessage;
|
||||
{
|
||||
return ReceiveSelected(destination, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -976,7 +976,7 @@ namespace Spring.Messaging.Nms.Core
|
||||
/// <throws>NMSException if there is any problem</throws>
|
||||
public IMessage Receive(string destinationName)
|
||||
{
|
||||
return Execute(new ReceiveCallback(this, destinationName)) as IMessage;
|
||||
return ReceiveSelected(destinationName, null);
|
||||
}
|
||||
|
||||
/// <summary> Receive a message synchronously from the default destination, but only
|
||||
@@ -1038,8 +1038,7 @@ namespace Spring.Messaging.Nms.Core
|
||||
/// <throws>NMSException if there is any problem</throws>
|
||||
public IMessage ReceiveSelected(string destinationName, string messageSelector)
|
||||
{
|
||||
return Execute(new ReceiveSelectedCallback(this, destinationName, messageSelector), true) as IMessage;
|
||||
|
||||
return Execute(new ReceiveSelectedCallback(this, destinationName, messageSelector), true) as IMessage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Apache.NMS;
|
||||
using Apache.NMS.ActiveMQ;
|
||||
using NUnit.Framework;
|
||||
@@ -44,6 +45,7 @@ namespace Spring.Messaging.Nms.Core
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(Apache.NMS.NMSConnectionException))]
|
||||
public void ConnectionThrowException()
|
||||
{
|
||||
ConnectionFactory cf = new ConnectionFactory();
|
||||
@@ -62,6 +64,7 @@ namespace Spring.Messaging.Nms.Core
|
||||
|
||||
//Use with destination set at runtime
|
||||
nmsTemplate.ConvertAndSend("APP.TESTING", msgText);
|
||||
|
||||
AssertRecievedHelloWorldMessage(msgText, nmsTemplate.ReceiveAndConvert("APP.TESTING"));
|
||||
|
||||
//Now using default destination set via property
|
||||
|
||||
@@ -50,6 +50,18 @@ namespace Spring.Messaging.Nms.Connections
|
||||
closeCount++;
|
||||
}
|
||||
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public ProducerTransformerDelegate ProducerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public TimeSpan RequestTimeout
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
|
||||
@@ -31,6 +31,18 @@ namespace Spring.Messaging.Nms.Connections
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public ProducerTransformerDelegate ProducerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,12 @@ namespace Spring.Messaging.Nms.Connections
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -95,6 +95,12 @@ namespace Spring.Messaging.Nms.Connections
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ProducerTransformerDelegate ProducerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public MsgDeliveryMode DeliveryMode
|
||||
{
|
||||
get { return msgDeliveryMode; }
|
||||
|
||||
@@ -211,6 +211,18 @@ namespace Spring.Messaging.Nms.Connections
|
||||
|
||||
}
|
||||
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public ProducerTransformerDelegate ProducerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public TimeSpan RequestTimeout
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
|
||||
@@ -182,6 +182,12 @@ namespace Spring.Messaging.Nms.Core
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ConsumerTransformerDelegate ConsumerTransformer
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
Reference in New Issue
Block a user