This closes #145

This commit is contained in:
Clebert Suconic 2015-08-30 22:50:55 -04:00
commit ea3fef4e52
1 changed files with 7 additions and 8 deletions

View File

@ -572,6 +572,8 @@ public class OpenWireProtocolManager implements ProtocolManager<Interceptor>, No
ActiveMQDestination dest = info.getDestination(); ActiveMQDestination dest = info.getDestination();
if (dest.isQueue()) { if (dest.isQueue()) {
SimpleString qName = OpenWireUtil.toCoreAddress(dest); SimpleString qName = OpenWireUtil.toCoreAddress(dest);
QueueBinding binding = (QueueBinding) server.getPostOffice().getBinding(qName);
if (binding == null) {
if (connection.getState().getInfo() != null) { if (connection.getState().getInfo() != null) {
CheckType checkType = dest.isTemporary() ? CheckType.CREATE_NON_DURABLE_QUEUE : CheckType.CREATE_DURABLE_QUEUE; CheckType checkType = dest.isTemporary() ? CheckType.CREATE_NON_DURABLE_QUEUE : CheckType.CREATE_DURABLE_QUEUE;
@ -579,9 +581,6 @@ public class OpenWireProtocolManager implements ProtocolManager<Interceptor>, No
server.checkQueueCreationLimit(connection.getUsername()); server.checkQueueCreationLimit(connection.getUsername());
} }
QueueBinding binding = (QueueBinding) server.getPostOffice().getBinding(qName);
if (binding == null) {
ConnectionInfo connInfo = connection.getState().getInfo(); ConnectionInfo connInfo = connection.getState().getInfo();
this.server.createQueue(qName, qName, null, connInfo == null ? null : SimpleString.toSimpleString(connInfo.getUserName()), false, dest.isTemporary()); this.server.createQueue(qName, qName, null, connInfo == null ? null : SimpleString.toSimpleString(connInfo.getUserName()), false, dest.isTemporary());
} }