Author: timfox
Date: 2009-12-01 18:32:48 -0500 (Tue, 01 Dec 2009)
New Revision: 8487
Modified:
trunk/src/main/org/hornetq/core/server/Queue.java
trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
trunk/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java
trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
Log:
a few tweaks
Modified: trunk/src/main/org/hornetq/core/server/Queue.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/Queue.java 2009-12-01 23:13:07 UTC (rev 8486)
+++ trunk/src/main/org/hornetq/core/server/Queue.java 2009-12-01 23:32:48 UTC (rev 8487)
@@ -120,7 +120,6 @@
boolean hasMatchingConsumer(ServerMessage message);
- // Only used in testing
void deliverNow();
Collection<Consumer> getConsumers();
Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-01 23:13:07
UTC (rev 8486)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-01 23:32:48
UTC (rev 8487)
@@ -674,8 +674,7 @@
securityStore,
sessionExecutor,
channel,
- managementService,
- // queueFactory,
+ managementService,
this,
configuration.getManagementAddress());
Modified: trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-12-01 23:13:07 UTC
(rev 8486)
+++ trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-12-01 23:32:48 UTC
(rev 8487)
@@ -26,7 +26,6 @@
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@@ -107,8 +106,6 @@
private final Runnable deliverRunner = new DeliverRunner();
- private final Semaphore lock = new Semaphore(1);
-
private final StorageManager storageManager;
private final HierarchicalRepository<AddressSettings>
addressSettingsRepository;
@@ -1342,10 +1339,7 @@
{
// We have consumers with filters which don't match, so we need
// to prompt delivery every time
- // a new message arrives - this is why you really shouldn't use
- // filters with queues - in most cases
- // it's an ant-pattern since it would cause a queue scan on each
- // message
+ // a new message arrives
deliver();
}
}
Modified: trunk/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java 2009-12-01
23:13:07 UTC (rev 8486)
+++ trunk/src/main/org/hornetq/core/server/impl/ServerConsumerImpl.java 2009-12-01
23:32:48 UTC (rev 8487)
@@ -105,7 +105,7 @@
private Runnable browserDeliverer;
- private final boolean updateDeliveries;
+ private final boolean strictUpdateDeliveryCount;
private final StorageManager storageManager;
@@ -132,7 +132,7 @@
final StorageManager storageManager,
final Channel channel,
final boolean preAcknowledge,
- final boolean updateDeliveries,
+ final boolean strictUpdateDeliveryCount,
final Executor executor,
final ManagementService managementService) throws Exception
{
@@ -163,7 +163,7 @@
minLargeMessageSize = session.getMinLargeMessageSize();
- this.updateDeliveries = updateDeliveries;
+ this.strictUpdateDeliveryCount = strictUpdateDeliveryCount;
if (browseOnly)
{
@@ -229,7 +229,7 @@
// If updateDeliveries = false (set by strict-update),
// the updateDeliveryCount would still be updated after cancel
- if (updateDeliveries)
+ if (strictUpdateDeliveryCount)
{
if (ref.getMessage().isDurable() && ref.getQueue().isDurable())
{
Modified: trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2009-12-01 23:13:07
UTC (rev 8486)
+++ trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2009-12-01 23:32:48
UTC (rev 8487)
@@ -155,7 +155,7 @@
private final boolean preAcknowledge;
- private final boolean updateDeliveries;
+ private final boolean strictUpdateDeliveryCount;
private RemotingConnection remotingConnection;
@@ -205,7 +205,7 @@
final boolean autoCommitSends,
final boolean autoCommitAcks,
final boolean preAcknowledge,
- final boolean updateDeliveries,
+ final boolean strictUpdateDeliveryCount,
final boolean xa,
final RemotingConnection remotingConnection,
final StorageManager storageManager,
@@ -249,7 +249,7 @@
tx = new TransactionImpl(storageManager);
}
- this.updateDeliveries = updateDeliveries;
+ this.strictUpdateDeliveryCount = strictUpdateDeliveryCount;
this.channel = channel;
@@ -404,7 +404,7 @@
storageManager,
channel,
preAcknowledge,
- updateDeliveries,
+ strictUpdateDeliveryCount,
executor,
managementService);