Matthieu-
Does your TxMgrProvider provide a correctly functioning
TransactionManager? OpenJPA will register a Synchronization with it,
which should get committed when your global transaction is committed.
Do you see any log messages at all when you commit the global
transaction?
On Jan 15, 2007, at 10:35 AM, Matthieu Riou wrote:
Hi,
I now have a working setup (at least something that starts) using a
programmaticaly provided datasource and transaction manager. Here
is the
code now:
HashMap propMap = new HashMap();
propMap.put("openjpa.jdbc.DBDictionary", "
org.apache.openjpa.jdbc.sql.DerbyDictionary");
propMap.put("openjpa.ManagedRuntime", new TxMgrProvider());
propMap.put("openjpa.ConnectionFactory", _datasource);
propMap.put("openjpa.Log", "DefaultLevel=TRACE");
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("ode-dao",
propMap);
HashMap propMap2 = new HashMap();
propMap2.put("openjpa.TransactionMode", "managed");
EntityManager em = emf.createEntityManager(propMap2);
_daoCF = new BPELDAOConnectionFactoryImpl(em);
I've tried both with and without the propMap2, in both cases I
never get
OpenJPA to commit (and therefore no insert/update/delete) when I
commit the
transaction.
Any idea of what could be wrong?
Thanks!
Matthieu