Class AweRoutingDataSource

  • All Implemented Interfaces:
    Wrapper, CommonDataSource, DataSource, org.springframework.beans.factory.InitializingBean

    public class AweRoutingDataSource
    extends org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
    Routing datasource
    Author:
    pgarcia
    • Constructor Detail

      • AweRoutingDataSource

        public AweRoutingDataSource​(AweDatabaseContextHolder contextHolder)
        Autowired constructor
        Parameters:
        contextHolder - Awe Database Context holder
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
      • loadDataSources

        public void loadDataSources()
        Load datasources from current connection
      • reloadDataSources

        public void reloadDataSources()
        Load datasources from current connection
      • determineCurrentLookupKey

        protected Object determineCurrentLookupKey()
        Get lookup key
        Specified by:
        determineCurrentLookupKey in class org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
        Returns:
        Current database