Struts1 Spring and Hibernate Integration

Register.jsp

Failure.jsp

Success.jsp

web.xml

struts-config.xml

applicationContext.xml

RegisterForm.java

RegisterAction.java

Register.hbm.xml

Register.java

RegisterDao.java

RegisterDao.Impl.java

RegisterBoImpl.java

RegisterBo.java

Spring web application

This is a complete web application of spring jdbc module of spring framework First we write presentation logic index.html

list.html

newaccount.html

delete.html

transaction.html

web.xml

applicationContext.xml

Templet.java

dsinter.java

insertsevlet.java

deleteservlet.java

selectservlet.java

showservlet.java

updateservlet.java

Spring MVC Basics

Spring mvc module provide the complete mvc architecture pattern implementation by only spring framework presentation layer implemented through jsp. Front controller is written in servlet and business logic is provided through special controller. In spring 2.5 provides spring mvc and spring web module are combined there is no need separate jar files. In this module … Read more

Spring DAO

This module provide the abstraction layer of spring related application Dao Support classes are : JdbcDaoSupport – Super class for JDBC data access objects. Requires a DataSource to be set, providing a JdbcTemplate based on it to sub classes. HibernateDaoSupport – Super class for Hibernate data access objects. Requires a SessionFactory to be set,providing a … Read more

Spring Transaction Management

Provides a consistent abstraction for transaction management. This abstraction is one of the most important of Spring’s abstractions wethout transaction data definition language operation is not perform, and delivers the following benefits: 1 Provides a consistent programming model across different ORM Database Layer and JDO. 2 Provides a simpler, easier to use, API for programmatic … Read more

Spring Aspect Oriented Programming

AOP is a Aspect Oriented Programming not a object oriented programming this is a methodology to provide other middle ware services such as security transaction management etc. Spring AOP is implemented in pure Java. There is no need for a special compilation process. Spring AOP does not need to control the class loader hierarchy, and … Read more

Spring Bean Example

This application is the example of been collaboration that means one bean injecting the information of other beans Book.java

This is normal pojo class BookInter.java

this is implementation details class file CommandLineView.java

this class displaying the out put. book.xml

This is client application of all application Output

Spring configuration first example

Resource of spring core module Applications are used 1 Spring interface. 2 Spring bean class. 3 Spring- configuration file. 4 Client Applications All the spring releted jar files put in lib folder directory structure is same as normal java/j2ee applications. Demo.xml

This example is setter base dependency injection this xml file is spring configuration … Read more

Inversion of Control/Dependency Injection

The basic principle is that beans define their dependencies (i.e. the other objects they work with) only through constructor arguments, arguments to a factory method, or properties which are set on the object instance after it has been constructed or returned from a factory method Dependency Injection are of two types 1 Constructor based dependency … Read more

BeanFactory and Bean Definitions

The BeanFactory and ApplicationContext is the actual container which instantiates, configures, and manages a number of beans. A BeanFactory comes by the interface org.springframework.beans.factory.BeanFactory, for which there are multiple implementations ApplicationContext comes in spring j2ee modules i.e spring 2.5 Activating spring beanFactory container is not but creating object for class that implements “org.springframework.beans.factory.BeanFactory” interface. ApplicationContexts … Read more