O'Reilly logo

Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications by Paul Anderson, Gail Anderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.7. Key Point Summary

The Music EJB accesses a database through the JDBC API. Because this access is read only, we implement our business process with a session bean. A stateless session bean is appropriate because keeping track of client-specific state is not necessary.

The Music EJB uses the Value Object pattern introduced in the previous chapter. In addition, we introduce the Data Access Object pattern, which abstracts persistence operations into a separate helper class. Using an interface for vendor-independent database access helps implement classes that work with a particular vendor's SQL implementation. A factory instantiates the correct implementation class by looking up the class name in the naming context environment entry.

Here are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required