You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/amazon-lambda.adoc
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,18 +54,18 @@ mvn archetype:generate \
54
54
If you prefer to use Gradle, you can quickly and easily generate a Gradle project via https://code.quarkus.io/[code.quarkus.io]
55
55
adding the `quarkus-amazon-lambda` extension as a dependency.
56
56
57
-
Copy the build.gradle, gradle.properties and settings.gradle into the abovegenerated Maven archetype project, to follow along with this guide.
57
+
Copy the build.gradle, gradle.properties and settings.gradle into the above-generated Maven archetype project, to follow along with this guide.
58
58
59
59
Execute: gradle wrapper to set up the gradle wrapper (recommended).
60
60
61
-
For full Gradle details <<gradle, see below>>.
61
+
For full Gradle details, see the xref:gradle[Gradle build] section below.
62
62
====
63
63
64
64
[[choose]]
65
65
== Choose Your Lambda
66
66
67
67
The `quarkus-amazon-lambda` extension scans your project for a class that directly implements the Amazon `RequestHandler<?, ?>` or `RequestStreamHandler` interface.
68
-
It must find a class in your project that implements this interface or it will throw a build time failure.
68
+
It must find a class in your project that implements this interface, or it will throw a build time failure.
69
69
If it finds more than one handler class, a build time exception will also be thrown.
70
70
71
71
Sometimes, though, you might have a few related lambdas that share code and creating multiple maven modules is just
@@ -273,7 +273,7 @@ call must set a specific environment variable:
273
273
There is nothing special about the POM other than the inclusion of the `quarkus-amazon-lambda` extension
274
274
as a dependency. The extension automatically generates everything you might need for your lambda deployment.
275
275
276
-
NOTE: In previous versions of this extension you had to set up your pom or gradle
276
+
NOTE: In previous versions of this extension, you had to set up your pom or gradle
277
277
to zip up your executable for native deployments, but this is not the case anymore.
278
278
279
279
[[gradle]]
@@ -452,13 +452,13 @@ Please check link:{amazon-services-guide}[those guides] on how to use the variou
452
452
With minimal integration, it is possible to leverage the AWS Java SDK v2,
453
453
which can be used to invoke services such as SQS, SNS, S3 and DynamoDB.
454
454
455
-
For native image, however the URL Connection client must be preferred over the Apache HTTP Client
455
+
For native image, however, the URL Connection client must be preferred over the Apache HTTP Client
456
456
when using synchronous mode, due to issues in the GraalVM compilation (at present).
457
457
458
458
Add `quarkus-jaxb` as a dependency in your Maven `pom.xml`, or Gradle `build.gradle` file.
459
459
460
460
You must also force your AWS service client for SQS, SNS, S3 et al., to use the URL Connection client,
461
-
which connects to AWS services over HTTPS, hence the inclusion of the SSL enabled property, as described in the <<https>> section above.
461
+
which connects to AWS services over HTTPS, hence the inclusion of the SSL enabled property, as described in the xref:https[] section above.
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/cli-tooling.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -428,7 +428,7 @@ The behavior of `quarkus ext ls` will vary depending on context.
428
428
429
429
If you invoke the Quarkus CLI from outside of a project, Quarkus will list all the extensions available for the Quarkus release used by the CLI itself.
430
430
431
-
You can also list extensions for a specific release of Quarkus using `-P` or `-S`, as described in <<specifying-quarkus-version,Specifying the Quarkus version>>.
431
+
You can also list extensions for a specific release of Quarkus using `-P` or `-S`, as described in xref:specifying-quarkus-version[Specifying the Quarkus version].
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/config.adoc
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ include::_attributes.adoc[]
9
9
:summary: Hardcoded values in your code is a no go (even if we all did it at some point ;-)). In this guide, we learn how to configure your application.
10
10
11
11
IMPORTANT: The content of this guide and been revised and split into additional topics. Please check the
<1> The cross reference starts with `xref:`, uses a cross-reference source attribute(`\{doc-guides}`), and provides a readable description: `[Quarkus Documentation concepts]`.
257
+
<1> The cross-reference starts with `xref:`, uses a cross-reference source attribute(`\{doc-guides}`), and provides a readable description: `[Quarkus Documentation concepts]`.
258
+
259
+
=== Anchors
260
+
261
+
Quarkus documentation provides several ways a contributor can create and call anchors.
262
+
To reach consistency and a better single-sourcing experience with Quarkus documentation, we ask contributors to use the `xref` approach for documenting and calling anchors.
263
+
264
+
.Example
265
+
* An anchor to a chapter inside the same `.adoc` file
266
+
** Create an ID anchor:
267
+
+
268
+
[source,asciidoc]
269
+
--
270
+
[[<anchor-ID>]]
271
+
--
272
+
273
+
** Call the anchor
274
+
+
275
+
[source,asciidoc]
276
+
--
277
+
xref:<anchor-ID>[]
278
+
--
279
+
280
+
* A cross-file anchor
281
+
** Create an ID anchor:
282
+
+
283
+
[source,asciidoc]
284
+
--
285
+
[[<anchor-ID>]]
286
+
--
287
+
288
+
** Call the anchor
289
+
+
290
+
[source,asciidoc]
291
+
--
292
+
xref:<target-file>.adoc#<anchord-ID>[]
293
+
--
294
+
295
+
NOTE: The `[]` part of your `xref` anchors sets up a desired anchor label in cases where the default label does not fit the content.
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/getting-started.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ This guide also covers the testing of the endpoint.
45
45
46
46
== Solution
47
47
48
-
We recommend that you follow the instructions from <<bootstrapping-the-project,Bootstrapping project>> and onwards to create the application step by step.
48
+
We recommend that you follow the instructions from xref:bootstrapping-the-project[Bootstrapping project] and onwards to create the application step by step.
49
49
50
50
However, you can go right to the completed example.
51
51
@@ -69,12 +69,12 @@ For Linux & MacOS users
69
69
:create-app-code:
70
70
include::{includes}/devtools/create-app.adoc[]
71
71
72
-
For Windows users
72
+
For Windows users:
73
73
74
74
- If using cmd , (don't use backward slash `\` and put everything on the same line)
75
75
- If using Powershell , wrap `-D` parameters in double quotes e.g. `"-DprojectArtifactId=getting-started"`
76
76
77
-
It generates the following in `./getting-started`:
77
+
It generates the following in `./getting-started`:
78
78
79
79
* the Maven structure
80
80
* an `org.acme.GreetingResource` resource exposed on `/hello`
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/hibernate-orm.adoc
+20-21Lines changed: 20 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,11 +98,11 @@ They will often map to Hibernate ORM configuration properties but could have dif
98
98
99
99
Also, Quarkus will set many Hibernate ORM configuration settings automatically, and will often use more modern defaults.
100
100
101
-
Please see below section <<hibernate-configuration-properties, Hibernate ORM configuration properties>> for the list of properties you can set in `{config-file}`.
101
+
For a list of the items that you can set in `{config-file}`, see xref:hibernate-configuration-properties[Hibernate ORM configuration properties].
102
102
103
103
An `EntityManagerFactory` will be created based on the Quarkus `datasource` configuration as long as the Hibernate ORM extension is listed among your project dependencies.
104
104
105
-
The dialect will be selected based on the JDBC driver - unless you set one explicitly.
105
+
Unless you set one explicitly, the dialect will be selected based on the JDBC driver.
Do not mix <<persistence-xml,`persistence.xml`>> and `quarkus.hibernate-orm.*` properties in `{config-file}`.
184
+
Do not mix xref:persistence-xml[`persistence.xml`] and `quarkus.hibernate-orm.*` properties in `{config-file}`.
185
185
Quarkus will raise an exception.
186
186
Make up your mind on which approach you want to use.
187
187
@@ -450,7 +450,7 @@ the https://jakarta.ee/specifications/persistence/3.0/jakarta-persistence-spec-3
450
450
or the http://hibernate.org/dtd/hibernate-mapping-3.0.dtd[`hbm.xml` format (specific to Hibernate ORM, deprecated)]:
451
451
452
452
* in `application.properties` through the (build-time) link:#quarkus-hibernate-orm_quarkus.hibernate-orm.mapping-files[`quarkus.hibernate-orm.mapping-files`] property.
453
-
* in <<persistence-xml,`persistence.xml`>> through the `<mapping-file>` element.
453
+
* in xref:persistence-xml[`persistence.xml`] through the `<mapping-file>` element.
454
454
455
455
XML mapping files are parsed at build time.
456
456
@@ -769,22 +769,22 @@ configure your datasource as in the above examples and it will set up Hibernate
769
769
More details about this connection pool can be found in xref:datasource.adoc[Quarkus - Datasources].
770
770
771
771
Second Level Cache::
772
-
as explained above in section <<caching,Caching>>, you don't need to pick an implementation.
772
+
As explained earlier in the xref:caching[Caching] section, you don't need to pick an implementation.
773
773
A suitable implementation based on technologies from link:https://infinispan.org/[Infinispan] and link:https://github.com/ben-manes/caffeine[Caffeine] is included as a transitive dependency of the Hibernate ORM extension, and automatically integrated during the build.
774
774
775
775
=== Limitations
776
776
777
777
XML mapping with duplicate files in the classpath::
778
-
<<xml-mapping,XML mapping>> files are expected to have a unique path.
779
-
+
778
+
xref:xml-mapping[XML mapping] files are expected to have a unique path.
779
+
780
780
In practice, it's only possible to have duplicate XML mapping files in the classpath in very specific scenarios.
781
-
For example, if two JARs include a `META-INF/orm.xml` file (with the exact same path, but in different JARs),
781
+
For example, if two JARs include a `META-INF/orm.xml` file (with the same path but in different JARs),
782
782
then the mapping file path `META-INF/orm.xml` can only be referenced from a `persistence.xml`
783
783
**in the same JAR as the `META-INF/orm.xml` file**.
784
784
785
785
JMX::
786
786
Management beans are not working in GraalVM native images;
787
-
therefore Hibernate's capability to register statistics and management operations with the JMX bean is disabled when compiling into a native image.
787
+
therefore, Hibernate's capability to register statistics and management operations with the JMX bean is disabled when compiling into a native image.
788
788
This limitation is likely permanent, as it's not a goal for native images
789
789
to implement support for JMX. All such metrics can be accessed in other ways.
790
790
@@ -793,18 +793,17 @@ Hibernate ORM's capability to integrate with JACC is disabled when building Graa
793
793
as JACC is not available - nor useful - in native mode.
794
794
795
795
Binding the Session to ThreadLocal context::
796
-
It is not possible to use the `ThreadLocalSessionContext` helper of Hibernate ORM as support for it is not implemented.
797
-
Since Quarkus provides out of thebox support for CDI, we believe using injection or programmatic CDI lookup to be a better approach.
796
+
It is impossible to use the `ThreadLocalSessionContext` helper of Hibernate ORM as support for it is not implemented.
797
+
Since Quarkus provides out-of-the-box CDI support, injection or programmatic CDI lookup is a better approach.
798
798
This feature also didn't integrate well with reactive components and more modern context propagation techniques, making us believe this legacy feature has no future.
799
-
If you badly need to bind it to a ThreadLocal it should be trivial to implement in your own code.
799
+
If you badly need to bind it to a ThreadLocal, it should be trivial to implement in your own code.
800
800
801
801
JNDI::
802
802
The JNDI technology is commonly used in other runtimes to integrate different components.
803
-
A common use case is Java Enterprise servers to bind the TransactionManager and the Datasource components to a name, and then have Hibernate ORM
804
-
configured to look these components up by name.
805
-
But in Quarkus this use case doesn't apply as components are injected directly, making JNDI support an unnecessary legacy.
806
-
As a precaution, to avoid unexpected use of JNDI, the whole support for JNDI has been disabled in the Hibernate ORM extension for Quarkus.
807
-
This is both a security precaution and an optimisation.
803
+
A common use case is Java Enterprise servers to bind the TransactionManager and the Datasource components to a name and then have Hibernate ORM configured to look these components up by name.
804
+
But in Quarkus, this use case doesn't apply as components are injected directly, making JNDI support an unnecessary legacy.
805
+
To avoid unexpected use of JNDI, full support for JNDI has been disabled in the Hibernate ORM extension for Quarkus.
806
+
This is both a security precaution and an optimization.
808
807
809
808
=== Other notable differences
810
809
@@ -901,7 +900,7 @@ public class CustomTenantResolver implements TenantResolver {
901
900
<1> Annotate the TenantResolver implementation with the `@PersistenceUnitExtension` qualifier
902
901
to tell Quarkus it should be used in the default persistence unit.
903
902
+
904
-
For <<multiple-persistence-units,named persistence units>>, use `@PersistenceUnitExtension("nameOfYourPU")`.
903
+
For xref:multiple-persistence-units[named persistence units], use `@PersistenceUnitExtension("nameOfYourPU")`.
905
904
<2> The bean is made `@RequestScoped` as the tenant resolution depends on the incoming request.
906
905
907
906
From the implementation above, tenants are resolved from the request path so that in case no tenant could be inferred, the default tenant identifier is returned.
If you need a more dynamic configuration for the different tenants you want to support and don't want to end up with multiple entries in your configuration file,
1066
1065
you can use the `io.quarkus.hibernate.orm.runtime.tenant.TenantConnectionResolver` interface to implement your own logic for retrieving a connection.
1067
1066
Creating an application-scoped bean that implements this interface
1068
-
and annotating it with `@PersistenceUnitExtension` (or `@PersistenceUnitExtension("nameOfYourPU")` for a <<multiple-persistence-units,named persistence unit>>)
1067
+
and annotating it with `@PersistenceUnitExtension` (or `@PersistenceUnitExtension("nameOfYourPU")` for a xref:multiple-persistence-units[named persistence unit])
1069
1068
will replace the current Quarkus default implementation `io.quarkus.hibernate.orm.runtime.tenant.DataSourceTenantConnectionResolver`.
1070
1069
Your custom connection resolver would allow for example to read tenant information from a database and create a connection per tenant at runtime based on it.
1071
1070
@@ -1090,7 +1089,7 @@ public static class MyInterceptor extends EmptyInterceptor { // <2>
1090
1089
<1> Annotate the interceptor implementation with the `@PersistenceUnitExtension` qualifier
1091
1090
to tell Quarkus it should be used in the default persistence unit.
1092
1091
+
1093
-
For <<multiple-persistence-units,named persistence units>>, use `@PersistenceUnitExtension("nameOfYourPU")`
1092
+
For xref:multiple-persistence-units[named persistence units], use `@PersistenceUnitExtension("nameOfYourPU")`
1094
1093
<2> Either extend `org.hibernate.EmptyInterceptor` or implement `org.hibernate.Interceptor` directly.
1095
1094
<3> Implement methods as necessary.
1096
1095
@@ -1132,5 +1131,5 @@ public class MyStatementInspector implements StatementInspector { // <2>
1132
1131
<1> Annotate the statement inspector implementation with the `@PersistenceUnitExtension` qualifier
1133
1132
to tell Quarkus it should be used in the default persistence unit.
1134
1133
+
1135
-
For <<multiple-persistence-units,named persistence units>>, use `@PersistenceUnitExtension("nameOfYourPU")`
1134
+
For xref:multiple-persistence-units[named persistence units], use `@PersistenceUnitExtension("nameOfYourPU")`
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/hibernate-reactive.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ Also, Quarkus will set many Hibernate Reactive configuration settings automatica
102
102
103
103
WARNING: Configuring Hibernate Reactive using the standard `persistence.xml` configuration file is not supported.
104
104
105
-
Please, see section <<hr-configuration-properties, Hibernate Reactive configuration properties>> for the list of properties you can set in `{config-file}`.
105
+
See section xref:hr-configuration-properties[Hibernate Reactive configuration properties] for the list of properties you can set in `{config-file}`.
106
106
107
107
A `Mutiny.SessionFactory` will be created based on the Quarkus `datasource` configuration as long as the Hibernate Reactive extension is listed among your project dependencies.
0 commit comments