ManagedPoolItem poolItem = _poolItems.get(i);
poolItem.enableLocalTransactionOptimization(_poolItems.size() == 1);
try {
xa.enlistResource(poolItem);
} catch (Exception e) {
String message = L.l("Failed to begin UserTransaction due to: {0}", e);
log.log(Level.SEVERE, message, e);
throw new SystemException(message);