summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins/amqp-1-0-protocol
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/broker-plugins/amqp-1-0-protocol')
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java16
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java24
2 files changed, 21 insertions, 19 deletions
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java
index ca67b6f79b..35f24afbce 100644
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java
+++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java
@@ -110,10 +110,12 @@ public class SendingLink_1_0 implements SendingLinkListener, Link_1_0, DeliveryS
if(destination instanceof QueueDestination)
{
queue = ((QueueDestination) _destination).getQueue();
- if(queue.getArguments() != null && queue.getArguments().containsKey("topic"))
+
+ if(queue.getAvailableAttributes().contains("topic"))
{
source.setDistributionMode(StdDistMode.COPY);
}
+
qd = (QueueDestination) destination;
Map<Symbol,Filter> filters = source.getFilter();
@@ -194,19 +196,19 @@ public class SendingLink_1_0 implements SendingLinkListener, Link_1_0, DeliveryS
name = UUID.randomUUID().toString();
}
- queue = _vhost.getQueueRegistry().getQueue(name);
+ queue = _vhost.getQueue(name);
Exchange exchange = exchangeDestination.getExchange();
if(queue == null)
{
- queue = AMQQueueFactory.createAMQQueueImpl(
+ queue = _vhost.createQueue(
UUIDGenerator.generateQueueUUID(name, _vhost.getName()),
name,
isDurable,
null,
true,
true,
- _vhost,
+ true,
Collections.EMPTY_MAP);
}
else
@@ -309,11 +311,11 @@ public class SendingLink_1_0 implements SendingLinkListener, Link_1_0, DeliveryS
{
public void doTask(Connection_1_0 session)
{
- if (_vhost.getQueueRegistry().getQueue(queueName) == tempQueue)
+ if (_vhost.getQueue(queueName) == tempQueue)
{
try
{
- tempQueue.delete();
+ _vhost.removeQueue(tempQueue);
}
catch (AMQException e)
{
@@ -417,7 +419,7 @@ public class SendingLink_1_0 implements SendingLinkListener, Link_1_0, DeliveryS
{
try
{
- queue.delete();
+ queue.getVirtualHost().removeQueue(queue);
}
catch(AMQException e)
{
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
index ed75a8c165..d3962c779c 100644
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
+++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
@@ -107,7 +107,7 @@ public class Session_1_0 implements SessionEventListener, AMQSessionModel, LogSu
source.setAddress(tempQueue.getName());
}
String addr = source.getAddress();
- AMQQueue queue = _vhost.getQueueRegistry().getQueue(addr);
+ AMQQueue queue = _vhost.getQueue(addr);
if(queue != null)
{
@@ -256,7 +256,7 @@ public class Session_1_0 implements SessionEventListener, AMQSessionModel, LogSu
}
else
{
- AMQQueue queue = _vhost.getQueueRegistry().getQueue(addr);
+ AMQQueue queue = _vhost.getQueue(addr);
if(queue != null)
{
@@ -329,14 +329,14 @@ public class Session_1_0 implements SessionEventListener, AMQSessionModel, LogSu
? null
: (LifetimePolicy) properties.get(LIFETIME_POLICY);
- final AMQQueue tempQueue = queue = AMQQueueFactory.createAMQQueueImpl( UUIDGenerator.generateQueueUUID(queueName, _vhost.getName()),
- queueName,
- false, // durable
- null, // owner
- false, // autodelete
- false, // exclusive
- _vhost,
- properties);
+ final AMQQueue tempQueue = queue = _vhost.createQueue( UUIDGenerator.generateQueueUUID(queueName, _vhost.getName()),
+ queueName,
+ false, // durable
+ null, // owner
+ false, // autodelete
+ false, // exclusive
+ false,
+ properties);
@@ -347,11 +347,11 @@ public class Session_1_0 implements SessionEventListener, AMQSessionModel, LogSu
{
public void doTask(Connection_1_0 session)
{
- if (_vhost.getQueueRegistry().getQueue(queueName) == tempQueue)
+ if (_vhost.getQueue(queueName) == tempQueue)
{
try
{
- tempQueue.delete();
+ _vhost.removeQueue(tempQueue);
}
catch (AMQException e)
{