<br>Hi guys,<br><br>I&#39;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>&lt;bean id=&quot;springTxManager&quot; class=&quot;org.springframework.transaction.jta.JtaTransactionManager&quot; /&gt;<br>

&lt;jee:jndi-lookup id=&quot;springEMF&quot; jndi-name=&quot;java:DroolsEMF&quot;/&gt;<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>&lt;bean id=&quot;springEMF&quot; class=&quot;org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean&quot;&gt;<br>        &lt;property name=&quot;persistenceXmlLocation&quot; value=&quot;classpath:META-INF/spring-persistence.xml&quot; /&gt;<br>

        &lt;property name=&quot;jpaVendorAdapter&quot;&gt;<br>            &lt;bean class=&quot;org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter&quot; /&gt;<br>        &lt;/property&gt;<br>    &lt;/bean&gt;<br>

    <br>    &lt;bean id=&quot;springTxManager&quot; class=&quot;org.springframework.orm.jpa.JpaTransactionManager&quot;&gt;<br>           &lt;property name=&quot;entityManagerFactory&quot; ref=&quot;springEMF&quot; /&gt;<br>

    &lt;/bean&gt;          <br><br><br>Thanks.<br><br><br>-- <br>Best regards,<br><br>Cristiano Nicolai<br>