top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is JDBC DataSource and what are it’s benefits?

0 votes
688 views
What is JDBC DataSource and what are it’s benefits?
posted Sep 19, 2017 by Pankaj Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

JDBC DataSource is the interface defined in javax.sql package and it is more powerful that DriverManager for database connections. We can use DataSource to create the database connection and Driver implementation classes does the actual work for getting connection. Apart from getting Database connection.

DataSource provides some additional features such as:

Caching of PreparedStatement for faster processing
Connection timeout settings
Logging features
ResultSet maximum size threshold
Connection Pooling in servlet container using JNDI support

answer Sep 20, 2017 by Sourav Kumar
...