********************************************************************************
Atomicity Test 1
********************************************************************************

Step a.
1> select * from C_customer where c_credit = 'BC'
2> go
 c_id        c_first          c_last           c_street1
         c_street2            c_city               c_state c_country  c_zip
         c_phone          c_contact                 c_since
         c_balance    c_credit c_credit_limit c_ytd_payment
 ----------- ---------------- ---------------- --------------------
         -------------------- -------------------- ------- ---------- ---------
         ---------------- ------------------------- --------------------------
         ------------ -------- -------------- -------------
           7 o0KtGEWXZjT6cLE  8SFW70fP         EY4u0BiI29Ik
         HnzWnBOGqEiV3iqBZAM  1NOduDK6TJEUCy8BvK   Ti      DHqFI9F    427011111
         661413232243293  XNrKAFyW13K062qePc               Dec 21 1998 12:00AM
             10296.00 BC                 0.00     130116.00

Step b.
Modified debuglevel property in OrderEnt bean to 4.

Step c.
Enter a new order using the webclient application for customer id 7.

Got following message on screen while entering order for customer id 7.

An Exception Occurred !!
The message of the exception is
Credit check failed. Insufficient credit for the customer id entered

org.spec.jappserver.webbeans.OtherException:  Credit check failed. Insufficient
credit for the customer id entered
        at org.spec.jappserver.webbeans.OrderSesBean.newOrder(OrderSesBean.java:
182)

Step d.
Following lines are noted from EAServer log. Order id is 751 and orderline id is
1.

Nov 08 11:37:24 2002: SPID: 13 org.spec.jappserver.orders.orderent.ejb._ps_Order
s_OrderEnt at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbCreate(Orde
rCmpEJB.java:108)^M: Atomicity Test (1,2,3): Order Id: 751
Nov 08 11:37:24 2002: SPID: 13 org.spec.jappserver.orders.orderent.ejb._ps_Order
s_OrderEnt at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbCreate(Orde
rCmpEJB.java:128)^M: Atomicity Test 3: OrderLineId: 1

Step e.
1> select  * from O_orderline where ol_o_id = 751
2> go
 ol_id       ol_o_id     ol_i_id         ol_qty      ol_status
         ol_ship_date
 ----------- ----------- --------------- ----------- -----------
         --------------------------

(0 rows affected)
1>

RESULT: PASS

********************************************************************************
Atomicity Test 2:
********************************************************************************

Step a.

1> select * from C_customer where c_credit='GC'
2> go
 c_id        c_first          c_last           c_street1
         c_street2            c_city               c_state c_country  c_zip
         c_phone          c_contact                 c_since
         c_balance    c_credit c_credit_limit c_ytd_payment ts
 ----------- ---------------- ---------------- --------------------
         -------------------- -------------------- ------- ---------- ---------
         ---------------- ------------------------- --------------------------
         ------------ -------- -------------- ------------- ------------------
           1 wp1OIpwneQL4j6IN QZoqsRnfQNKJXP84 WIBgrEZkgPSaiEz5693
         CRPMbN2EYMoagpAPM    EZQ97RekHQN76smqZv   H4      B7d8X      932311111
         1683628576771814 WssaqRQQeLoLFB5CwYi              Aug 30 2001 12:00AM
             24031.00 GC           2804643.01     143081.00 0x0000000087f0074f

Step b.

Using webclient client application, enter an order for the customer id 1.
Order successfully recorded. Order number shown on the browser is 752.

Following lines were noted in EAServer log.

Nov 08 11:44:33 2002: SPID: 16 org.spec.jappserver.orders.orderent.ejb._ps_Order
s_OrderEnt at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbCreate(Orde
rCmpEJB.java:100)^M: ejbCreate
Nov 08 11:44:33 2002: SPID: 16 org.spec.jappserver.orders.orderent.ejb._ps_Order
s_OrderEnt at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbCreate(Orde
rCmpEJB.java:108)^M: Atomicity Test (1,2,3): Order Id: 752
Nov 08 11:44:33 2002: SPID: 16 org.spec.jappserver.orders.orderent.ejb._ps_Order
s_OrderEnt at org.spec.jappserver.orders.orderent.ejb.OrderCmpEJB.ejbCreate(Orde
rCmpEJB.java:128)^M: Atomicity Test 3: OrderLineId: 1

Step c.
1> select  * from O_orderline where ol_o_id = 752
2> go
 ol_id       ol_o_id     ol_i_id         ol_qty      ol_status
         ol_ship_date
 ----------- ----------- --------------- ----------- -----------
         --------------------------
           1         752 00001MITEM00084          10        NULL
                               NULL

RESULT: PASS
