Petstore 2.0

Muddu Krishna

Greenhorn

Posts: 4

posted 8 years ago

Hi, I am working on part 2 assignment and so am first trying to understand the architecture of Petstore 2.0. It doesnot use any of the design patterns like DAO, Service Locator and the DTO which would otherwise would be normally expected to be seen in a JEE application.

The PetStore uses a CatalogFacade which is a POJO and stored in the ServletContext for all usecases to lookup. This Facade interacts with the JPA Entities. Thus the Entities are hidden from the servlets and JSF managed objects.

I am also wondering about the utility of SFSB in a Shopping Cart. We can have a SLSB or a POJO facade as above injecting an EntityManager which can store the state of the cart in the database rather than as an instance variable which is persisted at the time of removal in a SFSB.