O'Reilly logo

Applied Enterprise JavaBeans™ Technology by Kevin Boone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.9. Practical JDBC usage in EJBs

Two strategies are widely used for handling JDBC connections in EJBs.

Connections are kept open Until very recently, this was the preferred approach: All the required connections are created when the EJB implementation instance is initialized and remain active for the life of the instance. With this strategy, the appropriate places to open and close connections are summarized in Table 8.1. This strategy has the advantage that it does not depend on the efficiency of the connection pooling algorithm for its effectiveness. It has two important disadvantages. First, the connection pooling system may not allow an arbitrarily large number of virtual connections. With stateful session EJBs in particular (which are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required