I am using OpenJPA and want to configure it to use Autocommit with every write / insert operation.
At the moment, I have to do this:
MyEntity e = new MyEntity(); em.getTransaction().begin(); em.persist(e); em.getTransaction().commit();
What I want to do is:
MyEntity e = new MyEntity(); em.persist(e);
I have this property set to true:
openjpa.NontransactionalWrite : true
Any clues ?!
source share