View RSS Feed

Spring Framework

What is JdbcTemplate Class?

Rate this Entry
by , 07-07-2012 at 06:31 PM (1867 Views)
Following functions are performed by JdbcTemplate class.

• Execute update statements
• Execute queries
• Stored procedure calls
• ResultSets iteration
• Returned parameter extraction
• Cache JDBC exceptions
• Transalation of JDBC exceptions into generic and informative exceptions that are defined in spring dao package

Once JdbcTemplate instance are configured, they are thread safe. It is possible to use a single JdbcTemplate instance and it can be injected into multiple DAOs safely.

A DataSoruce is configured in the Spring configuration file when the JdbcTemplate class is used and it’s a common practice. It injects dependency into you DAO classes when that share DataSoruce and JdbcTemplate is created in the DataSource setter method.

Submit "What is JdbcTemplate Class?" to Facebook Submit "What is JdbcTemplate Class?" to Digg Submit "What is JdbcTemplate Class?" to del.icio.us Submit "What is JdbcTemplate Class?" to StumbleUpon Submit "What is JdbcTemplate Class?" to Google

Categories
JDBC

Comments