if (!isTransaction) conn.close();
cp = ConnectionProviderFactory.newConnectionProvider();
DummyTransactionManager dtm = DummyTransactionManager.INSTANCE; if ( dtm!=null && dtm.getCurrent()!=null && dtm.getCurrent().getConnection()!=null ) { isTransaction = true; return dtm.getCurrent().getConnection(); } else { isTransaction = false; return cp.getConnection(); }
return true;