Transaction txn = Transaction.currentTxn();
try {
txn.start();
String sql = UPDATE_USER_STATS;
PreparedStatement pstmt = null;
pstmt = txn.prepareAutoCloseStatement(sql); // in reality I just want CLOUD_USAGE dataSource connection
for (UserStatisticsVO userStat : userStats) {
pstmt.setLong(1, userStat.getNetBytesReceived());
pstmt.setLong(2, userStat.getNetBytesSent());
pstmt.setLong(3, userStat.getCurrentBytesReceived());
pstmt.setLong(4, userStat.getCurrentBytesSent());