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

We select a customer with good credit.

mysql> select c_id from C_customer where C_credit = 'GC' and c_id < 20;
+------+
| c_id |
+------+
|    1 |
|    2 |
|    3 |
|    4 |
|    5 |
|    6 |
|    7 |
|    8 |
|    9 |
|   10 |
|   11 |
|   12 |
|   13 |
|   14 |
|   15 |
|   16 |
|   18 |
|   19 |
+------+
18 rows in set (0.00 sec)

We choose customer id = 18 and placed an order via the web interface.
We execute a New Order transaction of Item 00001MITEM00078 of quantity of 2. 
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: 962502
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: 2
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.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 962502 is verified via the o_orders and o_orderline tables.

mysql> select * from O_orders where o_id = 962502; 
+--------+--------+----------+------------+---------+----------+----------------+-------------+
| o_id   | o_c_id | o_ol_cnt | o_discount | o_total | o_status | o_entry_date   | o_ship_date |
+--------+--------+----------+------------+---------+----------+----------------+-------------+
| 962502 |     18 |        2 |       0.30 | 5672.06 |        1 | 20040803145337 | NULL        |
+--------+--------+----------+------------+---------+----------+----------------+-------------+
1 row in set (0.00 sec)



mysql> select * from O_orderline where ol_o_id = 962502; 
+-------+---------+-----------------+--------+-----------+--------------+
| ol_id | ol_o_id | ol_i_id         | ol_qty | ol_status | ol_ship_date |
+-------+---------+-----------------+--------+-----------+--------------+
|     1 |  962502 | 00001MITEM00001 |     10 |      NULL | NULL         |
|     2 |  962502 | 00001MITEM00078 |      2 |      NULL | NULL         |
+-------+---------+-----------------+--------+-----------+--------------+
2 rows in set (0.00 sec)



