private Connection getConnectionByName(String aDbName) throws DAOException {
    Connection result = null;
    String dbConnString = getConnectionString(aDbName);  
    if( ! Util.textHasContent(dbConnString) ){
      throw new IllegalArgumentException("Unknown database name : " + Util.quote(aDbName));      
    }
    try {
      Context initialContext = new InitialContext();
      if ( initialContext == null ) {
        fLogger.severe("DataSource problem. InitialContext is null. Db : " + Util.quote(dbConnString));
      }
      DataSource datasource = (DataSource)initialContext.lookup(dbConnString);
      if ( datasource == null ){
        fLogger.severe("Datasource is null for : " + dbConnString);
      }
      result = datasource.getConnection();
    }
    catch (NamingException ex){
      throw new DAOException("Config error with JNDI and datasource, for db " + Util.quote(dbConnString), ex);
    }
    catch (SQLException ex ){
      throw new DAOException("Cannot get JNDI connection from datasource, for db " + Util.quote(dbConnString), ex);
    }
    return result;
  }