jndiBindings = JndiEntriesAttribute.getJndiBindings(entries);
}
JMSTopicAdd.INSTANCE.installServices(null, null, topic.getName(), hqServiceName, phaseContext.getServiceTarget(), jndiBindings);
//create the management registration
final PathElement serverElement = PathElement.pathElement(HORNETQ_SERVER, topic.getServer());
final PathElement destination = PathElement.pathElement(JMS_TOPIC, topic.getName());
deploymentUnit.createDeploymentSubModel(MessagingExtension.SUBSYSTEM_NAME, serverElement);
PathAddress registration = PathAddress.pathAddress(serverElement, destination);
createDeploymentSubModel(registration, deploymentUnit);
JMSTopicConfigurationRuntimeHandler.INSTANCE.registerDestination(topic.getServer(), topic.getName(), topic.getDestination());
}
for (final JmsDestination queue : parseResult.getQueues()) {
final ServiceName hqServiceName = MessagingServices.getHornetQServiceName(queue.getServer());
String[] jndiBindings = null;
final ModelNode destination = queue.getDestination();
if (destination.hasDefined(ENTRIES.getName())) {
final ModelNode entries = destination.resolve().get(ENTRIES.getName());
jndiBindings = JndiEntriesAttribute.getJndiBindings(entries);
}
final String selector = destination.hasDefined(SELECTOR.getName()) ? destination.get(SELECTOR.getName()).resolve().asString() : null;
final boolean durable = destination.hasDefined(DURABLE.getName()) ? destination.get(DURABLE.getName()).resolve().asBoolean() : false;
JMSQueueAdd.INSTANCE.installServices(null, null, queue.getName(), phaseContext.getServiceTarget(), hqServiceName, selector, durable, jndiBindings);
//create the management registration
final PathElement serverElement = PathElement.pathElement(HORNETQ_SERVER, queue.getServer());
final PathElement dest = PathElement.pathElement(JMS_QUEUE, queue.getName());
deploymentUnit.createDeploymentSubModel(MessagingExtension.SUBSYSTEM_NAME, serverElement);
PathAddress registration = PathAddress.pathAddress(serverElement, dest);
createDeploymentSubModel(registration, deploymentUnit);
JMSQueueConfigurationRuntimeHandler.INSTANCE.registerDestination(queue.getServer(), queue.getName(), destination);
}