Hi! It works for me on Oracle.
in persistence.xml: <persistence-unit name="org.drools.persistence.jpa"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/processInstanceDS</jta-data-source> <class>org.drools.persistence.info.SessionInfo</class> <class>org.drools.persistence.info.WorkItemInfo</class> <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class> <class>org.jbpm.process.audit.ProcessInstanceLog</class> <class>org.jbpm.process.audit.NodeInstanceLog</class> <class>org.jbpm.process.audit.VariableInstanceLog</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" /> <property name="hibernate.max_fetch_depth" value="3" /> <property name="hibernate.hbm2ddl.auto" value="update" /> <property name="hibernate.show_sql" value="false" /> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" /> </properties> </persistence-unit> orm.xml <?xml version="1.0" encoding="UTF-8"?> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd" version="1.0"> <named-query name="ProcessInstancesWaitingForEvent"> <query> select processInstanceInfo.processInstanceId from ProcessInstanceInfo processInstanceInfo where :type in elements(processInstanceInfo.eventTypes) </query> </named-query> </entity-mappings> Code: PoolingDataSource ds = new PoolingDataSource(); ds.setUniqueName("jdbc/processInstanceDS"); ds.setMaxPoolSize(3); ds.setAllowLocalTransactions(true); ds.setClassName("oracle.jdbc.xa.client.OracleXADataSource"); ds.getDriverProperties().put("user", "drools"); ds.getDriverProperties().put("password", "drools"); ds.getDriverProperties().put("URL", "jdbc:oracle:thin:@localhost:1521:ewi300"); ds.init(); System.out.println("create EMF"); EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.persistence.jpa"); BitronixTransactionManager transactionManager = TransactionManagerServices.getTransactionManager(); System.out.println("create ENV"); Environment env = KnowledgeBaseFactory.newEnvironment(); env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf); env.set(EnvironmentName.TRANSACTION_MANAGER, transactionManager); env.set(EnvironmentName.GLOBALS, new MapGlobalResolver()); UserTransaction ut = transactionManager; ... juergen -- View this message in context: http://drools.46999.n3.nabble.com/Drools-flow-persistence-with-Oracle-Could-not-obtain-BTM-transaction-manager-instance-tp2927178p2927282.html Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users