Hi there!
Im using: Jboss 7.1.1, Hibernate 3.6.9, Spring 3.0.1.
Currently I have following configuration which works great (but user want to switch from 'org.springframework.orm.jpa.JpaTransactionManager' to jboss transaction management):
applicationContext.xml (spring) snippet:
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="redbull_wtb" />
<property name="dataSource" ref="dataSource" />
<property name="persistenceXmlLocation" value="classpath*:META-INF/persistence.xml" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="databasePlatform" value="org.hibernate.dialect.SQLServerDialect" />
<property name="showSql" value="false" />
<property name="generateDdl" value="false" />
</bean>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="${database.jndi.path}" />
</bean>
persistence.xml snippet:
<persistence-unit name="my_pu" transaction-type="RESOURCE_LOCAL">
<properties>
<property name="jboss.as.jpa.managed" value="false" />
<property name="hibernate.dialect"
value="org.hibernate.spatial.dialect.sqlserver.SqlServer2008SpatialDialect" />
</properties>
</persistence-unit>
</persistence>
Someone could tell me how to switch to jboss transaction management?
Already tried out several configurations but nothings works..