Skip to content

Instantly share code, notes, and snippets.

@bibryam
Created July 27, 2013 09:28
Show Gist options
  • Select an option

  • Save bibryam/6094382 to your computer and use it in GitHub Desktop.

Select an option

Save bibryam/6094382 to your computer and use it in GitHub Desktop.
Infinispan JTA
public BasicCacheContainer basicCacheContainer() throws Throwable {
GlobalConfiguration glob = new GlobalConfigurationBuilder().nonClusteredDefault().build();
Configuration loc = new ConfigurationBuilder()
.transaction().transactionMode(TransactionMode.TRANSACTIONAL)
.transactionManagerLookup(new TransactionManagerLookup() {
@Override
public TransactionManager getTransactionManager() throws Exception {
return jtaTransactionManager.getTransactionManager();
}
}).build();
return new DefaultCacheManager(glob, loc, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment