//experimental thread local caching
if (isUseThreadCaching()) {
//useMatching should be configurable
stack = new ThreadLocalCachingConnectionInterceptor(stack, false);
}
stack = new TransactionEnlistingInterceptor(stack, transactionContextManager);
if (isUseTransactionCaching()) {
stack = new TransactionCachingInterceptor(stack, transactionContextManager);
}
return stack;
}