activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r574460 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: ActiveMQMessageConsumer.java ActiveMQSession.java
Date Tue, 11 Sep 2007 05:20:22 GMT
Author: jstrachan
Date: Mon Sep 10 22:20:20 2007
New Revision: 574460

URL: http://svn.apache.org/viewvc?rev=574460&view=rev
Log:
added better debug logging

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java?rev=574460&r1=574459&r2=574460&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
Mon Sep 10 22:20:20 2007
@@ -413,7 +413,7 @@
                     return null;
                 } else if (md.getMessage().isExpired()) {
                     if (LOG.isDebugEnabled()) {
-                        LOG.debug("Received expired message: " + md);
+                        LOG.debug(getConsumerId() + " received expired message: " + md);
                     }
                     beforeMessageIsConsumed(md);
                     afterMessageIsConsumed(md, true);
@@ -422,7 +422,7 @@
                     }
                 } else {
                     if (LOG.isDebugEnabled()) {
-                        LOG.debug("Received message: " + md);
+                        LOG.debug(getConsumerId() + " received message: " + md);
                     }
                     return md;
                 }
@@ -613,7 +613,7 @@
                         try {
                             session.asyncSendPacket(ackToSend);
                         } catch (JMSException e) {
-                            LOG.error("Failed to delivered acknowledgements", e);
+                            LOG.error(getConsumerId() + " failed to delivered acknowledgements",
e);
                         } finally {
                             deliveryingAcknowledgements.set(false);
                         }
@@ -940,7 +940,7 @@
                                     // next message.
                                     afterMessageIsConsumed(md, false);
                                 }
-                                LOG.error("Exception while processing message: " + e, e);
+                                LOG.error(getConsumerId() + " Exception while processing
message: " + e, e);
                             }
                         } else {
                             unconsumedMessages.enqueue(md);
@@ -951,7 +951,7 @@
                     } else {
                         // ignore duplicate
                         if (LOG.isDebugEnabled()) {
-                            LOG.debug("Ignoring Duplicate: " + md.getMessage());
+                            LOG.debug(getConsumerId() + " Ignoring Duplicate: " + md.getMessage());
                         }
                         ackLater(md, MessageAck.STANDARD_ACK_TYPE);
                     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java?rev=574460&r1=574459&r2=574460&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java Mon
Sep 10 22:20:20 2007
@@ -488,6 +488,9 @@
         if (!getTransacted()) {
             throw new javax.jms.IllegalStateException("Not a transacted session");
         }
+        if (LOG.isDebugEnabled()) {
+            LOG.debug(getSessionId() + " Transaction Commit");
+        }
         transactionContext.commit();
     }
 
@@ -505,6 +508,9 @@
         if (!getTransacted()) {
             throw new javax.jms.IllegalStateException("Not a transacted session");
         }
+        if (LOG.isDebugEnabled()) {
+            LOG.debug(getSessionId() + " Transaction Rollback");
+        }
         transactionContext.rollback();
     }
 
@@ -1610,7 +1616,7 @@
             msg.onSend();
             msg.setProducerId(msg.getMessageId().getProducerId());
             if (this.debug) {
-                LOG.debug("Sending message: " + msg);
+                LOG.debug(getSessionId() + " sending message: " + msg);
             }
             if (!connection.isAlwaysSyncSend() && (!msg.isPersistent() || connection.isUseAsyncSend()
|| txid != null)) {
                 this.connection.asyncSendPacket(msg);



Mime
View raw message