AOP-based solution for declarative transaction demarcation. Builds on the AOP infrastructure in org.springframework.aop.framework. Any POJO can be transactionally advised with Spring.
The TransactionFactoryProxyBean can be used to create transactional AOP proxies transparently to code that uses them.
The TransactionInterceptor is the AOP Alliance MethodInterceptor that delivers transactional advice, based on the Spring transaction abstraction. This allows declarative transaction management without JTA if an application uses only a single database.
If you require programmatic rollback, call the setRollbackOnly() method on the TransactionStatus object returned from the TransactionInterceptor's static currentTransactionStatus() method. Invoking this method outside a Spring transactionally advised AOP invocation is a programming error and will result in a runtime exception.