/* */
/* 671 */ return;
/* */ }
/* */ }
/* */
/* 675 */ JBossDestination dest = (JBossDestination)msg.getJMSDestination();
/* */
/* 681 */ msg.setConnectionID(this.id);
/* */
/* 689 */ MessageReference ref = msg.createReference();
/* */
/* 691 */ long schedDeliveryTime = msg.getScheduledDeliveryTime();
/* */
/* 693 */ if (schedDeliveryTime > 0L)
/* */ {
/* 695 */ ref.setScheduledDeliveryTime(schedDeliveryTime);
/* */ }
/* */
/* 698 */ if (dest.isDirect())
/* */ {
/* 702 */ Binding binding = this.postOffice.getBindingForQueueName(dest.getName());
/* */
/* 704 */ if (binding == null)
/* */ {
/* 706 */ throw new IllegalArgumentException("Cannot find binding for queue " + dest.getName());
/* */ }
/* */
/* 709 */ Queue queue = binding.queue;
/* */
/* 711 */ Delivery del = queue.handle(null, ref, tx);
/* */
/* 713 */ if (del == null)
/* */ {
/* 715 */ throw new JMSException("Failed to route " + ref + " to " + dest.getName());
/* */ }
/* */ }
/* 718 */ else if (dest.isQueue())
/* */ {
/* 720 */ if (!this.postOffice.route(ref, new JMSCondition(true, dest.getName()), tx))
/* */ {
/* 722 */ throw new JMSException("Failed to route " + ref + " to " + dest.getName());
/* */ }
/* */ }
/* */ else
/* */ {
/* 727 */ this.postOffice.route(ref, new JMSCondition(false, dest.getName()), tx);
/* */ }
/* */
/* 730 */ if (trace) log.trace("sent " + msg);
/* */ }