2.10. Managing EJB Using Bean Pooling

The container cannot handle an unlimited number of EJB, therefore the container must pool the resources and share them across users. Each EJB, when deployed, specifies the number of instances to pool and reuse. EJB are not lightweight objects that can be created and destroyed when necessary. They are heavy objects that take considerable resource to create and destory. Therefore, the application server will manage a pool of EJB that users can use throughout the application. By having this pool, the application server can handle more requests since it does not have to spend time creating and destroying objects.

Get Sun Certified Enterprise Architect for J2EE™ Technology Study Guide 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.