CachedConnectionManager ccm = new CachedConnectionManager();
CachedConnectionManagerReference ccmr = new CachedConnectionManagerReference();
ccmr.setCachedConnectionManager(ccm);
ccmr.setTransactionManager(transactionManager);
ds = new LocalTxDataSource();
ds.setConnectionURL(connectionUrl);
ds.setDriverClass(driverClass);
ds.setUserName(userName);
ds.setPassword(password);
ds.setPreparedStatementCacheSize(preparedStatementCacheSize);