code: public DataSource getDataSource(String dataSourceName) throws
        ServiceLocatorException {
      DataSource dataSource = null;
      try {
        if (cache.containsKey(dataSourceName)) {
          dataSource = (DataSource) cache.get(dataSourceName);
        } else {
          dataSource = (DataSource) ic.lookup(dataSourceName);
          cache.put(dataSourceName, dataSource);
        }
      } catch (NamingException ne) {
        throw new ServiceLocatorException(ne);
      } catch (Exception e) {
        throw new ServiceLocatorException(e);
      }
      return dataSource;
    }
docs: This method obtains the datasource itself for a caller
  @return the DataSource corresponding to the name parameter