Folks I was reviewing the petstroe application and found a few interesting things. To my suprise, the controller is a Session bean instead of a servlet as in the case like STRUTS framework. Any thoughts on this approach ??? Also I am confused regarding which EJB is handling the scenario of updating the inventory, sending email, verifying creditcard etc. when the customer confirms the order. Thanks for ur time
Eric
Eric Lefurge
Greenhorn
Joined: Dec 05, 2001
Posts: 17
posted
0
Folks I answer to myself I found out that the controller in the petstore example works in 2 tiers the main servlet at the webtier and the Shoppingclient controller at the EJB tier. And regarding who does the final processing once the order is committed, its the StateMachine which interacts with inventory, order and mailer. Is StateMachine similar to a DAO ?? and the ShoppingClientController similar to a SessionFacade ??? Eric
bill lubx
Greenhorn
Joined: May 04, 2002
Posts: 26
posted
0
From my point of view, stateMachine is a processor in Business Logic tier (EJB tier), which uses Command factory to get the proper Command Handler (EJB Action classes) to deal with the Events. While DAO is more focused on data access with less complicated business logic. ShoppingClientController is a subclass or adapter of EJBClientController, which represent the component controller for shopping card and custom related issue. This controller is used for read_only direct access from web tier help class and update access from EJB tier Command Handler. Correct me if I am wrong. Thanks /bill
Honk if you hate bumper stickers that say "Honk if ..."