[rules-users] drools flow persistence doesn't work with spring jta - bug/TODO code in SingleSessionCommandService#initTransactionManager

Mauricio Salatino salaboy at gmail.com
Wed Apr 20 11:08:03 EDT 2011


As far as I remember, there was a problem with spring and JTA XA
implementation.
Can you provide us a simple test case that fails? we can create a jira issue
and work on it easily if we have that.
Greetings.

On Wed, Apr 20, 2011 at 11:57 AM, gs76pl <gstasica at pacemetrics.com> wrote:

> hi,
>
> i've been trying to setup my drools flow persistence layer to use spring
> transaction management (JTA) but it looks like some parts of the code are
> missing in 5.1.1 rendering the whole idea impossible.
>
> Whats happening is that when my transaction manager calls commit it gets
> NullPointerException because jpm variable in SingleSessionCommandService
> has
> never been set. It looks like it should be set in initTransactionManager
> method in line 233 but all that this line is a comment that reads:
> ...else{
> // configure spring for JPA and distributed transactions
> }
>
> So is there any way to have spring managing JTA transactions?
> Sorry but it's been over a week for me trying to have drools persistence
> working and after all the problems so far i'm considering jbpm5 as
> something
> in a more "production ready state"
>
> i've found similar thread here
> http://drools.46999.n3.nabble.com/Drools-Spring-JPA-JTA-td2024942.html but
> till now nobody replied to it with any explanation
>
> below my spring config
>
> <bean id="droolsFlowEntityManagerFactory"
>
>  class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
>        p:dataSource-ref="droolsFlowDataSource"
> p:persistenceUnitName="org.drools.persistence.jpa"
>
>
> p:persistenceXmlLocation="classpath:/config/droolsflow/jpa/persistence.xml">
>        <property name="jpaVendorAdapter">
>                <bean
> class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
>                        p:showSql="true" p:generateDdl="false" />
>        </property>
> </bean>
>
> <bean id="bitronixTransactionManagerConfig"
> factory-method="getConfiguration"
> class="bitronix.tm.TransactionManagerServices">
>        <property name="serverId" value="spring-btm" />
>        <property name="warnAboutZeroResourceTransaction"
> value="true"></property>
> </bean>
>
> <bean id="bitronixTransactionManager"
> factory-method="getTransactionManager"
>        class="bitronix.tm.TransactionManagerServices"
> depends-on="bitronixTransactionManagerConfig" destroy-method="shutdown" />
>
> <bean id="droolsFlowTransactionManager"
> class="org.springframework.transaction.jta.JtaTransactionManager">
>        <property name="transactionManager" ref="bitronixTransactionManager"
> />
>        <property name="userTransaction" ref="bitronixTransactionManager" />
> </bean>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/drools-flow-persistence-doesn-t-work-with-spring-jta-bug-TODO-code-in-SingleSessionCommandService-inr-tp2843098p2843098.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110420/5db6ca04/attachment.html 


More information about the rules-users mailing list