Author: rgodfrey
Date: Mon Apr 21 08:57:15 2008
New Revision: 650179
URL: http://svn.apache.org/viewvc?rev=650179&view=rev
Log:
remove duplicate check of interest in enqueue, enable new Queue by default
Modified:
incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
Modified:
incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java?rev=650179&r1=650178&r2=650179&view=diff
==============================================================================
---
incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
(original)
+++
incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
Mon Apr 21 08:57:15 2008
@@ -34,7 +34,7 @@
VirtualHost virtualHost)
throws AMQException
{
- return new AMQQueueImpl(name, durable, owner, autoDelete, virtualHost);
- //return new SimpleAMQQueue(name, durable, owner, autoDelete,
virtualHost);
+ //return new AMQQueueImpl(name, durable, owner, autoDelete,
virtualHost);
+ return new SimpleAMQQueue(name, durable, owner, autoDelete,
virtualHost);
}
}
Modified:
incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java?rev=650179&r1=650178&r2=650179&view=diff
==============================================================================
---
incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
(original)
+++
incubator/qpid/branches/broker-queue-refactor/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
Mon Apr 21 08:57:15 2008
@@ -382,13 +382,11 @@
Subscription sub = nextNode.getSubscription();
synchronized(sub.getSendLock())
{
- if(subscriptionReady(sub, entry)
+ if(subscriptionReadyAndHasInterest(sub, entry)
&& !sub.isSuspended()
&& sub.isActive())
{
- if( sub.hasInterest(entry) )
- {
if( !sub.wouldSuspend(entry))
{
if(!sub.isBrowser() && entry.acquire(sub))
@@ -406,15 +404,8 @@
}
}
- }
- else
- {
- QueueEntryList.QueueEntryNode queueEntryNode =
(QueueEntryList.QueueEntryNode) sub.getQueueContext();
- if(queueEntryNode.getNext() == entry)
- {
- sub.setQueueContext(queueEntryNode,entry);
- }
- }
+
+
}
}
}
@@ -456,7 +447,7 @@
}
- private boolean subscriptionReady(final Subscription sub, final QueueEntry
entry)
+ private boolean subscriptionReadyAndHasInterest(final Subscription sub,
final QueueEntry entry)
{
QueueEntryList.QueueEntryNode node = (QueueEntryList.QueueEntryNode)
sub.getQueueContext();
@@ -471,6 +462,7 @@
}
else
{
+ node = null;
break;
}