<br>Hi guys,<br><br>I'm trying to deploy a spring based Knowledege Session with JPA persistence on Jboss 5.1, I was able to do it using a RESOURCE_LOCAL persistence unit but I would like to use a container JTA based deployment.<br>
<br>Basically, JPAConfiguration requires a Spring PlatformTransactionManager then I tried to use the following combination:<br><br><bean id="springTxManager" class="org.springframework.transaction.jta.JtaTransactionManager" /><br>
<jee:jndi-lookup id="springEMF" jndi-name="java:DroolsEMF"/><br><br>The problem is that using it, SingleSessionCommandService.initTransactionManager does not create a JPAManager.<br><br>So, my guess for this to work is to add support for this on SingleSessionCommandService or change JPAConfiguration (drools-spring-1.0.0.xsd) to accept that no transaction-manager is defined, causing Drools JtaTransactionManager to lookup the TransactionMananger from JNDI context.<br>
<br>The only way that I could deploy it is using these beans definitions:<br>
<br><bean id="springEMF" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"><br> <property name="persistenceXmlLocation" value="classpath:META-INF/spring-persistence.xml" /><br>
<property name="jpaVendorAdapter"><br> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" /><br> </property><br> </bean><br>
<br> <bean id="springTxManager" class="org.springframework.orm.jpa.JpaTransactionManager"><br> <property name="entityManagerFactory" ref="springEMF" /><br>
</bean> <br><br><br>Thanks.<br><br><br>-- <br>Best regards,<br><br>Cristiano Nicolai<br>