tomcatConfiguring a JDBC Datasource


Introduction

In order to utilize a JDBC datasource, we must first set up a JNDI reference in Tomcat. After the JNDI reference is made, JDBC datasources can be used within our Tomcat server and applications using shared or independent references (Great for dev/staging/prod setup, or removing connection strings/credentials from committed code).

Remarks

Utilizing JNDI and JDBC also affords you to use ORMs like Hibernate or platforms like JPA to define "persistence units" for object and table mapp