下面是我对spring和spring_persistence.xml的配置。persist() 操作没有插入记录。也没有错误。。
WAS 8.5 应用服务器 Spring 3.1 Hibernate 3.6.7
请帮忙 !
<tx:annotation-driven transaction-manager="transactionManager"/>
<context:annotation-config />
<bean id="transactionManager" class="org.springframework.transaction.jta.WebSphereUowTransactionManager" >
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" >
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName" value="perstemplate"/>
<property name="persistenceXmlLocation" value="classpath*:META-INF/myspring_persistence.xml"/>
</bean>
<persistence-unit name="perstemplate" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>com.mycompany.EntityClass</class>
</persistence-unit>