We are migrating an application from Weblogic to Websphere application server, this application is build over an old version of Apache OFBIZ and we are having trouble to acquire an TransactionManager to bind to OFBIZ.
Our attempt at the moment is the following:
org.springframework.transaction.jta.WebSphereUowTransactionManager manager = new org.springframework.transaction.jta.WebSphereUowTransactionManager(com.ibm.wsspi.uow.UOWManagerFactory.getUOWManager());
transactionManager = (TransactionManager)manager.getTransactionManager();
We also tried looking up the JNDIs: "java:comp/TransactionManager", "java:appserver/TransactionManager", "java:pm/TransactionManager", "java:/TransactionManager"
None of them returned a TransactionManager.
In Weblogic the lookup worked and the weblogic implementation of TransactionManager also implements the UserTransaction.
In Websphere we can lookup UserTransaction alright but not TransactionManager.
Any ideas ?
The following WebSphere Application Server API (available in both Liberty and traditional) can be used to obtain the transaction manager:
com.ibm.tx.jta.TransactionManagerFactory.getTransactionManager()