From 72f00af84cfe27f3743964d5954344a08fefe860 Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 10 Jun 2013 13:59:47 +0200 Subject: [PATCH] [JMS] Send DeliveryGroups to the waiter --- .../sbc/valesriegler/group/jms/JMSGroupConnector.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/ac/tuwien/sbc/valesriegler/group/jms/JMSGroupConnector.java b/src/main/java/at/ac/tuwien/sbc/valesriegler/group/jms/JMSGroupConnector.java index 82dff0c..c382ba3 100644 --- a/src/main/java/at/ac/tuwien/sbc/valesriegler/group/jms/JMSGroupConnector.java +++ b/src/main/java/at/ac/tuwien/sbc/valesriegler/group/jms/JMSGroupConnector.java @@ -150,7 +150,15 @@ public class JMSGroupConnector extends AbstractGroupConnector implements Message return; } else if (request instanceof DeliveryOrderRequest) { - // TODO: + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + MessageProducer wantToPay = session.createProducer(session.createQueue("WantADelivery")); + wantToPay.setDeliveryMode(DeliveryMode.NON_PERSISTENT); + wantToPay.send(session.createObjectMessage(request)); + + MessageProducer informPizzariaGui = session.createProducer(session.createQueue("PizzeriaConnector")); + informPizzariaGui.setDeliveryMode(DeliveryMode.NON_PERSISTENT); + informPizzariaGui.send(session.createObjectMessage(request)); + session.close(); return; } } catch (JMSException e) { -- 2.43.0