Chapter 3. Container Services
We see examples of efficient processes every day, even in our most mundane daily routines. A trip to the supermarket may involve ordering sliced meats from the deli counter, selecting grocery items from pre-stacked shelves, listening to advice from the butcher, and paying the cashier. If we were to model this errand as a business system, we’d notice that the whole is composed of many smaller pieces, and each task is serviced by a specialized worker. It is this same “do one thing and do it well”[4] approach that was introduced in French firearms production, powered the assembly lines pioneered by Henry Ford, and became omnipresent during the American industrial revolution as the preferred mechanism to maximize throughput.
The benefits of allowing each concern to be fulfilled by a specialist through division of labor are fairly obvious: a secretary should answer phones while a mail room attendant handles shipping. Similarly, application developers should write the rules of their business and leave the mechanics of reliable, distributed systems to middleware providers.
In the case of EJB, the Component Model defines our interchangeable parts, and the Container Services are specialists that perform work upon them. The Specification provides:
Dependency injection
Concurrency
Instance pooling/caching
Transactions
Security
Timers
Naming and object stores
Interoperability
Lifecycle callbacks
Interceptors
Java Enterprise Platform integration
We’ll introduce each at a high ...
Get Enterprise JavaBeans 3.1, 6th Edition 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.