git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1152757 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2011-08-01 13:14:55 +00:00
parent be37064a17
commit 44ef96e6d3
6 changed files with 30 additions and 10 deletions

View File

@ -108,7 +108,9 @@ public class TransactionBroker extends BrokerFilter {
}
transaction.setState(Transaction.PREPARED_STATE);
registerMBean(transaction);
LOG.debug("recovered prepared transaction: " + transaction.getTransactionId());
if (LOG.isDebugEnabled()) {
LOG.debug("recovered prepared transaction: " + transaction.getTransactionId());
}
} catch (Throwable e) {
throw new WrappedException(e);
}

View File

@ -475,7 +475,9 @@ public class Queue extends BaseDestination implements Task, UsageListener {
if (ref.getMessageId().getBrokerSequenceId() == lastDeiveredSequenceId) {
lastDeliveredRef = ref;
markAsRedelivered = true;
LOG.debug("found lastDeliveredSeqID: " + lastDeiveredSequenceId + ", message reference: " + ref.getMessageId());
if (LOG.isDebugEnabled()) {
LOG.debug("found lastDeliveredSeqID: " + lastDeiveredSequenceId + ", message reference: " + ref.getMessageId());
}
break;
}
}
@ -984,7 +986,9 @@ public class Queue extends BaseDestination implements Task, UsageListener {
for (MessageReference ref : toExpire) {
pagedInPendingDispatch.remove(ref);
if (broker.isExpired(ref)) {
LOG.debug("expiring from pagedInPending: " + ref);
if (LOG.isDebugEnabled()) {
LOG.debug("expiring from pagedInPending: " + ref);
}
messageExpired(connectionContext, ref);
}
}
@ -1000,7 +1004,9 @@ public class Queue extends BaseDestination implements Task, UsageListener {
}
for (MessageReference ref : toExpire) {
if (broker.isExpired(ref)) {
LOG.debug("expiring from pagedInMessages: " + ref);
if (LOG.isDebugEnabled()) {
LOG.debug("expiring from pagedInMessages: " + ref);
}
messageExpired(connectionContext, ref);
} else {
pagedInMessagesLock.writeLock().lock();
@ -1021,7 +1027,9 @@ public class Queue extends BaseDestination implements Task, UsageListener {
MessageReference node = messages.next();
if (node.isExpired()) {
if (broker.isExpired(node)) {
LOG.debug("expiring from messages: " + node);
if (LOG.isDebugEnabled()) {
LOG.debug("expiring from messages: " + node);
}
messageExpired(connectionContext, createMessageReference(node.getMessage()));
}
messages.remove();

View File

@ -669,7 +669,9 @@ public class RegionBroker extends EmptyBroker {
brokerInfos.put(info.getBrokerId(), existing);
}
existing.incrementRefCount();
LOG.debug(getBrokerName() + " addBroker:" + info.getBrokerName() + " brokerInfo size : " + brokerInfos.size());
if (LOG.isDebugEnabled()) {
LOG.debug(getBrokerName() + " addBroker:" + info.getBrokerName() + " brokerInfo size : " + brokerInfos.size());
}
addBrokerInClusterUpdate();
}
@ -680,7 +682,9 @@ public class RegionBroker extends EmptyBroker {
if (existing != null && existing.decrementRefCount() == 0) {
brokerInfos.remove(info.getBrokerId());
}
LOG.debug(getBrokerName() + " removeBroker:" + info.getBrokerName() + " brokerInfo size : " + brokerInfos.size());
if (LOG.isDebugEnabled()) {
LOG.debug(getBrokerName() + " removeBroker:" + info.getBrokerName() + " brokerInfo size : " + brokerInfos.size());
}
removeBrokerInClusterUpdate();
}
}

View File

@ -76,7 +76,9 @@ public class TempQueue extends Queue{
.getConnectionId()))) {
tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId());
LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
if (LOG.isDebugEnabled()) {
LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
}
}
super.addSubscription(context, sub);
}

View File

@ -61,7 +61,9 @@ public class TempTopic extends Topic implements Task{
.getConnectionId()))) {
tempDest.setConnectionId(sub.getConsumerInfo().getConsumerId().getConnectionId());
LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
if (LOG.isDebugEnabled()) {
LOG.debug(" changed ownership of " + this + " to "+ tempDest.getConnectionId());
}
}
super.addSubscription(context, sub);
}

View File

@ -214,7 +214,9 @@ public class TopicRegion extends AbstractRegion {
for (int i = 0; i < infos.length; i++) {
SubscriptionInfo info = infos[i];
LOG.debug("Restoring durable subscription: " + info);
if (LOG.isDebugEnabled()) {
LOG.debug("Restoring durable subscription: " + info);
}
SubscriptionKey key = new SubscriptionKey(info);
// A single durable sub may be subscribing to multiple topics.