File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
ddal-ddr/src/main/java/org/hellojavaer/ddal/ddr/cluster Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 2323 */
2424public interface DBClusterManager extends DataSource {
2525
26- DataSource getDataSource ();
27-
26+ DataSource determineDataSource ();
2827
2928}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public class DefaultDBClusterManager implements DBClusterManager {
3333 private Map <String , DataSource > dataSources ;
3434
3535 @ Override
36- public DataSource getDataSource () {
36+ public DataSource determineDataSource () {
3737 String clusterName = DBClusterRouteContext .getClusterName ();
3838 DataSource dataSource = dataSources .get (clusterName );
3939 if (dataSource == null ) {
@@ -92,11 +92,11 @@ public Logger getParentLogger() {
9292
9393 @ Override
9494 public Connection getConnection () throws SQLException {
95- return getDataSource ().getConnection ();
95+ return determineDataSource ().getConnection ();
9696 }
9797
9898 @ Override
9999 public Connection getConnection (String username , String password ) throws SQLException {
100- return getDataSource ().getConnection (username , password );
100+ return determineDataSource ().getConnection (username , password );
101101 }
102102}
You can’t perform that action at this time.
0 commit comments