Atomicity Test One
------------------

Select a customer that has bad credit.

sqlplus spec/spec

SQL> select c_id from c_customer where c_credit = 'BC' and c_id < 50;

      C_ID
----------
        15
        20
        21
        23
        24
        27
        30
        35
        37
        41

10 rows selected.



We choose customer id = 24 and placed an order via the web interface.

org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS 
at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext
(Ljavax.ejb.EntityContext;)V(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
(Ljavax.ejb.EntityContext;)V(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
(Ljavax.ejb.EntityContext;)V(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
(Ljavax.ejb.EntityContext;)V(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
(Ljavax.ejb.EntityContext;)V(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
(I[Lorg.spec.jappserver.orders.helper.ItemQuantity;)Ljava.lang.Integer;
(OrderCmp20EJB.java:107): ejbCreate
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS 
at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate
(I[Lorg.spec.jappserver.orders.helper.ItemQuantity;)Ljava.lang.Integer;
(OrderCmp20EJB.java:115): Atomicity Test (1,2,3): Order Id: 1359001
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS 
at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPostCreate
(I[Lorg.spec.jappserver.orders.helper.ItemQuantity;)V(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
(Ljava.lang.String;)D(OrderCmp20EJB.java:520): getPriceWithDiscount
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS 
at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPercentDiscount
(D)D(OrderCmp20EJB.java:592): getPercentDiscount
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS 
at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.findCustomer()V
(OrderCmp20EJB.java:540): findCustomer
org.spec.jappserver.orders.orderent.ejb.OrderEnt_nrczp2__WebLogic_CMP_RDBMS 
at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkCustomerCredit
()V(OrderCmp20EJB.java:568): checkCustomerCredit


The Order Id derived from the above output is 1359001;

SQL> select * from o_orders where o_id = 1359001;

no rows selected

SQL> select * from o_orders where o_id = 1359001;

no rows selected
