Chapter 7: Data Access in J2EE Applications

Overview

Data access is vital to enterprise applications. Often the performance of the data source and the strategies used to access it will dictate the performance and scalability of a J2EE application. One of the key tasks of a J2EE architect is to achieve a clean and efficient interface between J2EE business objects and data source.

As we shall see, it's important to decouple business logic components from the details of data access. The EJB specification provides entity beans to achieve the necessary abstraction. However, the entity bean model isn't always appropriate, and there are other techniques we can use to achieve this objective without committing to it.

This chapter takes a high-level view of the practical data modeling and data access choices facing J2EE architects and developers, paying special attention to the common problem of Object-Relational (O/R) mapping when using a relational database. It concludes by developing a data access strategy for our sample application.

In the following two chapters, we'll look more closely at specific data access strategies. These strategies are the subject of religious debate among J2EE developers. We'll take a pragmatic approach, looking at how best to achieve results in real applications.

Important 

A disclaimer – 1 can't tell you everything you need to know about data access in J2EE applications. This requires expert knowledge of the underlying data sources you work with. For example, is the aim efficient and reliable access to an ODBMS or an RDBMS? Access to Oracle, DB2, or Sybase? There is no satisfactory "one size fits all" solution unless data access requirements are trivial.

By the end of this chapter you should be convinced that J2EE developers need a strong understanding of database technology, and should be prepared to seek specialist advice when necessary.



Expert One-on-One J2EE Design and Development
Microsoft Office PowerPoint 2007 On Demand
ISBN: B0085SG5O4
EAN: 2147483647
Year: 2005
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net