Swapnil Bawaskar created GEODE-2302:
---------------------------------------
Summary: Need ability to plug-in JNDI name of JTATransactionManager
Key: GEODE-2302
URL: https://issues.apache.org/jira/browse/GEODE-2302
Project: Geode
Issue Type: Sub-task
Components: transactions
Reporter: Swapnil Bawaskar
Currently, Geode looks up the following JNDI names for transaction manager:
>From
>[JNDIInvoker|https://github.com/apache/geode/blob/8bf39571471642beaaa36c9626a61a90bd3803c2/geode-core/src/main/java/org/apache/geode/internal/jndi/JNDIInvoker.java#L72]
{noformat}
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"}};
{noformat}
We should provide a System property for the JNDI name so that the workflow is
something like:
{noformat}
// 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();
{noformat}
We should also add {{java:comp/env/TransactionManager}} to the list of known
TransactionManagers as it is used by Atomikos.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)