Hi Garrett,<br><br>The persistence is very pluggable. I&#39;d suggest to copy SingleSessionCommandService, remove all JTA code and then manage transactions declaratively using Spring.<br><br>Best regards,<br>Michal<br><br>
<br><div class="gmail_quote">2009/8/14 Garrett Conaty <span dir="ltr">&lt;<a href="mailto:garrett@conaty.net">garrett@conaty.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi there,<br>
<br>
Has anyone been successful with Drools 5.1 and persistent processes?  I&#39;ve been debugging for quite a while now and not sure if the code was meant to run in a container.<br>
<br>
I&#39;m using Spring 2.5, Drools 5.1, and Hibernate 3.3<br>
<br>
Specifically:  In SingleSessionCommandService<br>
<br>
a) the constructor starts a new UserTransaction regardless if one is already active.  Using Bitronix TM or some other that doesn&#39;t support nested transactions causes this to fail<br>
<br>
b) The use of &#39;this.em&#39; as the entity manager across calls to &#39;execute(GenericCommand&lt;t&gt; command) doesn&#39;t work with JTA and Hibernate.  Specifically the Hibernate session is closed when the JTA transaction commits.  Therefore, this.em cannot be reused<br>

<br>
c) this.localEm is never used<br>
<br>
Anyhow, I&#39;d be happy to supply more information and understand the rationale behind the implementation.  I&#39;m using it on a client project, and willing to fix (if it&#39;s actually broken), but I get the feeling I&#39;m the first person to try this in a JTA environment<br>

<br>
Thanks,<br><font color="#888888">
Garrett</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>