@@ -30,6 +30,7 @@ public class OracleServerConfiguration {
30
30
private final boolean autonomous ;
31
31
private final boolean extended ;
32
32
private final boolean applicationContinuity ;
33
+ private final int defaultFetchSize ;
33
34
private final int driverMajorVersion ;
34
35
private final int driverMinorVersion ;
35
36
@@ -53,27 +54,33 @@ public int getDriverMinorVersion() {
53
54
return driverMinorVersion ;
54
55
}
55
56
57
+ public int getDefaultFetchSize () {
58
+ return defaultFetchSize ;
59
+ }
60
+
56
61
public OracleServerConfiguration (boolean autonomous , boolean extended ) {
57
- this ( autonomous , extended , false , 19 , 0 );
62
+ this ( autonomous , extended , false , - 1 , 19 , 0 );
58
63
}
59
64
60
65
public OracleServerConfiguration (
61
66
boolean autonomous ,
62
67
boolean extended ,
63
68
int driverMajorVersion ,
64
69
int driverMinorVersion ) {
65
- this (autonomous , extended , false , driverMajorVersion , driverMinorVersion );
70
+ this (autonomous , extended , false , - 1 , driverMajorVersion , driverMinorVersion );
66
71
}
67
72
68
73
public OracleServerConfiguration (
69
74
boolean autonomous ,
70
75
boolean extended ,
71
76
boolean applicationContinuity ,
77
+ int defaultFetchSize ,
72
78
int driverMajorVersion ,
73
79
int driverMinorVersion ) {
74
80
this .autonomous = autonomous ;
75
81
this .extended = extended ;
76
82
this .applicationContinuity = applicationContinuity ;
83
+ this .defaultFetchSize = defaultFetchSize ;
77
84
this .driverMajorVersion = driverMajorVersion ;
78
85
this .driverMinorVersion = driverMinorVersion ;
79
86
}
@@ -82,6 +89,7 @@ public static OracleServerConfiguration fromDialectResolutionInfo(DialectResolut
82
89
Boolean extended = null ;
83
90
Boolean autonomous = null ;
84
91
Boolean applicationContinuity = null ;
92
+ int defaultFetchSize = -1 ;
85
93
Integer majorVersion = null ;
86
94
Integer minorVersion = null ;
87
95
final DatabaseMetaData databaseMetaData = info .getDatabaseMetadata ();
@@ -95,6 +103,8 @@ public static OracleServerConfiguration fromDialectResolutionInfo(DialectResolut
95
103
96
104
try (final Statement statement = c .createStatement ()) {
97
105
106
+ defaultFetchSize = statement .getFetchSize ();
107
+
98
108
// Use Oracle JDBC replay statistics information to determine if this
99
109
// connection is protected by Application Continuity
100
110
try {
@@ -185,7 +195,8 @@ public static OracleServerConfiguration fromDialectResolutionInfo(DialectResolut
185
195
}
186
196
187
197
}
188
- return new OracleServerConfiguration ( autonomous , extended , applicationContinuity , majorVersion , minorVersion );
198
+ return new OracleServerConfiguration ( autonomous , extended , applicationContinuity , defaultFetchSize ,
199
+ majorVersion , minorVersion );
189
200
}
190
201
191
202
private static boolean isAutonomous (String cloudServiceParam ) {
0 commit comments