InitialContext ic = new InitialContext();
final DataSource dataSource =
//V3 Commented (DataSource)ConnectorRuntime.getRuntime().lookupNonTxResource(dsJndi,false);
//replacement code suggested by jagadish
(DataSource)ic.lookup(nonTxJndiName);*/
ConnectorRuntime connectorRuntime = Util.getDefaultHabitat().getServiceHandle(cr).getService();
final DataSource dataSource =
(DataSource) connectorRuntime.lookupNonTxResource(dsJndi,false);
//(DataSource)ConnectorRuntime.getRuntime().lookupNonTxResource(dsJndi,false);
Connection connection = null;
if (dbUser != null && dbPassword != null) {
connection = dataSource.getConnection(dbUser, dbPassword);
} else {