[rules-users] JPA process working in container?

Garrett Conaty garrett at conaty.net
Fri Aug 14 18:38:11 EDT 2009


Hi there,

Has anyone been successful with Drools 5.1 and persistent processes?   
I've been debugging for quite a while now and not sure if the code was  
meant to run in a container.

I'm using Spring 2.5, Drools 5.1, and Hibernate 3.3

Specifically:  In SingleSessionCommandService

a) the constructor starts a new UserTransaction regardless if one is  
already active.  Using Bitronix TM or some other that doesn't support  
nested transactions causes this to fail

b) The use of 'this.em' as the entity manager across calls to  
'execute(GenericCommand<t> command) doesn't work with JTA and  
Hibernate.  Specifically the Hibernate session is closed when the JTA  
transaction commits.  Therefore, this.em cannot be reused

c) this.localEm is never used

Anyhow, I'd be happy to supply more information and understand the  
rationale behind the implementation.  I'm using it on a client  
project, and willing to fix (if it's actually broken), but I get the  
feeling I'm the first person to try this in a JTA environment

Thanks,
Garrett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2419 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20090814/3aafb3aa/attachment.bin 


More information about the rules-users mailing list