@ 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 ; }
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 .