

Atomicity Test #2
=================

Select a customer with GOOD CREDIT:



SQL> 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

      C_ID
----------
        12
        13
        15
        16
        17
        18
        19

18 rows selected.


For this test customer with C_ID of 11 was selected.A New Order Transaction was
executed using the Web Interface. The New Order completed successfully and 
web output showed Order processed. Order number is 2111255


The following is the output from OC4J log:

03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(OrderCmp20EJB.java:107): ejbCreate
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(OrderCmp20EJB.java:115): Atomicity Test (1,2,3): Order Id: 2111255
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPostCreate(OrderCmp20EJB.java:149): Atomicity Test 3: OrderLineId: 1
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPriceWithDiscount(OrderCmp20EJB.java:520): getPriceWithDiscount
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPercentDiscount(OrderCmp20EJB.java:592): getPercentDiscount
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.findCustomer(OrderCmp20EJB.java:540): findCustomer
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkCustomerCredit(OrderCmp20EJB.java:568): checkCustomerCredit
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkForLargeOrders(OrderCmp20EJB.java:622): checkForLargeOrders
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbStore(OrderCmp20EJB.java:417): ejbStore
03/09/30 18:08:58 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPassivate(OrderCmp20EJB.java:397): ejbPassivate 

Order Number with Order ID of 2111255 is confirmed in the output above.
Querying for the Order Number with Order ID of 2111255 gives:


SQL> select * from o_orders  where o_id = 2111255;

      O_ID     O_C_ID   O_OL_CNT O_DISCOUNT    O_TOTAL   O_STATUS O_ENTRY_D
---------- ---------- ---------- ---------- ---------- ---------- ---------
O_SHIP_DA
---------
   2111255         11          1         .2     245.57          1 30-SEP-03



SQL> select * from o_orderline where ol_o_id = 2111255;

     OL_ID    OL_O_ID OL_I_ID             OL_QTY  OL_STATUS OL_SHIP_D
---------- ---------- --------------- ---------- ---------- ---------
         1    2111255 00001MITEM00001          2


