Hi Juan,
To integrate with some JTA manager you need to implement
org.apache.ignite.cache.jta.CacheTmLookup. The interface returns an
instance of a particular TransactionManager to use.
Ignite has two implementation of this interface out of the box -
CacheJndiTmLookup and CacheReflectionTmLookup.
So, if you can get a reference to the required TransactionManager with
JNDI you can extend CacheJndiTmLookup, make a call to setJndiNames from
a constructor of your extended version and finally initialize your class
with the following configuration
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="transactionConfiguration">
<bean
class="org.apache.ignite.configuration.TransactionConfiguration">
<property name="txManagerLookupClassName"
value="my.package.MyCacheTmLookup"/>
</bean>
</property>
</bean>
When TransactionConfiguration is ready to be used with your
TransactionManager you can refer to this page to see how to make an
Ignite transaction a part of JTA transaction:
https://apacheignite.readme.io/docs/transactions#integration-with-jta
Regards,
Denis
On 10/29/2015 12:45 AM, juanavelez wrote:
So perusing the code it seems that detection of JTA is automatic
(CacheJtaManager) but this one relies on TM lookup classes. There is one
implementation that comes with Ignite (CacheJndiTmLookup) but I don't seem
to understand how to set the jndiNames property. Since the CacheJtaManager
creates an instance using the default constructor (via Class.newInstance)
and then the newly created instance is "injected" by the
GridResourceProcessor but only if the implementation class includes
annotations that are understood by a series of "injectors". Since the
CacheJndiTmLookup class has no annotations, how is it possible to set
jndiNames property?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Container-Managed-Transactions-CMT-and-Ignite-tp1748p1751.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.