Case 4

Implementing Model Layer

The Home Town Bank application has progressed to the point of beginning the implementation. Your team has been tasked with doing the final detailed design and implementation for the JDBC based data access objects (DAO’s) that will retrieve data from the database. You will be provided with a MySQL script file that will generate a database for you to use and design against. It is expected by the senior software engineers for this application that the DAO objects will use a connection pool and that it will be implemented using the singleton pattern.

Not long after your team has completed and unit tested all of the DAO objects, you get a bit of bad news. The client has decided that they will be using an ORACLE database management system instead.

What does the team need to do to accommodate this change? Is there a better approach?

Return and Report

Come prepared to discuss:

  • What are the advantages of using Enterprise Java Beans.
  • Describe the guidelines for when Enterprise Java Beans should be used.
  • What is a POJO, a Java bean and an Enterprise Java Bean?
  • What are the guidelines that you should follow for creating Java beans?
  • What is meant by the term, persistence (as related to computer science)?
  • What are DAOs?
  • JDBC (Be prepared to walk through and explain how to connect to a database and SELECT, INSERT, UPDATE and DELETE records).
  • What is Connection Pooling and what problem does it solve?
  • What are the three types of Enterprise Java Beans and describe the function or purpose for each?
  • What advantages do Enterpirse Entity beans have over using DAOs?

Design

  1. Create a UML class diagrams illustrating all the EJB3 entity bean classes (in the model layer) and all relationships between the classes needed to support your use cases.
  2. Install Oracle, create a user called hometown bank, and successfully execute the hometownbank.sql SQL script to build the database.
  3. Create entity EJBs for the Person, phone and address tables in the database and successfully deploy these three EJBs to JBoss.

Implementation

  1. Update the Oracle SQL script for homeTownBank and rebuild the database.
  2. Create and deploy all model EJB3 Entity Bean classes needed to support the Home Town Bank application

Suggested Resources

  1. Enterprize java beans introduction (Presentation)
  2. JavaBean Definition
  3. POJO Definition
  4. Persistence (computer science)
  5. Data Access Objects (DAO)
  6. UML Class Diagrams Tutorial
  7. JDBC Bascis
  8. Connection Pools
  9. Enterprise JavaBeans 3.0 text, Chapters 5 – 9
  10. Configuring JBoss to use an Oracle database
  11. Download Oracle 10g XE
Published on October 13, 2008 at 4:47 pm Leave a Comment

The URI to TrackBack this entry is: http://rkjackson.wordpress.com/cases/case/trackback/

RSS feed for comments on this post.

Leave a Comment