aspose file tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Petstore Application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Architect Certification (SCEA/OCMJEA)
Reply Bookmark "Petstore Application" Watch "Petstore Application" New topic
Author

Petstore Application

Eric Lefurge
Greenhorn

Joined: Dec 05, 2001
Posts: 17
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
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
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 ..."
 
 
subject: Petstore Application
 
Threads others viewed
Dispose Window & jar
useBean
Accept compresed requests in tomcat
Back Button & Mouse Risk click
Study material of IBM test 286
MyEclipse, The Clear Choice