JBoss Community

Re: How to fix: "The chosen transaction strategy requires access to the JTA TransactionManager" issue?

created by Demian Calcaprina in jBPM - View the full discussion

You provide the transaction manager when creating the session. Something like:

Environment env = KnowledgeBaseFactory.newEnvironment();

                    env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);

                    env.set(EnvironmentName.TRANSACTION_MANAGER,

                                        TransactionManagerServices.getTransactionManager());

                    final StatefulKnowledgeSession session = JPAKnowledgeService

                                        .newStatefulKnowledgeSession(kbase, null, env);

 

Regards,

 

Demian

Reply to this message by going to Community

Start a new discussion in jBPM at Community