I have an application using Tomcat/Spring 3/JPA/Hibernate but my merges do not commit to datbase. This is the configuration:
spring-conf.xml:
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/.." />
<property name="username" value=".." />
<property name="password" value=".." />
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<context:annotation-config/>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
</bean>
persistence.xml:
<persistence-unit name=".." transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
...
<property name="dialect" value="org.hibernate.dialect.MySQLDialect" />
and this is a simple class:
@Transactional
public class UserAdServiceImpl{
...
merge(...);
any idea?