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...
7
7
8
8
kubectl delete deployment frontend-helidon -n msdataworkshop
9
9
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() {
35
35
}
36
36
}
37
37
38
- public void listenForOrderEvents () throws Exception {
38
+ public void listenForOrderEventsPLSQL () throws Exception {
39
39
Connection connection = inventoryResource .atpInventoryPDB .getConnection ();
40
40
while (true ) {
41
41
System .out .println ("InventoryServiceOrderEventConsumer.listenForOrderEvents with sproc" );
@@ -51,11 +51,12 @@ public void listenForOrderEvents() throws Exception {
51
51
hadResults = cstmt .getMoreResults ();
52
52
}
53
53
String outputValue = cstmt .getString (1 ); // index-based
54
+ connection .rollback ();
54
55
System .out .println ("InventoryServiceOrderEventConsumer.listenForOrderEvents outputValue:" + outputValue );
55
56
}
56
57
}
57
58
58
- public void listenForOrderEventsAQAPI () throws Exception {
59
+ public void listenForOrderEvents () throws Exception {
59
60
QueueConnectionFactory qcfact = AQjmsFactory .getQueueConnectionFactory (inventoryResource .atpInventoryPDB );
60
61
QueueSession qsess = null ;
61
62
QueueConnection qconn = null ;
Original file line number Diff line number Diff line change 6
6
*/
7
7
package io .helidon .data .examples ;
8
8
9
- import java .io .IOException ;
10
9
import java .sql .Connection ;
11
10
import java .sql .SQLException ;
12
11
import java .util .HashMap ;
Original file line number Diff line number Diff line change @@ -58,10 +58,11 @@ public void dolistenForMessages() throws JMSException {
58
58
String inventorylocation = inventory .getInventorylocation ();
59
59
System .out .println ("Lookup orderid:" + orderid + "(itemid:" + itemid + ")" );
60
60
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
+ }
65
66
boolean isSuccessfulInventoryCheck = !(inventorylocation == null || inventorylocation .equals ("" )
66
67
|| inventorylocation .equals ("inventorydoesnotexist" )
67
68
|| inventorylocation .equals ("none" ));
You can’t perform that action at this time.
0 commit comments