ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Shutak <ashu...@gridgain.com>
Subject IGNITE-1864 API
Date Tue, 01 Dec 2015 14:14:55 GMT
Folks (especially Valentin),

I want to fix https://issues.apache.org/jira/browse/IGNITE-1864 (Cannot
configure jndiNames for CacheJndiTmLookup).

I was going to fix it as Val suggested in comments

I think we should deprecate CacheTmLookup interface with its
> implementations and txManagerLookupClassName configuration property. We can
> use JCache factory instead:
>


TransactionConfiguration.setTxManagerFactory(Factory<TransactionManager>
> factory)


I like the idea with Facroty, but I faced with the following API issue. The
problem is that TransactionConfiguration in core-module, TransactionManager
is a part of jta, but core-module doesn't have jta as a dependency. As a
result the suggested API cannot be compiled.

I see the following possible solutions (to stay in bounds of solution with
Factory):
1. Remove TransactionManager compile time checking from Factory:

TransactionConfiguration.setTxManagerFactory(Factory factory)

2. Use the same approach as we already have with CacheTmLookup:

TransactionConfiguration.setTxManagerFactoryClassName(String
txFactoryClsName)

and create

interface TransactionManagerFactory extends Factory<TransactionManager>

In this way a user gets compile time checking.

3. Add jta dependency into core-module. But I think it's not an option as
long as core module doesn't have any dependencies (except jcache).

I'd like the first option.


Thanks,
-- Artem --

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message