View RSS Feed


Spring and JDBC

  1. Spring Transaction Management

    by , 07-07-2012 at 07:33 PM
    The Spring supports the following two types of transaction management.

    • Programmatic Transaction Management: In this type of transaction management, you will manage the transaction in your code. This transaction management provide you extreme flexibility and at the other end it is hard to manage and maintain.
    • Declarative Transaction Management: In this transaction management, the business code is separated from the transaction management. The XML based configuration or annotations ...
  2. Transactions in Spring

    by , 07-07-2012 at 07:32 PM
    A sequence of actions which make a single work unit is a database transaction. This sequence of actions must be completely taken effect or discarded at all. The most important part of RDBMS based enterprise applications is transaction management which ensure consistency and data integrity. Following are the four main properties of transactions which explain it.
    • Atomicity: A single unit of operation best describes the transaction. So that is either successful or not as a single unit of operation. ...
  3. What is JdbcTemplate Class?

    by , 07-07-2012 at 07:31 PM
    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 ...
  4. Spring JDBC Framework Overview

    by , 07-07-2012 at 07:30 PM
    It is cumbersome to write useless and unnecessary code when working with the database using old JDBC which is old and plain to handle database connections and exceptions etc. All the minor details are handled by the Spring JDBC framework like open a database connection, prepare a SQL statement, execute a SQL statement, handle transactions, process exception and close a database connection.

    You job is to only define the parameters for database connections and SQL statements so that ...
  5. Database Support in Spring

    by , 11-16-2011 at 06:40 PM
    In our next tip, I will focus on Spring’s data access support. Spring uses the design pattern, data access object (DAO). The purpose of DAOs is to provide means to read and write data to the database. So what Spring has focused on is to make it easy for developers to write DAOs as irrespective of whether you use JDBC, Hibernate, JPA or JDO. The way in which it does this is by separating the interface from the data access implementation. Therefore the implementation can change to align with the ...
    Hibernate , JDBC , JPA