File tree Expand file tree Collapse file tree 4 files changed +9
-0
lines changed
ebean-api/src/main/java/io/ebean
ebean-core/src/main/java/io/ebeaninternal/server Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ static DatabaseBuilder builder() {
137137 /**
138138 * Return the associated read only DataSource for this Database instance (can be null).
139139 */
140+ @ Nullable
140141 DataSource readOnlyDataSource ();
141142
142143 /**
Original file line number Diff line number Diff line change @@ -278,6 +278,7 @@ public DataSource dataSource() {
278278 }
279279
280280 @ Override
281+ @ Nullable
281282 public DataSource readOnlyDataSource () {
282283 return transactionManager .readOnlyDataSource ();
283284 }
Original file line number Diff line number Diff line change 11package io .ebeaninternal .server .transaction ;
22
3+ import org .jspecify .annotations .Nullable ;
4+
35import javax .sql .DataSource ;
46import java .sql .Connection ;
57import java .sql .SQLException ;
@@ -25,6 +27,7 @@ public interface DataSourceSupplier {
2527 * This can return null meaning that no read only DataSource (with autoCommit)
2628 * is available for use so normal transactions with explicit commit should be used.
2729 */
30+ @ Nullable
2831 DataSource readOnlyDataSource ();
2932
3033 /**
Original file line number Diff line number Diff line change 1010import io .ebean .cache .ServerCacheNotify ;
1111import io .ebean .config .CurrentTenantProvider ;
1212import io .ebean .config .dbplatform .DatabasePlatform ;
13+ import io .ebean .datasource .DataSourcePool ;
1314import io .ebean .event .changelog .ChangeLogListener ;
1415import io .ebean .event .changelog .ChangeLogPrepare ;
1516import io .ebean .event .changelog .ChangeSet ;
3031import io .ebeanservice .docstore .api .DocStoreUpdates ;
3132
3233import jakarta .persistence .PersistenceException ;
34+ import org .jspecify .annotations .Nullable ;
35+
3336import javax .sql .DataSource ;
3437import java .sql .Connection ;
3538import java .sql .SQLException ;
@@ -257,6 +260,7 @@ public final DataSource dataSource() {
257260 }
258261
259262 @ Override
263+ @ Nullable
260264 public final DataSource readOnlyDataSource () {
261265 return dataSourceSupplier .readOnlyDataSource ();
262266 }
You can’t perform that action at this time.
0 commit comments