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
H2 and Derby databases can be configured to run in "embedded mode"; however, the Derby extension does not support compiling the embedded database engine into native executables.
204
+
You can configure H2 and Derby databases to run in "embedded mode"; however, the Derby extension does not support compiling the embedded database engine into native executables.
205
205
206
-
Read <<in-memory-databases,Testing with in-memory databases>> for suggestions regarding integration testing.
206
+
For suggestions regarding integration testing, see <<in-memory-databases,Testing with in-memory databases>> .
207
207
====
208
208
* DB2 - `quarkus-jdbc-db2`
209
209
* MariaDB - `quarkus-jdbc-mariadb`
@@ -225,10 +225,9 @@ For example, to add the PostgreSQL driver dependency:
225
225
[NOTE]
226
226
====
227
227
Using a built-in JDBC driver extension automatically includes the Agroal extension, which is the JDBC connection pool implementation applicable for custom and built-in JDBC drivers.
228
-
However, for custom drivers, Agroal needs to be added explicitly.
228
+
However, for custom drivers, you must add Agroal explicitly.
229
229
====
230
230
231
-
232
231
.. For use with a custom JDBC driver, add the `quarkus-agroal` dependency to your project alongside the extension for your relational database driver:
For all the details about the JDBC configuration options and configuring other aspects,
280
-
such as the connection pool size, refer to the <<jdbc-configuration,JDBC configuration reference>> section.
278
+
For details about JDBC configuration options and configuring other aspects, such as the connection pool size, refer to the <<jdbc-configuration,JDBC configuration reference>> section.
281
279
282
280
===== Consuming the datasource
283
281
@@ -303,7 +301,7 @@ Because this behavior is unexpected and can lead to data loss, an interceptor ro
303
301
However, if you use XA transactions, the transaction manager handles the rollback.
304
302
305
303
If the behavior introduced in 3.18 causes issues for your workload, disable it by setting the `-Dquarkus-oracle-no-automatic-rollback-on-connection-close` system property to `true`.
306
-
Make sure to report your use case in our link:https://github.com/quarkusio/quarkus/issues[issue tracker] so we can adjust this behavior if needed, for example, with more permanent settings.
304
+
Make sure to report your use case in the link:https://github.com/quarkusio/quarkus/issues[issue tracker] so we can adjust this behavior if needed, for example, with more permanent settings.
307
305
308
306
309
307
[[reactive-datasource]]
@@ -680,11 +678,12 @@ You can override this by setting the `transactions` configuration property:
680
678
* `quarkus.datasource.jdbc.transactions` for default unnamed datasource
681
679
* `quarkus.datasource._<datasource-name>_.jdbc.transactions` for named datasource
682
680
683
-
When a datasource is enabled for XA (by setting `quarkus.datasource[.optional name].jdbc.transactions to xa)` and the transaction recovery system is enabled (by setting the property `quarkus.transaction-manager.enable-recovery` to true) then the datasource is automatically registered for recovery. This is a safe default, but you can override this behaviour on a per-datasource basis by setting `quarkus.datasource.jdbc.enable-recovery`/`quarkus.datasource."datasource-name".jdbc.enable-recovery` to `false`. Only use this for advanced use cases and if you know recovery will not be necessary, otherwise it may result in data loss and/or data unavailability because resources may become locked indefinitely.
681
+
When a datasource is enabled for XA (by setting `quarkus.datasource[.optional name].jdbc.transactions` to `xa`) and the transaction recovery system is enabled (by setting the property `quarkus.transaction-manager.enable-recovery` to `true`), then the datasource is automatically registered for recovery.
682
+
This is a safe default, but you can override this behaviour on a per-datasource basis by setting `quarkus.datasource.jdbc.enable-recovery` or `quarkus.datasource."datasource-name".jdbc.enable-recovery` to `false`.
683
+
Use only for advanced use cases and if you know recovery will not be necessary; otherwise it can result in data loss, data unavailability, or both, because resources can become locked indefinitely.
684
684
685
685
For more information, see the <<configuration-reference,Configuration reference>> section below.
686
-
687
-
To facilitate the storage of transaction logs in a database by using JDBC, see xref:transaction.adoc#jdbcstore[Configuring transaction logs to be stored in a datasource] section of the xref:transaction.adoc[Using transactions in Quarkus] guide.
686
+
To facilitate the storage of transaction logs in a database by using JDBC, see the xref:transaction.adoc#jdbcstore[Configuring transaction logs to be stored in a datasource] section of the xref:transaction.adoc[Using transactions in Quarkus] guide.
Copy file name to clipboardExpand all lines: _versions/main/guides/logging.adoc
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,9 +143,13 @@ For extension development, use `org.jboss.logging.Logger.getLogger(String)` inst
143
143
144
144
The injection of a configured `org.jboss.logging.Logger` logger instance with the `@Inject` annotation is another alternative to adding an application logger, but is applicable only to CDI beans.
145
145
146
-
You can use `@Inject Logger log`, where the logger gets named after the class you inject it to, or `@LoggerName("...") Logger log`, where the logger will receive the specified name. Notice, that `@Inject`
147
-
is not required if you already annotated your `Logger` with `@LoggerName("...")`.
148
-
146
+
You can use `@Inject Logger log`, where the logger gets named after the class you inject it to, or `@LoggerName("...") Logger log`, where the logger receives the specified name.
147
+
148
+
[NOTE]
149
+
====
150
+
`@Inject` is not required if you already annotated your `Logger` with `@LoggerName("...")`.
151
+
====
152
+
149
153
Once injected, you can use the `log` object to invoke logging methods.
150
154
151
155
.An example of two different types of logger injection:
Additionally, if you are only interested in specifying the roles that are allowed to use the resources, the `@ResourceProperties` and `@MethodProperties` annotations have the field `rolesAllowed` to list the security roles permitted to access the resource or operation.
346
346
347
+
=== Using @Authenticated
348
+
349
+
Additionally, REST Data with Panache can be used in conjunction with `io.quarkus.security.Authenticated`, by either:
350
+
351
+
* Setting `@ResourceProperties(authenticated=true)` which results in all methods of the resource requiring authentication
352
+
* The same result can also be achieved by adding the `@Authenticated` annotation on the interface instead of using the `authenticated` property
353
+
* Finally, the `@Authenticated` annotation can be used on specific methods, meaning that only those will require an authenticated user. An example might look like so:
354
+
355
+
[source,java]
356
+
----
357
+
@ResourceProperties
358
+
public interface PeopleResource extends PanacheEntityResource<Person, Long> {
359
+
@Authenticated
360
+
boolean delete(Long id);
361
+
}
362
+
----
363
+
347
364
== Query parameters to list entities
348
365
349
366
REST Data with Panache supports the following query parameters to get the list of entities:
0 commit comments