File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
inventory-helidon/src/main/java/io/helidon/data/examples
order-helidon/src/main/java/io/helidon/data/examples Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ echo delete frontend deployment and service...
77
88kubectl delete deployment frontend-helidon -n msdataworkshop
99
10- # kubectl delete service frontend -n msdataworkshop
10+ kubectl delete service frontend -n msdataworkshop
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public void run() {
3535 }
3636 }
3737
38- public void listenForOrderEvents () throws Exception {
38+ public void listenForOrderEventsPLSQL () throws Exception {
3939 Connection connection = inventoryResource .atpInventoryPDB .getConnection ();
4040 while (true ) {
4141 System .out .println ("InventoryServiceOrderEventConsumer.listenForOrderEvents with sproc" );
@@ -51,11 +51,12 @@ public void listenForOrderEvents() throws Exception {
5151 hadResults = cstmt .getMoreResults ();
5252 }
5353 String outputValue = cstmt .getString (1 ); // index-based
54+ connection .rollback ();
5455 System .out .println ("InventoryServiceOrderEventConsumer.listenForOrderEvents outputValue:" + outputValue );
5556 }
5657 }
5758
58- public void listenForOrderEventsAQAPI () throws Exception {
59+ public void listenForOrderEvents () throws Exception {
5960 QueueConnectionFactory qcfact = AQjmsFactory .getQueueConnectionFactory (inventoryResource .atpInventoryPDB );
6061 QueueSession qsess = null ;
6162 QueueConnection qconn = null ;
Original file line number Diff line number Diff line change 66 */
77package io .helidon .data .examples ;
88
9- import java .io .IOException ;
109import java .sql .Connection ;
1110import java .sql .SQLException ;
1211import java .util .HashMap ;
Original file line number Diff line number Diff line change @@ -58,10 +58,11 @@ public void dolistenForMessages() throws JMSException {
5858 String inventorylocation = inventory .getInventorylocation ();
5959 System .out .println ("Lookup orderid:" + orderid + "(itemid:" + itemid + ")" );
6060 Order order = orderResource .orderServiceEventProducer .getOrderViaSODA (orderResource .atpOrderPdb , orderid );
61- if (order == null )
62- throw new JMSException ("Rollingback message as no orderDetail found for orderid:" + orderid +
63- ". It may have been started by another server (eg if horizontally scaling) or " +
64- " this server started the order but crashed. " );
61+ if (order == null ) {
62+ System .out .println ("No orderDetail found for orderid:" + orderid );
63+ qsess .commit ();
64+ continue ;
65+ }
6566 boolean isSuccessfulInventoryCheck = !(inventorylocation == null || inventorylocation .equals ("" )
6667 || inventorylocation .equals ("inventorydoesnotexist" )
6768 || inventorylocation .equals ("none" ));
You can’t perform that action at this time.
0 commit comments