How can I verify that all JDBC access occurs with an active transaction, i.e. java.sql.Connection.getAutoCommit()always returns false?
I use Spring for transaction management ( @Transactional) and Hibernate for data access.
Update. What happens is that some access to Hibernate is done without annotating the service method with @Transactional. This is what I want to be notified about.
Update 2: Sample Code
You can call the following code:
public ServiceImpl implements Service {
public List<String> getSomeIds() {
return getDao().getSomeIds();
}
}
source
share