Skip to content

Commit

Permalink
Merge pull request quarkusio#37082 from aloubyansky/3.2.9-backports-2
Browse files Browse the repository at this point in the history
3.2.9 backports 2
  • Loading branch information
aloubyansky authored Nov 14, 2023
2 parents 3929697 + 7f12fac commit 11bfb0f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 17 deletions.
17 changes: 10 additions & 7 deletions docs/src/main/asciidoc/blaze-persistence.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,34 @@ In Quarkus, you just need to:

Add the following dependencies to your project:

* the Blaze-Persistence extension: `com.blazebit:blaze-persistence-integration-quarkus`
* the Blaze-Persistence extension: `com.blazebit:blaze-persistence-integration-quarkus-3`
* further Blaze-Persistence integrations as needed:
- `blaze-persistence-integration-jackson` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#Jackson%20integration[Jackson]
- `blaze-persistence-integration-jackson-jakarta` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#Jackson%20integration[Jackson]
- `blaze-persistence-integration-jsonb-jakarta` for link:https://persistence.blazebit.com/documentation/1.6/entity-view/manual/en_US/#jsonb-integration[JSONB]
- `blaze-persistence-integration-jaxrs` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#jaxrs-integration[Jakarta REST]
- `blaze-persistence-integration-jaxrs-jackson-jakarta` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#jaxrs-integration[Jakarta REST with Jackson]
- `blaze-persistence-integration-jaxrs-jsonb-jakarta` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#jaxrs-integration[Jakarta REST with JSONB]

[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.Example dependencies using Maven
----
<!-- Blaze-Persistence specific dependencies -->
<dependency>
<groupId>com.blazebit</groupId>
<artifactId>blaze-persistence-integration-quarkus</artifactId>
<artifactId>blaze-persistence-integration-quarkus-3</artifactId>
</dependency>
<dependency>
<groupId>com.blazebit</groupId>
<artifactId>blaze-persistence-integration-hibernate-5.6</artifactId>
<artifactId>blaze-persistence-integration-hibernate-6.2</artifactId>
<scope>runtime</scope>
</dependency>
----

[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
.Using Gradle
----
implementation("com.blazebit:blaze-persistence-integration-quarkus")
runtimeOnly("com.blazebit:blaze-persistence-integration-hibernate-5.6")
implementation("com.blazebit:blaze-persistence-integration-quarkus-3")
runtimeOnly("com.blazebit:blaze-persistence-integration-hibernate-6.2")
----

The use in native images requires a dependency on the entity view annotation processor that may be extracted into a separate `native` profile:
Expand All @@ -70,7 +73,7 @@ The use in native images requires a dependency on the entity view annotation pro
<dependencies>
<dependency>
<groupId>com.blazebit</groupId>
<artifactId>blaze-persistence-entity-view-processor</artifactId>
<artifactId>blaze-persistence-entity-view-processor-jakarta</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
9 changes: 8 additions & 1 deletion docs/src/main/asciidoc/resteasy-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2176,6 +2176,8 @@ class Filters {
}
----

Such a response filter will also be called for <<exception-mapping, handled>> exceptions.

Your filters may declare any of the following parameter types:

.Filter parameters
Expand All @@ -2192,7 +2194,7 @@ Your filters may declare any of the following parameter types:
|A context object to access the current response

|link:{jdkapi}/java/lang/Throwable.html[`Throwable`]
|Any thrown exception, or `null` (only for response filters)
|Any thrown and <<exception-mapping, handled>> exception, or `null` (only for response filters).

|===

Expand Down Expand Up @@ -2273,6 +2275,11 @@ Now, whenever a REST method is invoked, the request will be logged into the cons
2019-06-05 12:51:04,485 INFO [org.acm.res.jso.LoggingFilter] (executor-thread-1) Request GET /fruits from IP 127.0.0.1
----

[NOTE]
====
A `ContainerResponseFilter` will also be called for <<exception-mapping, handled>> exceptions.
====

=== Readers and Writers: mapping entities and HTTP bodies

[[readers-writers]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ public class OidcCommonConfig {
public Optional<Duration> connectionDelay = Optional.empty();

/**
* The number of times an attempt to re-establish an already available connection will be repeated for.
* Note this property is different to the `connection-delay` property which is only effective during the initial OIDC
* The number of times an attempt to re-establish an already available connection will be repeated.
* Note this property is different from the `connection-delay` property, which is only effective during the initial OIDC
* connection creation.
* This property is used to try to recover the existing connection which may have been temporarily lost.
* For example, if a request to the OIDC token endpoint fails due to a connection exception then the request will be retried
* for
* a number of times configured by this property.
* This property is used to try to recover an existing connection that may have been temporarily lost.
* For example, if a request to the OIDC token endpoint fails due to a connection exception, then the request will be
* retried the number of times configured by this property.
*/
@ConfigItem(defaultValue = "3")
public int connectionRetryCount = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public String getGrantType() {
* The WebClient timeout.
* Use this property to configure how long an HTTP client used by Dev UI handlers will wait for a response when requesting
* tokens from OpenId Connect Provider and sending them to the service endpoint.
* This timeout is also used by the OIDC dev service admin client.
*/
@ConfigItem(defaultValue = "4S")
public Duration webClientTimeout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import io.quarkus.oidc.runtime.devui.OidcDevServicesUtils;
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.configuration.ConfigUtils;
import io.smallrye.mutiny.TimeoutException;
import io.smallrye.mutiny.Uni;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpHeaders;
Expand Down Expand Up @@ -626,8 +627,11 @@ private String getAdminToken(WebClient client, String keycloakUrl) {
keycloakUrl + "/realms/master/protocol/openid-connect/token",
"admin-cli", null, "admin", "admin", null)
.await().atMost(oidcConfig.devui.webClientTimeout);
} catch (TimeoutException e) {
LOG.error("Admin token can not be acquired due to a client connection timeout. " +
"You may try increasing the `quarkus.oidc.devui.web-client-timeout` property.");
} catch (Throwable t) {
LOG.errorf("Admin token can not be acquired: %s", t.getMessage());
LOG.error("Admin token can not be acquired", t);
}
return null;
}
Expand Down Expand Up @@ -673,7 +677,7 @@ private void createRealm(WebClient client, String token, String keycloakUrl, Rea
} catch (Throwable t) {
errors.add(String.format("Realm %s can not be created: %s", realm.getRealm(), t.getMessage()));

LOG.errorf("Realm %s can not be created: %s", realm.getRealm(), t.getMessage());
LOG.errorf(t, "Realm %s can not be created", realm.getRealm());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class QuarkusBootstrap implements Serializable {
private final PathCollection applicationRoot;

/**
* The root of the project. This may be different to the application root for tests that
* The root of the project. This may be different from the application root for tests that
* run in a different directory.
*/
private final Path projectRoot;
Expand Down

0 comments on commit 11bfb0f

Please sign in to comment.