-
1. Re: NPE caused by Bitronix transaction glitch or drools transaction issue?
zhangjing2000 Aug 4, 2011 6:25 PM (in response to zhangjing2000)Looks like it is related to bitronix transaction. during Environment initiation, if I comment out the transaction manager setting statement as below, there will be no NPE. But I not sure if there is transaction control anymore.
EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.drools.persistence.jpa" );
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
//env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());
-
2. Re: NPE caused by Bitronix transaction glitch or drools transaction issue?
marco.rietveld Aug 16, 2011 5:13 AM (in response to zhangjing2000)This might be a really stupid idea, but I'm wondering if this isn't an issue with the H2 database -- considering that's it's an in-memory database and not fully 2 phase compliant (I think?).
If you wouldn't mind posting your code, I would actually like to look at this as well! I'm very interested in how transactions/persistence works in jBPM 5.
Thanks!
Marco
-
3. Re: NPE caused by Bitronix transaction glitch or drools transaction issue?
zhangjing2000 Aug 16, 2011 7:33 PM (in response to marco.rietveld)here is my test code. Thanks for checking
-
JPATest.java.zip 2.1 KB
-
JPATest.bpmn.zip 747 bytes
-