private Connection openDbConnection() throws Exception {
  if (ctx == null) {
    ctx=new InitialContext();
  }
  if (dataSource == null) {
    dataSource=(DataSource)ctx.lookup(dataSourceName);
  }
  return dataSource.getConnection();
}

private Connection openDbConnection ( ) throws Exception { if ( ctx == null ) { ctx = new InitialContext ( ) ; } if ( dataSource == null ) { dataSource = ( DataSource ) ctx . lookup ( dataSourceName ) ; } return dataSource . getConnection ( ) ; }
gets connection to the datasource specified through the configuration parameters .
