mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-13 06:42:57 +00:00
#2085 - Refactor promote getDataSource() and getReadOnlyDataSource() to Database from plugin.SpiServer interface
This commit is contained in:
1 parent
4a594b32ef
commit
0abcc9e06e
11 files changed
+30
-18
No files matched your search
@@ -15,7 +15,7 @@ public class Main {
|
||||
|
||||
|
||||
EbeanServer ms = Ebean.getServer("ms");
|
||||
DataSource dataSource = ms.getPluginApi().getDataSource();
|
||||
DataSource dataSource = ms.getDataSource();
|
||||
|
||||
Connection connection = dataSource.getConnection();
|
||||
PreparedStatement statement = connection.prepareStatement("select next VALUE for j2_seq");
|
||||
|
||||
@@ -24,7 +24,7 @@ public class TestQueryUsingConnection extends BaseTestCase {
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
DataSource dataSource = DB.getDefault().getPluginApi().getDataSource();
|
||||
DataSource dataSource = DB.getDefault().getDataSource();
|
||||
|
||||
try (Connection connection = dataSource.getConnection()) {
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ public class TestQueryFindIterate extends BaseTestCase {
|
||||
SpiServer pluginApi = server().getPluginApi();
|
||||
DataSourcePool dsPool = (DataSourcePool) pluginApi.getServerConfig().getReadOnlyDataSource();
|
||||
if (dsPool == null) {
|
||||
dsPool = (DataSourcePool) server().getPluginApi().getDataSource();
|
||||
dsPool = (DataSourcePool) server().getDataSource();
|
||||
}
|
||||
|
||||
int startConns = dsPool.getStatus(false).getBusy();
|
||||
|
||||
Reference in new issue
Block a user