Atomicity Test Two:
------------------

We select a customer with good credit.

SQL> select c_id from C_customer where C_credit = 'GC' and c_id < 20;

      C_ID
----------
         5
        12
        18
        14
        11
         9
        19
         7
        17
        15
         6

      C_ID
----------
        10
         4
         3
        16
        13

16 rows selected.


We choose customer id = 19 and placed an order via the web interface.
We execute a New Order transaction of Item 00001MITEM00133 of quantity of 1. 
The Order completes successfully and the application server output shows

org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(OrderCmp20EJB.java:472): found SequenceSesHome interface
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(OrderCmp20EJB.java:480): found CustomerEntHome interface
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(OrderCmp20EJB.java:488): found LargeOrderSesHome interface
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(OrderCmp20EJB.java:493): found ItemEntHomeLocal interface
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(OrderCmp20EJB.java:498): found OrderLineEntHomeLocal interface
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(OrderCmp20EJB.java:107): ejbCreate 
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(OrderCmp20EJB.java:115): Atomicity Test (1,2,3): Order Id: 37502
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPostCreate(OrderCmp20EJB.java:149): Atomicity Test 3: OrderLineId: 1
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPriceWithDiscount(OrderCmp20EJB.java:520): getPriceWithDiscount 
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPercentDiscount(OrderCmp20EJB.java:592): getPercentDiscount
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.findCustomer(OrderCmp20EJB.java:540): findCustomer
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkCustomerCredit(OrderCmp20EJB.java:568): checkCustomerCredit 
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkForLargeOrders(OrderCmp20EJB.java:622): checkForLargeOrders 
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbStore(OrderCmp20EJB.java:417): ejbStore 

Order number is 37502 is verified via the o_orders and o_orderline tables.

SQL> select * from O_orders where o_id = 37502; 

      O_ID     O_C_ID   O_OL_CNT O_DISCOUNT    O_TOTAL   O_STATUS O_ENTRY_D
---------- ---------- ---------- ---------- ---------- ---------- ---------
O_SHIP_DA
---------
     37502         19          1         .4     293.18          1 25-JAN-05



SQL> select * from O_orderline where ol_o_id = 37502;  

     OL_ID    OL_O_ID OL_I_ID             OL_QTY  OL_STATUS OL_SHIP_D
---------- ---------- --------------- ---------- ---------- ---------
         1      37502 00001MITEM00133          1



