[infinispan-issues] [JBoss JIRA] (ISPN-9397) Check TX support for remote caches
Tristan Tarrant (Jira)
issues at jboss.org
Thu Dec 13 04:59:04 EST 2018
[ https://issues.jboss.org/browse/ISPN-9397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tristan Tarrant updated ISPN-9397:
----------------------------------
Sprint: Sprint 10.0.0.Alpha1, Sprint 10.0.0.Alpha2, Sprint 10.0.0.Beta1 (was: Sprint 10.0.0.Alpha1, Sprint 10.0.0.Alpha2)
> Check TX support for remote caches
> ----------------------------------
>
> Key: ISPN-9397
> URL: https://issues.jboss.org/browse/ISPN-9397
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod, Remote Protocols, Transactions
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Priority: Major
> Fix For: 10.0.0.Beta1
>
>
> The {{RemoteCacheManager.getCache()}} methods would fail to return a transactional cache if the cache in server isn't transactional. It would throw an exception! {{NotTransactionalException}}?
> The user can fallback to the non transaction case, example
> {code:java}
> try {
> cache = remoteCacheManager.getCache("some-cache", TransactionMode.NON_XA);
> } catch(NotTransactionalException e) {
> cache = remoteCacheManager.getCache("some-cache", TransactionMode.NONE);
> }
> {code}
> In addition, some helper method can be added to the {{RemoteCacheManager}} to avoid dealing with exceptions:
> {code:java}
> boolean supportsTransactions(String cacheName);
> {code}
> simple example:
> {code:java}
> boolean txCache = remoteCacheManager.supportsTransactions("some-cache");
> remoteCacheManager.getCache("some-cache", txCache ? TransactionMode.NON_XA : TransactionMode.NONE);
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list