Assignment one -> Task two
 

Task two: Pet store

Introduction

The Java BluePrints program defines the application programming model for the Java EE platform. It provides best practice guidelines and architectural recommendations for real-world application scenarios to enable developers to build portable, scalable, and robust applications using the Java EE technologies.

Java BluePrint has developed a example application named Java Petstore (https://blueprints.dev.java.net/petstore/)

Requirements

The Java BluePrint program gives us the assignment to extend the example enterprirse application with a web system in which the users can edit the contactinfo of a seller. After each edit an confirmation email is send to the seller. Therefore, a correct email adress is necessary.

The architecture of the system has to be multi-tier; the clients use a web browser, the application is running on a glassfish application server and the database on a MySQL server.

The database is provided. The Java Blueprint progam provide a petstore.sql file containing the create table and the insert statements and a ERD document containing the ERD diagram of the database.

Goal state

Using goal state gives an idea about the functionality and interfaces of how the final product should look like.

Solution

First, build the edit requirement. Therefore, build the database layer, persistence layer, business layer and web layer.

Next, build the email requirement. Email is asynchronous communication, therefore a message driven bean is most suitable. For example, in the case the mail server is down. The source code of this bean is given in the MDB tutorial.

The control servlet is the producer of the messages. Look in the send messages tutorial for information about how to send the messages.

© Marco Marcellis 2009