Atomicity Test 2:

Run jsql from the DOS command prompt.

sql> select c_id from c_customer where c_credit = 'GC' and c_id < 5;
C_ID
1
3
4

We chose C_ID 3

Creating a new order for C_ID 3 resulted in:

Order processed. Order number is 60751

The output from the server log file was:

org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.setEntityContext(OrderCmpEJB.java:466)
: found SequenceSesHome interface
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.setEntityContext(OrderCmpEJB.java:474)
: found CustomerEntHome interface
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.setEntityContext(OrderCmpEJB.java:482)
: found LargeOrderSesHome interface
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.setEntityContext(OrderCmpEJB.java:489)
: found ItemEntHome interface
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.setEntityContext(OrderCmpEJB.java:497)
: found OrderLineEntHome interface
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbCreate(OrderCmpEJB.java:100)
: ejbCreate 
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbCreate(OrderCmpEJB.java:108)
: Atomicity Test (1,2,3): Order Id: 60751
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbCreate(OrderCmpEJB.java:128)
: Atomicity Test 3: OrderLineId: 1
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.getPriceWithDiscount(OrderCmpEJB.java:519)
: getPriceWithDiscount 
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.getPercentDiscount(OrderCmpEJB.java:590)
: getPercentDiscount
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.findCustomer(OrderCmpEJB.java:539)
: findCustomer
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.checkCustomerCredit(OrderCmpEJB.java:567)
: checkCustomerCredit 
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.checkForLargeOrders(OrderCmpEJB.java:620)
: checkForLargeOrders 
org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbStore(OrderCmpEJB.java:408)
: ejbStore 


An Order Status check via the web application for order # 60751 displayed:

Cusomter ID: 3
Ship Date: null

Current items in the list
Item ID         Quantity
00001MITEM00003    1