I'm having a problem with what seems like a trivial configuration setting.
I am currently using Hibernate as the persistence framework alongside Spring (using org.springframework.orm.hibernate3.support.HibernateDaoSupport). Initially auto-commit was adequate for my need however now my system has grown to require proper transaction management.
I decided I wanted to simplify development and use annotation based transaction management to reduce the size of my configuration files.
To cut a long story short I have attempted to switch the auto-commit more to off by setting the hibernate property in my application-context.xml file as below.
Code:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource"><ref local="dataSource"/></property>
<property name="annotatedClasses">
<list><!-- my domain entity classes --></list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.default_schema">APP</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.DerbyDialect</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.connection.autocommit">false</prop>
</props>
</property>
</bean>
however, even after commenting out my transaction manager definition any calls such as save/saveOrUpdate successfuly update my database when the the changes should not have been committed.
As far as I know the hibernate setting should work, my datasource is also set to autocommit false by default and I do not know of any other settings in my setup which would affect my configuration.
Any help would be greatly appreciated.
Setup: Spring, Hibernate, Glassfish V2.1, JavaDB