Package org.springframework.jdbc.datasource.lookup

Examples of org.springframework.jdbc.datasource.lookup.BeanFactoryDataSourceLookup


      targetDataSources.put("ISOLATION_REPEATABLE_READ", "ds2");
      dsToUse.setDefaultTargetDataSource("ds1");
      StaticListableBeanFactory beanFactory = new StaticListableBeanFactory();
      beanFactory.addBean("ds1", ds1);
      beanFactory.addBean("ds2", ds2);
      dsToUse.setDataSourceLookup(new BeanFactoryDataSourceLookup(beanFactory));
    }
    else {
      targetDataSources.put("ISOLATION_REPEATABLE_READ", ds2);
      dsToUse.setDefaultTargetDataSource(ds1);
    }
View Full Code Here


      targetDataSources.put("ISOLATION_REPEATABLE_READ", "ds2");
      dsToUse.setDefaultTargetDataSource("ds1");
      StaticListableBeanFactory beanFactory = new StaticListableBeanFactory();
      beanFactory.addBean("ds1", dataSource1);
      beanFactory.addBean("ds2", dataSource2);
      dsToUse.setDataSourceLookup(new BeanFactoryDataSourceLookup(beanFactory));
    }
    else {
      targetDataSources.put("ISOLATION_REPEATABLE_READ", dataSource2);
      dsToUse.setDefaultTargetDataSource(dataSource1);
    }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.datasource.lookup.BeanFactoryDataSourceLookup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.