Chapter 13. JDBC Connectivity

Most Web applications process data, and that data is often stored in a database. The most popular database management systems are based on relational concepts, and are appropriately called relational database management systems (or RDBMSs).

All popular databases (including Oracle, MySQL, SQL Server, Sybase, Interbase, PostgreSQL, and DB2) are relational databases. Tomcat administrators must be well versed in RDBMSs. In addition, an understanding of the nature of interactions between an RDBMS and Tomcat is required to better anticipate the requirements that may arise.

This chapter addresses the following topics:

  • Java Database Connectivity (JDBC), which is Java's database connectivity API

  • JDBC version evolution

  • JDBC driver types and advantages

  • Importance of connection pooling

  • Interactions between RDBMS and Tomcat

  • JNDI-based JDBC configurations

  • Standard configuration for a JDBC data source

  • Alternative JDBC configurations that may be required

  • Configuring alternative JDBC access

This chapter also covers a variety of situations that may arise when configuring Tomcat to work with relational databases. The examples offered in this chapter feature hands-on configuration. Special emphasis is placed on the recommended or preferred way of interacting with databases.

After reading this chapter, you will be comfortable with the integration of RDBMSs with Tomcat, and will be able to handle the most common requests for configuring RDBMSs to work with the Tomcat server.

JDBC Basics ...

Get Professional Apache Tomcat 6 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.