code: @Deprecated
      public static DataSource getDataSource(String name) {
          if (PORTAL_DB.equals(name)) {
              return PortalDbLocator.getPortalDb();
          }
  
          final ApplicationContext applicationContext =
                  PortalApplicationContextLocator.getApplicationContext();
          final DataSource dataSource =
                  (DataSource) applicationContext.getBean(name, DataSource.class);
          return dataSource;
      }
docs: Gets a named DataSource from JNDI, with special handling for the PORTAL_DB datasource.
  Successful lookups are cached and not done again. Lookup failure is remembered and blocks
  retry for a number of milliseconds specified by JNDI_RETRY_TIME to reduce JNDI overhead and
  log spam.
  
  <p>There are two ways in which we handle the core uPortal DataSource specially.
  
  <p>We determine and remember metadata in an DbMetaData object for the core uPortal
  DataSource. We do not compute this DbMetaData for any other DataSource.
  
  <p>We fall back on using rdbm.properties to construct our core uPortal DataSource in the case
  where we cannot find it from JNDI. If the portal property
  org.apereo.portal.jdbc.RDBMServices.getDatasourceFromJNDI is true, we first first try to get
  the connection by looking in the JNDI context for the name defined by the portal property
  org.apereo.portal.jdbc.RDBMServices.PortalDatasourceJndiName .
  
  <p>If we were not configured to check JNDI or we didn't find it in JNDI having checked, we
  then fall back on rdbm.properties.
  
  @param name The name of the DataSource to get.
  @return A named DataSource or <code>null</code> if one cannot be found.
  @deprecated Where possible code should be injected with a {@link DataSource} object via the
  Spring application context