From 29f3b08a401ca25a94d71f34624ac23d053efe86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 00:14:23 +0000 Subject: [PATCH 1/2] Bump spring.version from 6.0.11 to 6.1.2 Bumps `spring.version` from 6.0.11 to 6.1.2. Updates `org.springframework:spring-tx` from 6.0.11 to 6.1.2 - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.11...v6.1.2) Updates `org.springframework:spring-jdbc` from 6.0.11 to 6.1.2 - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.11...v6.1.2) Updates `org.springframework:spring-context` from 6.0.11 to 6.1.2 - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.11...v6.1.2) --- updated-dependencies: - dependency-name: org.springframework:spring-tx dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.springframework:spring-jdbc dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.springframework:spring-context dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- transactionoutbox-spring/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transactionoutbox-spring/pom.xml b/transactionoutbox-spring/pom.xml index 71bb9912..a1cdfd1a 100644 --- a/transactionoutbox-spring/pom.xml +++ b/transactionoutbox-spring/pom.xml @@ -14,7 +14,7 @@ 17 17 3.1.4 - 6.0.11 + 6.1.2 From af1220ed2a2fe43b15fda0cba5971308869b6825 Mon Sep 17 00:00:00 2001 From: Graham Crockford Date: Fri, 22 Dec 2023 17:23:53 +0000 Subject: [PATCH 2/2] Fix a bunch of classpath issues --- pom.xml | 8 +-- transactionoutbox-acceptance/pom.xml | 39 ++---------- transactionoutbox-jackson/pom.xml | 59 ++++++++----------- .../acceptance/TestJacksonSerializer.java | 50 ++++++++-------- transactionoutbox-jooq/pom.xml | 35 ++--------- transactionoutbox-spring/pom.xml | 8 ++- transactionoutbox-testing/pom.xml | 8 ++- .../testing/AbstractAcceptanceTest.java | 6 +- 8 files changed, 83 insertions(+), 130 deletions(-) diff --git a/pom.xml b/pom.xml index d80dd9e6..9f0e85e4 100644 --- a/pom.xml +++ b/pom.xml @@ -48,12 +48,12 @@ org.slf4j slf4j-api - 2.0.7 + 2.0.9 net.bytebuddy byte-buddy - 1.14.10 + 1.14.11 true @@ -160,7 +160,7 @@ mysql mysql-connector-java - 8.0.30 + 8.0.33 test @@ -196,7 +196,7 @@ maven-surefire-plugin 3.2.3 - -Doracle.jdbc.javaNetNio=false + -Doracle.jdbc.javaNetNio=false -XX:+EnableDynamicAgentLoading diff --git a/transactionoutbox-acceptance/pom.xml b/transactionoutbox-acceptance/pom.xml index b8d5fedb..64570f7c 100644 --- a/transactionoutbox-acceptance/pom.xml +++ b/transactionoutbox-acceptance/pom.xml @@ -1,5 +1,6 @@ - + transactionoutbox-parent com.gruelbox @@ -17,12 +18,6 @@ ${project.version} test - - com.gruelbox - transactionoutbox-testing - ${project.version} - test - @@ -32,28 +27,10 @@ - org.hamcrest - hamcrest-core - - - org.junit.jupiter - junit-jupiter-engine - - - org.junit.jupiter - junit-jupiter-params - - - org.mockito - mockito-all - - - ch.qos.logback - logback-classic - - - ch.qos.logback - logback-core + com.gruelbox + transactionoutbox-testing + ${project.version} + test org.testcontainers @@ -87,10 +64,6 @@ mysql mysql-connector-java - - com.zaxxer - HikariCP - com.h2database h2 diff --git a/transactionoutbox-jackson/pom.xml b/transactionoutbox-jackson/pom.xml index b1b78d4f..3b384fd6 100644 --- a/transactionoutbox-jackson/pom.xml +++ b/transactionoutbox-jackson/pom.xml @@ -1,5 +1,6 @@ - + transactionoutbox-parent com.gruelbox @@ -9,11 +10,11 @@ Transaction Outbox Jackson jar transactionoutbox-jackson - A safe implementation of the transactional outbox pattern for Java (Jackson extension library) + A safe implementation of the transactional outbox pattern for Java (Jackson extension library) + - 5.2.4.RELEASE 2.16.0 - 3.13.0 + 3.14.0 @@ -22,12 +23,6 @@ transactionoutbox-core ${project.version} - - com.gruelbox - transactionoutbox-testing - ${project.version} - test - com.fasterxml.jackson.core jackson-databind @@ -44,11 +39,31 @@ lombok + + com.gruelbox + transactionoutbox-testing + ${project.version} + test + com.fasterxml.jackson.datatype jackson-datatype-guava ${jackson.version} test + + + + com.google.guava + guava + + + + + + com.google.guava + guava + 33.0.0-jre + test com.fasterxml.jackson.datatype @@ -62,33 +77,9 @@ ${jackson.version} test - - ch.qos.logback - logback-classic - - - ch.qos.logback - logback-core - - - org.hamcrest - hamcrest-core - - - org.junit.jupiter - junit-jupiter-engine - - - org.mockito - mockito-all - com.h2database h2 - - com.zaxxer - HikariCP - diff --git a/transactionoutbox-jackson/src/test/java/com/gruelbox/transactionoutbox/jackson/acceptance/TestJacksonSerializer.java b/transactionoutbox-jackson/src/test/java/com/gruelbox/transactionoutbox/jackson/acceptance/TestJacksonSerializer.java index 2d8b88d9..a8bbcbcd 100644 --- a/transactionoutbox-jackson/src/test/java/com/gruelbox/transactionoutbox/jackson/acceptance/TestJacksonSerializer.java +++ b/transactionoutbox-jackson/src/test/java/com/gruelbox/transactionoutbox/jackson/acceptance/TestJacksonSerializer.java @@ -16,32 +16,40 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @Slf4j class TestJacksonSerializer extends AbstractAcceptanceTest { private final CountDownLatch latch = new CountDownLatch(1); - private TransactionManager transactionManager; - private TransactionOutbox outbox; - @BeforeEach - void beforeEach() { - var mapper = new ObjectMapper(); - mapper.registerModule(new GuavaModule()); - mapper.registerModule(new Jdk8Module()); - mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); - transactionManager = txManager(); - outbox = + @Override + protected Persistor persistor() { + return DefaultPersistor.builder() + .dialect(connectionDetails().dialect()) + .serializer( + JacksonInvocationSerializer.builder() + .mapper( + new ObjectMapper() + .registerModule(new GuavaModule()) + .registerModule(new Jdk8Module()) + .registerModule(new JavaTimeModule()) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true)) + .build()) + .build(); + } + + void process(List difficultDataStructure) { + assertEquals(List.of(LocalDate.of(2000, 1, 1), "a", "b", 2), difficultDataStructure); + } + + @Test + void testPolymorphicDeserialization() throws InterruptedException { + var transactionManager = txManager(); + var outbox = TransactionOutbox.builder() .transactionManager(transactionManager) - .persistor( - DefaultPersistor.builder() - .dialect(Dialect.H2) - .serializer(JacksonInvocationSerializer.builder().mapper(mapper).build()) - .build()) + .persistor(persistor()) .instantiator(Instantiator.using(clazz -> TestJacksonSerializer.this)) .listener( new TransactionOutboxListener() { @@ -51,14 +59,6 @@ public void success(TransactionOutboxEntry entry) { } }) .build(); - } - - void process(List difficultDataStructure) { - assertEquals(List.of(LocalDate.of(2000, 1, 1), "a", "b", 2), difficultDataStructure); - } - - @Test - void testPolymorphicDeserialization() throws InterruptedException { transactionManager.inTransaction( () -> outbox.schedule(getClass()).process(List.of(LocalDate.of(2000, 1, 1), "a", "b", 2))); assertTrue(latch.await(2, TimeUnit.SECONDS)); diff --git a/transactionoutbox-jooq/pom.xml b/transactionoutbox-jooq/pom.xml index 9596c22e..e449c602 100644 --- a/transactionoutbox-jooq/pom.xml +++ b/transactionoutbox-jooq/pom.xml @@ -1,5 +1,6 @@ - + transactionoutbox-parent com.gruelbox @@ -20,12 +21,6 @@ transactionoutbox-core ${project.version} - - com.gruelbox - transactionoutbox-testing - ${project.version} - test - org.jooq jooq @@ -38,33 +33,15 @@ - ch.qos.logback - logback-classic - - - ch.qos.logback - logback-core + com.gruelbox + transactionoutbox-testing + ${project.version} + test com.h2database h2 - - com.zaxxer - HikariCP - - - org.junit.jupiter - junit-jupiter-engine - - - org.mockito - mockito-all - - - org.hamcrest - hamcrest-core - org.testcontainers testcontainers diff --git a/transactionoutbox-spring/pom.xml b/transactionoutbox-spring/pom.xml index a1cdfd1a..7593935c 100644 --- a/transactionoutbox-spring/pom.xml +++ b/transactionoutbox-spring/pom.xml @@ -1,5 +1,6 @@ - + transactionoutbox-parent com.gruelbox @@ -9,11 +10,12 @@ Transaction Outbox Spring jar transactionoutbox-spring - A safe implementation of the transactional outbox pattern for Java (Spring extension library) + A safe implementation of the transactional outbox pattern for Java (Spring extension library) + 17 17 - 3.1.4 + 3.2.1 6.1.2 diff --git a/transactionoutbox-testing/pom.xml b/transactionoutbox-testing/pom.xml index 060b9874..c0857309 100644 --- a/transactionoutbox-testing/pom.xml +++ b/transactionoutbox-testing/pom.xml @@ -1,5 +1,6 @@ - + transactionoutbox-parent com.gruelbox @@ -47,6 +48,11 @@ junit-jupiter-api compile + + org.junit.jupiter + junit-jupiter-params + compile + org.mockito mockito-all diff --git a/transactionoutbox-testing/src/main/java/com/gruelbox/transactionoutbox/testing/AbstractAcceptanceTest.java b/transactionoutbox-testing/src/main/java/com/gruelbox/transactionoutbox/testing/AbstractAcceptanceTest.java index d923be77..d4f16c5f 100644 --- a/transactionoutbox-testing/src/main/java/com/gruelbox/transactionoutbox/testing/AbstractAcceptanceTest.java +++ b/transactionoutbox-testing/src/main/java/com/gruelbox/transactionoutbox/testing/AbstractAcceptanceTest.java @@ -95,7 +95,7 @@ public void success(TransactionOutboxEntry entry) { chainedLatch.countDown(); } })) - .persistor(Persistor.forDialect(connectionDetails().dialect())) + .persistor(persistor()) .initializeImmediately(false) .build(); @@ -600,6 +600,10 @@ protected TransactionManager txManager() { return TransactionManager.fromDataSource(dataSource); } + protected Persistor persistor() { + return Persistor.forDialect(connectionDetails().dialect()); + } + protected void clearOutbox() { DefaultPersistor persistor = Persistor.forDialect(connectionDetails().dialect()); TransactionManager transactionManager = txManager();