2 The Basics of Java EE

WHAT’S IN THIS CHAPTER?            

  • Introduction to the core concepts of Java EE
  • Discussion of the multitier structure of an enterprise application
  • Explanation of Java EE–compliant servers and the web profile
  • Convention over configuration overview
  • Content Dependency Injection overview
  • Interceptor overview

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code download for this chapter is found at www.wrox.com/go/projavaeedesignpatterns on the Download Code tab. The code is in the Chapter 2 download and individually named according to the names throughout the chapter.

The Java EE programming model has been simplified substantially since J2EE. Annotations have replaced the XML descriptors files, convention over configuration have replaced the tedious manual configuration, and dependency injection hides the creation and lookup of resources. Developers need to reconsider their approach to design and coding.

The development of Java EE enterprise applications has gotten easier. All that you need is a POJO (Plain Old Java Object) annotated with some metadata and, depending on the annotation used, the POJO becomes an Enterprise JavaBeans (EJB, stateful or stateless), a servlet, a JSF backing bean, a persistence entity, a singleton, or a REST web service. You can optionally declare many of these services using XML in a deployment descriptor.

Listing 2-1 shows how to make a POJO into a singleton bean that is instantiated and initialized at start-up ...

Get Professional Java EE Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.