It took a little more work than that, the working solution involved the next 
spring config:

<bean name="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
  |     <property name="jndiName" value="java:/DefaultDS" />
  | </bean>
  | <bean name="jtaTransactionManager" 
class="org.springframework.jndi.JndiObjectFactoryBean">
  |     <property name="jndiName" value="$java:/TransactionManager" />
  | </bean>
  | <bean id="transactionManager" 
class="org.springframework.transaction.jta.JtaTransactionManager">
  |     <property name="transactionManager" ref="jtaTransactionManager"/>
  | </bean>     
  | 
  | <bean id="sessionFactory" 
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  |     <property name="dataSource" ref="dataSource" />
  |     <property name="jtaTransactionManager" ref="jtaTransactionManager"/>
  |     [...]
  | </bean>
  | <bean id="abstractTransactionProxy" abstract="true" 
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
  |     <property name="transactionManager" ref="transactionManager"/>
  | </bean>
  | 
In hibernate.properties I had to add:
hibernate.transaction.factory_class 
org.hibernate.transaction.JTATransactionFactory
  | hibernate.transaction.manager_lookup_class 
org.hibernate.transaction.JBossTransactionManagerLookup
  | 
I'm a little worried that I had to configure hibernate's transactionManager 
twice, once in hibernate.properties, and once in the sessionFactory's 
jtaTransactionManager property, and also for spring's 
PlatformTransactionManager.

Anyway, thanks for the hint.
Greets, Geert.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927078#3927078

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927078


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to