yea, for the process ( flow ) it seems to work fine using a regular
"org.springframework.orm.jpa.JpaTransactionManager":

        <bean id="abstractKnowledgeProvider"
             
class="org.drools.container.spring.beans.persistence.JPAKnowledgeServiceBean"
              abstract="true">

              <property name="entityManagerFactory" ref="entityManagerFactory" 
/>
              <property name="transactionManager" ref="txManager" />
              <property name="variablePersisters">
                        <util:map>
                                <entry key="javax.persistence.Entity"
                                
value="org.drools.persistence.processinstance.persisters.JPAVariablePersister"
/>
                                <entry key="java.lang.String"
                                
value="com.jpmc.tss.admincenter.framework.workflow.drools.variablepersistence.StringVariablePersister"
/>
                                <entry key="java.io.Serializable"
                                
value="org.drools.persistence.processinstance.persisters.SerializableVariablePersister"
/>
                        </util:map>
               </property>
        </bean>

        <bean id="txManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
                <property name="entityManagerFactory" 
ref="entityManagerFactory" />
        </bean>

        <bean id="entityManagerFactory"
        
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
                <property name="persistenceUnitName" 
value="your.persistence.unit" />
                <property name="dataSource" ref="datasource" />
                <property name="jpaProperties">
                        <props>
                <prop
key="hibernate.connection.autocommit">${hibernate.connection.autocommit}</prop>
                <prop
key="hibernate.max_fetch_depth">${hibernate.max_fetch_depth}</prop>
                <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
                    <prop key="hibernate.dialect">${hibernate.dialect}</prop>
                    <prop
key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
                        </props>
                </property>
        </bean>

        <bean
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"
/>
        <bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>

        <drools:connection id="connection1" type="local" />
        <drools:execution-node id="node1" connection="connection1" />


/Anatoly

-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-5-1-Persistence-without-JTA-tp828933p829922.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to