


SQL> select c_id from C_customer where c_credit = 'BC' and rownum < 10;
      C_ID
----------
      4926
     10393
     10800
      5166
      5288
      5300
      5447
     11669
     11784

9 rows selected.


From a browser selected customer with C_ID = 11784 and placed an order with Item:00001MITEM02584 Quantity:3. 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/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbStore(OrderCmp20EJB.java:417): ejbStore 
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPassivate(OrderCmp20EJB.java:397): ejbPassivate 
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(OrderCmp20EJB.java:107): ejbCreate 
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbCreate(OrderCmp20EJB.java:115): Atomicity Test (1,2,3): Order Id: 6792002
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPostCreate(OrderCmp20EJB.java:149): Atomicity Test 3: OrderLineId: 1
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPriceWithDiscount(OrderCmp20EJB.java:520): getPriceWithDiscount 
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.getPercentDiscount(OrderCmp20EJB.java:592): getPercentDiscount
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.findCustomer(OrderCmp20EJB.java:540): findCustomer
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.checkCustomerCredit(OrderCmp20EJB.java:568): checkCustomerCredit 
04/08/17 21:28:00 OrderCmp20EJB_PersistenceManager16 at org.spec.jappserver.orders.orderent.ejb.OrderCmp20EJB.ejbPassivate(OrderCmp20EJB.java:397): ejbPassivate 


The Order ID from the AppServer log is 6792002. Querying this orderID from
the Database gives:

SQL> select * from O_orders where o_id = 6792002;

no rows selected

SQL> select * from O_orderline where  ol_o_id = 6792002;

no rows selected

SQL> spool off;
