Java Reference
In-Depth Information
4.2.2.3 DbConnection.java
In earlier sections, we created the DbConfig.java class to hold the configuration parameters
for accessing the database. The next logical step is to create a class to manage all the JDBC
connections for this application. Getting a database connection can also be accomplished
using DataSource class; however, in this topic, we use a basic method for obtaining a
JDBC database connection.
Listing 4-8. DbConnection.java class
Search WWH ::




Custom Search