Skip to content

Commit

Permalink
Merge pull request #36273 from gsmet/3.4.2-backports-1
Browse files Browse the repository at this point in the history
3.4.2 backports 1
  • Loading branch information
gsmet authored Oct 4, 2023
2 parents f9b4721 + 53077bf commit f087298
Show file tree
Hide file tree
Showing 66 changed files with 1,504 additions and 359 deletions.
4 changes: 2 additions & 2 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<hibernate-reactive.version>2.0.5.Final</hibernate-reactive.version>
<hibernate-validator.version>8.0.1.Final</hibernate-validator.version>
<!-- When updating, align hibernate-search.version-for-documentation in docs/pom.xml -->
<hibernate-search.version>6.2.1.Final</hibernate-search.version>
<hibernate-search.version>6.2.2.Final</hibernate-search.version>
<narayana.version>7.0.0.Final</narayana.version>
<agroal.version>2.1</agroal.version>
<jboss-transaction-spi.version>8.0.0.Final</jboss-transaction-spi.version>
Expand Down Expand Up @@ -204,7 +204,7 @@
<log4j2-jboss-logmanager.version>1.1.1.Final</log4j2-jboss-logmanager.version>
<log4j2-api.version>2.20.0</log4j2-api.version>
<log4j-jboss-logmanager.version>1.3.0.Final</log4j-jboss-logmanager.version>
<avro.version>1.11.2</avro.version>
<avro.version>1.11.3</avro.version>
<apicurio-registry.version>2.4.3.Final</apicurio-registry.version>
<apicurio-common-rest-client.version>0.1.18.Final</apicurio-common-rest-client.version> <!-- must be the version Apicurio Registry uses -->
<testcontainers.version>1.18.3</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,30 @@
public final class JPMSExportBuildItem extends MultiBuildItem {
private final String moduleName;
private final String packageName;
private final GraalVM.Version exportAfter;
private final GraalVM.Version exportSince;
private final GraalVM.Version exportBefore;

public JPMSExportBuildItem(String moduleName, String packageName) {
this(moduleName, packageName, null, null);
}

public JPMSExportBuildItem(String moduleName, String packageName, GraalVM.Version exportAfter) {
this(moduleName, packageName, exportAfter, null);
public JPMSExportBuildItem(String moduleName, String packageName, GraalVM.Version exportSince) {
this(moduleName, packageName, exportSince, null);
}

public JPMSExportBuildItem(String moduleName, String packageName, GraalVM.Version exportAfter,
/**
* Creates a build item that indicates that a Java package should be exported for a specific GraalVM version range.
*
* @param moduleName the module name
* @param packageName the package name
* @param exportSince the version of GraalVM since which the package should be exported (inclusive)
* @param exportBefore the version of GraalVM before which the package should be exported (exclusive)
*/
public JPMSExportBuildItem(String moduleName, String packageName, GraalVM.Version exportSince,
GraalVM.Version exportBefore) {
this.moduleName = moduleName;
this.packageName = packageName;
this.exportAfter = exportAfter;
this.exportSince = exportSince;
this.exportBefore = exportBefore;
}

Expand Down Expand Up @@ -56,16 +64,16 @@ public int hashCode() {
return Objects.hash(moduleName, packageName);
}

public GraalVM.Version getExportAfter() {
return exportAfter;
public GraalVM.Version getExportSince() {
return exportSince;
}

public GraalVM.Version getExportBefore() {
return exportBefore;
}

public boolean isRequired(GraalVM.Version current) {
return (exportAfter == null || current.compareTo(exportAfter) > 0) &&
return (exportSince == null || current.compareTo(exportSince) >= 0) &&
(exportBefore == null || current.compareTo(exportBefore) < 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void addExportsToNativeImage(BuildProducer<JPMSExportBuildItem> features) {
features.produce(new JPMSExportBuildItem("org.graalvm.sdk", "org.graalvm.nativeimage.impl", null,
GraalVM.Version.VERSION_23_1_0));
features.produce(new JPMSExportBuildItem("org.graalvm.nativeimage", "org.graalvm.nativeimage.impl",
GraalVM.Version.VERSION_23_0_0));
GraalVM.Version.VERSION_23_1_0));
}

@BuildStep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class DurationConverter implements Converter<Duration>, Serializable {
private static final String PERIOD = "P";
private static final String PERIOD_OF_TIME = "PT";
public static final Pattern DIGITS = Pattern.compile("^[-+]?\\d+$");
private static final Pattern DIGITS_AND_UNIT = Pattern.compile("^[-+]?\\d+(?:\\.\\d+)?(?i)[hms]$");
private static final Pattern DIGITS_AND_UNIT = Pattern.compile("^(?:[-+]?\\d+(?:\\.\\d+)?(?i)[hms])+$");
private static final Pattern DAYS = Pattern.compile("^[-+]?\\d+(?i)d$");
private static final Pattern MILLIS = Pattern.compile("^[-+]?\\d+(?i)ms$");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,18 @@ public void testValueIsInSec() {
Duration actualDuration = durationConverter.convert("2s");
assertEquals(expectedDuration, actualDuration);
}

@Test
public void testValuesWithMultipleUnits() {
Duration expectedDuration = Duration.ofSeconds(150);
Duration actualDuration = durationConverter.convert("2m30s");
assertEquals(expectedDuration, actualDuration);
}

@Test
public void testValuesWithMultipleUnitsSigned() {
Duration expectedDuration = Duration.ofSeconds(90);
Duration actualDuration = durationConverter.convert("+2m-30s");
assertEquals(expectedDuration, actualDuration);
}
}
5 changes: 5 additions & 0 deletions docs/src/main/asciidoc/appcds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ This results in an archive generation process that on one hand is completely saf
As a result, users are expected to get a slightly more effective archive if they manually go through the hoops of generating the AppCDS archive.
====

[IMPORTANT]
====
AppCDS has improved significantly in the latest JDK releases. This means that to ensure the best possible improvements from it, make sure your projects targets the highest possible Java version (ideally 17 or 21).
====

=== Usage in containers

When building container images using the `quarkus-container-image-jib` extension, Quarkus automatically takes care of all the steps needed to generate the archive
Expand Down
16 changes: 16 additions & 0 deletions docs/src/main/asciidoc/datasource.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,22 @@ Quarkus offers several reactive clients for a use with reactive datasource.
+
The installed extension must be consistent with the `quarkus.datasource.db-kind` you define in your datasource configuration.

[WARNING]
====
The Reactive Oracle datasource depends on the https://docs.oracle.com/en/database/oracle/oracle-database/23/jjdbc/jdbc-reactive-extensions.html[Reactive Extensions] provided by Oracle in its JDBC driver.
There is a bug in versions 23.2 and 21.11 of the Oracle JDBC driver that prevents from getting any response if:
* Reactive Extensions are used to execute an update/insert query that ends with an error (e.g. constraint violation), and
* https://vertx.io/docs/vertx-oracle-client/java/#_retrieving_generated_key_values[generated keys retrieval] is enabled.
It is not known yet when the bug will be fixed.
In the meantime, you can either:
* change the version of the driver in your project to `com.oracle.database.jdbc:ojdbc11:21.10.0.0`, or
* avoid executing queries with generated keys retrieval (e.g. load sequence value before inserting)
====

. After adding the driver, configure the connection URL and define a proper size for your connection pool.
+
[source,properties]
Expand Down
Loading

0 comments on commit f087298

Please sign in to comment.