[rules-users] Can Drools Flow Persistence Work without JTA

gs76pl gstasica at pacemetrics.com
Wed Apr 6 12:13:05 EDT 2011


if you want to use just local transactions below should be enough in your
spring.xml file


	
	
	
	
	 
 

	
	 
 

	
		
	
	

then in your persistence.xml file should look like below

	org.hibernate.ejb.HibernatePersistence
	config/droolsflow/jpa/orm.xml
	org.drools.persistence.session.SessionInfo
	org.drools.persistence.processinstance.ProcessInstanceInfo
	org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable
	org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo

org.drools.persistence.processinstance.variabletypes.SerializablePersistedVariable
	org.drools.persistence.processinstance.WorkItemInfo
	
		
		
		
				
	


and finally when you build your statefullknowledgeSession the code should
look like below


Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY,
getEntityManagerFactorySpringBean() );
env.set(EnvironmentName.TRANSACTION_MANAGER, getDroolsFlowTxManager() );

ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null,
env);


--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Can-Drools-Flow-Persistence-Work-without-JTA-tp1647078p2785697.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list