Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
No technology exists in a vacuum, and JPA is no different in this regard. Although the fat-client style of application demonstrated in the previous chapter is a viable use of JPA, the majority of enterprise Java applications are deployed to a Java EE application server. Therefore it is essential to understand the components that make up a Java EE application and the role of JPA in this environment.
We will begin with an overview of the major Java EE technologies relevant to persistence. As part of this overview, we will also detour into the EJB component model, demonstrating the basic syntax for stateless, stateful, singleton, and message-driven beans. Even if you have experience with previous versions of these components, you might find this section helpful to get up to speed with the changes in EJB 3 and Java EE. As part of the ease-of-development initiative for Java EE 5, EJB underwent some major revision and became considerably easier to implement.