Transactions



Transaction differences

Since Daobab is an JPA extendion, we are limited by JPA functionality provided by JPA engin below.
Unfortunatelly, there are differences into transaction handling between JavaEE compatibile engines and Spring-JPA
Thant's why you need to put the proper transaction handler into your code

Every Daobab transaction requered query in executed into aroundTransaction method.
This method is allowed into AbstractDao and you can overload this method.

JavaEE and Hibernate JPA transactions

	@Override
	public <T> T aroundTransaction(Supplier<T> t) {
		return aroundJEETransaction(t);
	}


Spring-JPA transaction

Basically, whole necessary code is contained into dedicated library. daobab-spring-integrator - see download page.

	@Transactional
	@Override
	public <T> T aroundTransaction(Supplier<T> t) {
		return super.aroundTransaction(t);
	}


When transaction is not working.

No effect suring save or update? Don't worry.
Propably you did nothig...either override aroundTransaction in case of JEE or add daobab-spring-integrator and use AbstractSpringDao as a base in case of Spring.