Author: tabish
Date: Fri Nov 20 15:27:00 2009
New Revision: 882602
URL: http://svn.apache.org/viewvc?rev=882602&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQNET-208
Added some additional trace points.
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs?rev=882602&r1=882601&r2=882602&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Fri Nov 20 15:27:00 2009
@@ -271,6 +271,8 @@
{
if(!this.unconsumedMessages.Closed)
{
+ Tracer.Debug("Closing down the Consumer");
+
// Do we have any acks we need to send out
before closing?
// Ack any delivered messages now.
if(!this.session.IsTransacted)
@@ -299,7 +301,9 @@
this.session.Connection.Oneway(removeCommand);
this.session = null;
- }
+
+ Tracer.Debug("Consumer instnace Closed.");
+ }
}
#endregion
@@ -314,7 +318,11 @@
messagePull.Timeout = timeout;
messagePull.ResponseRequired = false;
- Tracer.Debug("Sending MessagePull: " +
messagePull);
+ if(Tracer.IsDebugEnabled)
+ {
+ Tracer.Debug("Sending MessagePull: " +
messagePull);
+ }
+
session.Connection.Oneway(messagePull);
}
}
@@ -456,7 +464,10 @@
{
// on resumption a
pending delivered ack will be out of sync with
// re-deliveries.
- Tracer.Debug("removing
pending delivered ack on transport interupt: " + pendingAck);
+ if(Tracer.IsDebugEnabled)
+ {
+
Tracer.Debug("removing pending delivered ack on transport interupt: " +
pendingAck);
+ }
this.pendingAck = null;
}
}
@@ -766,12 +777,19 @@
// ack and hence important, send it now so it
is not lost.
if(oldPendingAck.AckType != (byte)
AckType.DeliveredAck)
{
- Tracer.Debug("Sending old pending ack "
+ oldPendingAck + ", new pending: " + pendingAck);
-
this.session.Connection.Oneway(oldPendingAck);
+ if(Tracer.IsDebugEnabled)
+ {
+ Tracer.Debug("Sending old pending
ack " + oldPendingAck + ", new pending: " + pendingAck);
+ }
+
+ this.session.Connection.Oneway(oldPendingAck);
}
else
{
- Tracer.Debug("dropping old pending ack
" + oldPendingAck + ", new pending: " + pendingAck);
+ if(Tracer.IsDebugEnabled)
+ {
+ Tracer.Debug("dropping old pending
ack " + oldPendingAck + ", new pending: " + pendingAck);
+ }
}
}
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=882602&r1=882601&r2=882602&view=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
Fri Nov 20 15:27:00 2009
@@ -247,7 +247,9 @@
try
{
+ Tracer.InfoFormat("Closing The Session with Id {0}",
this.info.SessionId.ToString());
DoClose();
+ Tracer.InfoFormat("Closed The Session with Id {0}",
this.info.SessionId.ToString());
}
catch(Exception ex)
{
@@ -767,6 +769,10 @@
foreach(MessageDispatch message in messages)
{
+ if(Tracer.IsDebugEnabled)
+ {
+ Tracer.DebugFormat("Resending Message Dispatch: ",
message.ToString());
+ }
this.executor.ExecuteFirst(message);
}
}
@@ -775,6 +781,10 @@
{
if(this.executor != null)
{
+ if(Tracer.IsDebugEnabled)
+ {
+ Tracer.DebugFormat("Send Message Dispatch: ",
dispatch.ToString());
+ }
this.executor.Execute(dispatch);
}
}