Quick tip: debugging Spring transactions with Hibernate

To see all but transaction logging (which method is wrapped with transaction, when is a transaction started, committed or rollbacked, etc.) use this log4j configuration:

log4j.rootCategory=ERROR, stdout

# ...assuming that you have configured stdout appender 

log4j.logger.org.hibernate.SQL=OFF
log4j.logger.org.springframework.transaction=DEBUG
log4j.logger.org.springframework.orm.hibernate3.HibernateTransactionManager=DEBUG
Advertisements