Category: Javaskool Category
Spring comprises of seven modules. They are. The core container: The core container provides the essential functionality of the Spring framework. A primary component of the core container is the BeanFactory, an implementation of...
Spring is an open source framework created to address the complexity of enterprise application development. One of the chief advantages of the Spring framework is its layered architecture, which allows you to be selective...
Benefits of IOC (Dependency Injection) are as follows: Minimizes the amount of code in your application. With IOC containers you do not care about how services are created and how you get references to...
There are three types of dependency injection: Constructor Injection (e.g. Pico container, Spring etc): Dependencies are provided as constructor parameters. Setter Injection (e.g. Spring): Dependencies are assigned through JavaBeans properties (ex: setter methods). Interface...
The basic concept of the Inversion of Control pattern (also known as dependency injection) is that you do not create your objects but describe how they should be created. You don’t directly connect your...
The Spring Framework supports exactly five scopes (of which three are available only if you are using a web-aware ApplicationContext). The scopes supported are listed below: Scope Description singleton Scopes a single bean definition...
Spring and EJB feature comparison. Feature EJB Spring Transaction management Must use a JTA transaction manager. Supports transactions that span remote method calls. Supports multiple transaction environments through its PlatformTransactionManagerinterface, including JTA, Hibernate, JDO,...
The RowCallbackHandler interface extracts values from each row of a ResultSet. Has one method – processRow(ResultSet) Called for each row in ResultSet. Typically stateful.
SQLProvider: Has one method – getSql() Typically implemented by PreparedStatementCreator implementers. Useful for debugging.
PreparedStatementCreator: Is one of the most common used interfaces for writing data to database. Has one method – createPreparedStatement(Connection) Responsible for creating a PreparedStatement. Does not need to handle SQLExceptions.
Recent Comments