2.10.3.1  Atomicity Test 3

a. Modify the debug level in the OrderEnt bean deployment to 4 so the 
   code will print the order ID and orderLine IDs as soon as it generates
   it.
   
       Changed the deployment descriptor for orders.jar to set a debugLevel
       of 4 for OrderEnt.


b. Do the same for the LargeOrderEnt bean in the Manufacturing Domain.

       Changed the deployment descriptor for mfg.jar to set a debugLevel
       of 4 for LargeOrderEnt.

c. Change the LargeOrderEnt bean in the Manufacturing Domain to add the 
   following to the ejbStore method: entityContext.setRollBackOnly();
   
       This was accomplished by performing step c.

d. Enter a new order for any customer, ensuring that it is a largeorder. 
   Note the values of the order ID, orderLine IDs and largeOrder ID 
   displayed.

        An order consisting of a single item was placed for customer 
        number 34. The following infromation was displayed in the browser
        windows. 

            Customer number: 34

            Item Name		Item ID			Quantity
            00001MITEM00116	00001MITEM00116		30

            Order processed. Order number is 13502


e. The transaction should rollback. Verify that the rows in the O_orders, 
   O_orderline and M_largeorder table with the IDs retrieved in the above 
   step do not exist.

	The following was obtained from the SystemErr.log indicating that the 
	trasaction was rolled back.

 
[12/11/02 19:54:11:078 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(Unknown Source)
: found SequenceSesHome interface
[12/11/02 19:54:11:078 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(Unknown Source)
: found CustomerEntHome interface
[12/11/02 19:54:11:078 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(Unknown Source)
: found LargeOrderSesHome interface
[12/11/02 19:54:11:078 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(Unknown Source)
: found ItemEntHomeLocal interface
[12/11/02 19:54:11:078 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.setEntityContext(Unknown Source)
: found OrderLineEntHomeLocal interface
[12/11/02 19:54:11:094 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(Unknown Source)
: ejbCreate 
[12/11/02 19:54:11:094 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(Unknown Source)
: Atomicity Test (1,2,3): Order Id: 13502
[12/11/02 19:54:11:094 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPostCreate(Unknown Source)
: Atomicity Test 3: OrderLineId: 1
[12/11/02 19:54:11:109 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPriceWithDiscount(Unknown Source)
: getPriceWithDiscount 
[12/11/02 19:54:11:109 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPercentDiscount(Unknown Source)
: getPercentDiscount
[12/11/02 19:54:11:109 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.findCustomer(Unknown Source)
: findCustomer
[12/11/02 19:54:11:312 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkCustomerCredit(Unknown Source)
: checkCustomerCredit 
[12/11/02 19:54:11:312 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkForLargeOrders(Unknown Source)
: checkForLargeOrders 
[12/11/02 19:54:11:344 EST] 2c5056a8 SystemErr     R org.spec.jappserver.mfg.largeorderent.ejb.ConcreteLargeOrderEnt_b2972481 at org.spec.jappserver.mfg.largeorderent.ejb.LargeOrderCmp20EJB.setEntityContext(Unknown Source)
: found SequenceSesHome interface
[12/11/02 19:54:11:344 EST] 2c5056a8 SystemErr     R org.spec.jappserver.mfg.largeorderent.ejb.ConcreteLargeOrderEnt_b2972481 at org.spec.jappserver.mfg.largeorderent.ejb.LargeOrderCmp20EJB.ejbCreate(Unknown Source)
: ejbCreate 
[12/11/02 19:54:11:359 EST] 2c5056a8 SystemErr     R org.spec.jappserver.mfg.largeorderent.ejb.ConcreteLargeOrderEnt_b2972481 at org.spec.jappserver.mfg.largeorderent.ejb.LargeOrderCmp20EJB.ejbCreate(Unknown Source)
: Atomicity Test 3: OrderId 1 OrderLineId: 1
[12/11/02 19:54:12:328 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbStore(Unknown Source)
: ejbStore 
[12/11/02 19:54:12:328 EST] 2c5056a8 SystemErr     R org.spec.jappserver.mfg.largeorderent.ejb.ConcreteLargeOrderEnt_b2972481 at org.spec.jappserver.mfg.largeorderent.ejb.LargeOrderCmp20EJB.ejbStore(Unknown Source)
: Atomicity Test 3: Rolling back large order
[12/11/02 19:54:12:344 EST] 2c5056a8 SystemErr     R org.spec.jappserver.orders.orderent.ejb.ConcreteOrderEnt_ccae7984 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPassivate(Unknown Source)
: ejbPassivate 


        db2 => select * from O_ORDERS where O_ID=13502

        O_ID        O_C_ID      O_OL_CNT    O_DISCOUNT O_TOTAL     O_STATUS    O_ENTRY_D
        ATE               O_SHIP_DATE
        ----------- ----------- ----------- ---------- ----------- ----------- ---------
        ----------------- -----------

        0 record(s) selected.


        db2 => select * from O_ORDERLINE where OL_O_ID=13502

        OL_ID       OL_O_ID     OL_I_ID         OL_QTY      OL_STATUS   OL_SHIP_DATE
        ----------- ----------- --------------- ----------- ----------- ------------

        0 record(s) selected.


        db2 => select * from M_LARGEORDER where LO_ID=1

        LO_ID       LO_O_ID     LO_OL_ID    LO_ASSEMBLY_ID  LO_QTY      LO_DUE_DATE
        ----------- ----------- ----------- --------------- ----------- -----------

        0 record(s) selected.
        

Test was successful.