

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

      C_ID                                                                      
----------                                                                      
        28                                                                      
        37                                                                      
        38                                                                      
        41                                                                      
        47                                                                      
        51                                                                      
        63                                                                      
        65                                                                      
        69                                                                      

9 rows selected.

From a browser selected customer with C_ID = 28 and placed an order with Item:00001MITEM00003 Quantity:1. The browser displayed:

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

Appserver Output:

04/07/29 23:22:11 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(OrderCmp20EJB.java:107): ejbCreate 
04/07/29 23:22:11 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(OrderCmp20EJB.java:115): Atomicity Test (1,2,3): Order Id: 5477502
04/07/29 23:22:11 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPostCreate(OrderCmp20EJB.java:149): Atomicity Test 3: OrderLineId: 1
04/07/29 23:22:11 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPriceWithDiscount(OrderCmp20EJB.java:520): getPriceWithDiscount 
04/07/29 23:22:11 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPercentDiscount(OrderCmp20EJB.java:592): getPercentDiscount
04/07/29 23:22:11 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.findCustomer(OrderCmp20EJB.java:540): findCustomer
04/07/29 23:22:11 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkCustomerCredit(OrderCmp20EJB.java:568): checkCustomerCredit 
04/07/29 23:22:11 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPassivate(OrderCmp20EJB.java:397): ejbPassivate 

The Order ID from the above output is 5477502.

SQL> select * from O_orders where o_id = 5477502;

no rows selected

SQL> select * from O_orderline where ol_o_id = 5477502;

no rows selected

SQL> spool off;
