You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2017/03/24 23:07:42 UTC
[jira] [Created] (ARTEMIS-1070) provide some transaction manager
locator OOTB
Romain Manni-Bucau created ARTEMIS-1070:
-------------------------------------------
Summary: provide some transaction manager locator OOTB
Key: ARTEMIS-1070
URL: https://issues.apache.org/jira/browse/ARTEMIS-1070
Project: ActiveMQ Artemis
Issue Type: Improvement
Affects Versions: 2.0.0
Reporter: Romain Manni-Bucau
If you want to use a tx mgr with artemis you need to write a locator for it. Would be great to support it OOTB for well known server.
For openejb it looks like
{code}
import org.apache.activemq.artemis.service.extensions.transactions.TransactionManagerLocator;
import org.apache.openejb.OpenEJB;
import javax.transaction.TransactionManager;
public class OpenEJBTransactionManagerLocator implements TransactionManagerLocator {
@Override
public TransactionManager getTransactionManager() {
return OpenEJB.getTransactionManager();
}
}
{code}
But it is also accessible through JNDI which would fit ost of servers.
OpenJPA has a good class to lookup the transaction manager (see https://github.com/apache/openjpa/blob/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java#L55) maybe it can be used as a starting point to get impl automatic and just a flag to activate the tx mgr usage or not.
wdyt?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)