Skip to content

Commit fa106dc

Browse files
committed
Properly implement CachedResultSet and modified the serialization logic to rely on standard Java object serialization instead of custom JacksonMapper logic. Namely removed custom serialization logic for several special data types that are returned by the underlying SQL driver.
Handle conversion from Number for getBigDecimal() and added unit tests for it.
1 parent 6fe29b3 commit fa106dc

File tree

9 files changed

+750
-725
lines changed

9 files changed

+750
-725
lines changed

examples/AWSDriverExample/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ dependencies {
2222
implementation("software.amazon.awssdk:secretsmanager:2.33.5")
2323
implementation("software.amazon.awssdk:sts:2.33.5")
2424
implementation("com.fasterxml.jackson.core:jackson-databind:2.19.0")
25-
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.0")
2625
implementation(project(":aws-advanced-jdbc-wrapper"))
2726
implementation("io.opentelemetry:opentelemetry-api:1.52.0")
2827
implementation("io.opentelemetry:opentelemetry-sdk:1.51.0")

examples/AWSDriverExample/src/main/java/software/amazon/DatabaseConnectionWithCacheExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void main(String[] args) throws SQLException {
3232
properties.setProperty("cacheEndpointAddrRo", CACHE_RO_SERVER_ADDR);
3333
properties.setProperty("cacheUseSSL", USE_SSL); // "true" or "false"
3434
properties.setProperty("wrapperLogUnclosedConnections", "true");
35-
String queryStr = "/* cacheTTL=300s */ select * from cinemas";
35+
String queryStr = "/*+ CACHE_PARAM(ttl=300s) */ select * from cinemas";
3636

3737
// Create threads for concurrent connection testing
3838
Thread[] threads = new Thread[THREAD_COUNT];

wrapper/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ dependencies {
5050
optionalImplementation("io.opentelemetry:opentelemetry-sdk:1.52.0")
5151
optionalImplementation("io.opentelemetry:opentelemetry-sdk-metrics:1.52.0")
5252

53-
compileOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.0")
5453
compileOnly("io.lettuce:lettuce-core:6.6.0.RELEASE")
5554
compileOnly("org.apache.commons:commons-pool2:2.11.1")
5655
compileOnly("org.checkerframework:checker-qual:3.49.5")
@@ -100,7 +99,6 @@ dependencies {
10099
testImplementation("org.apache.poi:poi-ooxml:5.4.1")
101100
testImplementation("org.slf4j:slf4j-simple:2.0.17")
102101
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.19.0")
103-
testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.0")
104102
testImplementation("com.amazonaws:aws-xray-recorder-sdk-core:2.18.2")
105103
testImplementation("io.lettuce:lettuce-core:6.6.0.RELEASE")
106104
testImplementation("io.opentelemetry:opentelemetry-api:1.52.0")
@@ -112,7 +110,6 @@ dependencies {
112110
testImplementation("de.vandermeer:asciitable:0.3.2")
113111
testImplementation("org.hibernate:hibernate-core:5.6.15.Final") // the latest version compatible with Java 8
114112
testImplementation("jakarta.persistence:jakarta.persistence-api:2.2.3")
115-
testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.2")
116113
}
117114

118115
repositories {

0 commit comments

Comments
 (0)