Configuring a Data Source
A benefit of EJB is that the container manages database connection pooling for you. It also enlists the resource manager to manage transactions automatically. You’ll learn more about resource managers and transaction enlistment in Chapter 12, “Transactions,” so don’t worry about what that part means yet if it’s unfamiliar to you. In short, a resource manager provides access to a data store of some type. In this chapter, a relational database management system is the resource manager of the most interest.
Most of the JDBC coding you do in a bean class that uses BMP is no different than what you’d do in a non-EJB application. The only significant difference is in how you configure a data source and obtain a connection ...
Get Special Edition Using Enterprise JavaBeans™ 2.0 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.