Chapter 2 discussed the
basic architecture of Enterprise JavaBeans and Java Persistence,
including the relationship between the bean class, the EJB container,
EntityManager service. These
artifacts define a common model for distributed server-side components
as well as a persistence model that can be used on the server or in
standalone applications. But this model isn't enough to make EJB
interesting or even particularly useful. EJB servers also manage the
resources used by beans, and can manage thousands or even millions of
distributed objects simultaneously. They must manage how distributed
objects use memory, threads, database connections, processing power, and
more. Furthermore, the EJB specification defines interfaces that help
developers take advantage of these common practices.
EJB servers support six primary services: concurrency, transaction management, persistence, object distribution, naming, and security. These services provide the kind of infrastructure that is necessary for a successful three-tier system. EJB also supports two additional services: asynchronous messaging and a timer service.
This chapter discusses the resource-management facilities and the primary services that are available to Enterprise JavaBeans.
A large business system with many users can easily have thousands or even millions of objects in use simultaneously. As the number of interactions among these objects increases, ...