[infinispan-issues] [JBoss JIRA] (ISPN-9397) Check TX support for remote caches

Pedro Ruivo (JIRA) issues at jboss.org
Tue Jul 24 09:45:00 EDT 2018


Pedro Ruivo created ISPN-9397:
---------------------------------

             Summary: 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
             Fix For: 9.4.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}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the infinispan-issues mailing list