Content area

Abstract

The JDBC 2.0 Standard Extension API specifies that a database service provider can implement a pooling technique that can allow multiple connection objects from a resource pool to be shared transparently among the requesting clients. In that situation, a J2EE component can use connection objects without causing overheads on the database resource manager, since a pool manager creates the connection objects upfront, at startup. The application service provider implements the pool manager in its memory space and can optimize resource usage by dynamically altering the pool size, based on demand. That is illustrated in Figure 2.

The following code example shows how an EJB application might access a database resource by using pooled connection objects (based on JDBC 2.0). The EJB component in this example uses a JNDI lookup to locate the database connection pool resource. The JNDI 1.2 Standard Extension API lets Java applications access objects in disparate directories and naming systems in a common way. Using the JNDI API, an application can look up a directory to locate any type of resource such as database servers, LDAP servers, print servers, message servers, file servers, and so forth. For a good overview of JNDI, refer to "The Java Naming and Directory Interface (JNDI): A More Open and Flexible Model."

With connection pooling, the JMS factory classes typically have proxies (configured by an administrator) so the open() and close() requests actually go to the proxies that manage a connection pool. Following the JMS API guidelines, a JMS service provider may implement a database to manage the message queues. In that situation, the appropriate JDBC driver renders the connection pooling. If the application is already using a JDBC 2.0 connection pool-enabled database, then all you need to do is configure the JNDI property for the JMS to use that JDBC instance.

Details

Company
Identifier / keyword
Title
Dive into connection pooling with J2EE; Manage access to shared, server-side resources for high performance
Publication title
JavaWorld; San Francisco
Pages
1
Number of pages
0
Publication year
2000
Publication date
Oct 27, 2000
Publisher
Foundry
Place of publication
San Francisco
Country of publication
United States
ISSN
10918906
Source type
Trade Journal
Language of publication
English
Document type
PERIODICAL
ProQuest document ID
237199135
Document URL
https://www.proquest.com/trade-journals/dive-into-connection-pooling-with-j2ee-manage/docview/237199135/se-2?accountid=208611
Copyright
Copyright Web Publishing, Inc. Oct 27, 2000
Last updated
2024-08-25
Database
ProQuest One Academic