Example of Spring Interceptor
HandlerInterceptor interface allows the Spring MVC to intercept the requests.
There are three method in HandlerInterceptor. 1. preHandle 2. postHandle 3.afterCompletion ...
Read property file using Spring
For the tutorial, tomcat server is considered. Lets the application name is PlaceHolderDemo. Create a java file as below to JNDI look up to read property file ...
Understanding Spring IOCBean Factory handles basic functionality and provides the Configuration Framework. Application Context handles enterprise-centric functionality ...
Example of Spring Bean Scopes
There are five spring beans scopes which are managed by Spring IoC container
1. singleton, 2. prototype, 3. request, 4. session, 5. global session ...
Spring AOP for Database Transaction
We can achieve AOP just by setting some configuration in XML or also can be achieved by creating a class using annotation. ...
Difference Between Servlet Filter and Spring Interceptor
Filter is servlet specification. It is configuired in web.xml. Filter filters the request before it goes to servlet.
Filter can not change response. Filter can only change request ...
Spring Hibernate Integration Example
To integrate Spring with hibernate, I have used ComboPooledDataSource. ComboPooledDataSource
provides property for driverClass, jdbcUrl, user, password, maxIdleTime, preferredTestQuery etc.
All the hibernate properties can be read from property file using spring place holder.
...
Schema Based AOP Support in Spring
Spring supports AOP in two ways: Schema-based AOP support and @AspectJ support. Here we have shown how to use schema based AOP support.
...
Example of Aspectj AOP Spring
Here autoproxying means if Spring finds any aspect, it will automatically generate proxy object. Now lets see how to use @Aspect Support. Lets we have a class named as ConcreteAspectExample.java defined as
...
Types of Spring Propagation and Example
Below are Enum Constant summmary. These Enumeration represents transaction propagation. It supports a current transaction and will throw an exception if got none ...
Spring Transaction Abstraction
Spring transaction manages the exceptions while interacting with database, handles commit and rollback accordingly. Below are the transaction definitions in ...
Working of Transactional Proxy In Spring
Below is the interaction among modules when we call a transactional proxy. Caller invokes and comunicates AOP ...
Rollback in Declarative Transaction In Spring
In Spring AOP transaction, we can set the rollback point of transaction. Exception is a rollback point. So we can set the transaction to be rollback for the given exception. This can be ...
-
Latest Post
- How To Create Immutable Class In Java
- Example Of ConcurrentHashMap In Java
- Example Of Comparable In Java
- Many-to-many Mapping In Hibernate with Annotation
- One-to-many Mapping In Hibernate with Annotation
- One-to-one Mapping In Hibernate with Annotation
- Example Of JQuery addClass
- Example Of JQuery removeClass
- Example Of JQuery Validation Of Checkbox



