Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Currently, Geode looks up the following JNDI names for transaction manager:
From JNDIInvoker
private static String[][] knownJNDIManagers = {{"java:/TransactionManager", "JBoss"}, {"java:comp/TransactionManager", "Cosminexus"}, // and many others {"java:appserver/TransactionManager", "GlassFish"}, {"java:pm/TransactionManager", "SunONE"}, {"java:comp/UserTransaction", "Orion, JTOM, BEA WebLogic"}, // not sure about the following but leaving it for backwards compat {"javax.transaction.TransactionManager", "BEA WebLogic"}};
We should provide a System property for the JNDI name so that the workflow is something like:
// get the system property value configured by administrator String utxPropVal = System.getProperty(“jta.UserTransaction”); // use JNDI to locate the UserTransaction object Context ctx = new InitialContext(); UserTransaction utx = (UserTransaction)ctx.lookup(utxPropVal); // start transaction work.. utx.begin();
We should also add java:comp/env/TransactionManager to the list of known TransactionManagers as it is used by Atomikos.