Skip to content

Commit

Permalink
Adding some information to a JDBCStore section
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Maléř <[email protected]>
  • Loading branch information
MichalMaler committed Sep 27, 2023
1 parent 05ea722 commit 91f3077
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions docs/src/main/asciidoc/transaction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,15 @@ which is a CDI bean and can be ``@Inject``ed.

In cloud environments where persistent storage is not available, such as when application containers are unable to use persistent volumes, you can configure the transaction management to store transaction logs in a database by using a JDBC datasource.

IMPORTANT: While there are several benefits to using a database to store transaction logs, you might notice a reduction in performance compared with using the file system to store the logs.
[IMPORTANT]
====
While there are several benefits to using a database to store transaction logs, you might notice a reduction in performance compared with using the file system to store the logs.
Storing transaction logs into a database is expensive and should only be used when prioritizing consistency over throughput.
Quarkus allows the following JDBC-specific configuration of the object store included in `quarkus.transacion-manager.object-store.<property>` properties, where <property> can be:
Furthermore, this methodology pertains specifically to XA (eXtended Architecture) scenarios, which one should avoid in cloud-native applications unless external constraints demand their usage.
====

Quarkus allows the following JDBC-specific configuration of the object store included in `quarkus.transacion-manager.object-store.<property>` properties, where <property> can be:

* `type` (_string_): Configure this property to `jdbc` to enable usage of a Quarkus JDBC datasource for transaction logging.
The default value is `file-system`.
Expand All @@ -383,19 +388,21 @@ The default value is `false`.
* `table-prefix` (string): Specify the prefix for a related table name.
The default value is `quarkus_`.

// This paragraph will differ from the RHBQ docs in the future since it is not supported in the product yet.
Additional information:
For more configuration information, see the *Narayana JTA - Transaction manager* section of the Quarkus xref:all-config.adoc[All configuration options] reference.

// * xref:all-config.adoc#uarkus-narayana-jta-narayana-jta-transaction-manager[Narayana JTA - Transaction manager].

.Additional information:

* You can manually create the transaction log table during the initial setup by setting the `create-table` property to `true`.

* JDBC datasources and ActiveMQ Artemis allow the enlistment and automatically register the `XAResourceRecovery`.

** JDBC datasources is part of `quarkus-agroal`, and it needs to use `quarkus.datasource.jdbc.transactions=XA`.
** ActiveMQ Artemis is part of `quarkus-pooled-jms`, and it needs to use `quarkus.pooled-jms.transaction=XA`.
+
For more information, see link:https://issues.redhat.com/browse/CEQ-4878[CEQ-4878].

* If your application employs eXtended Architecture (XA) transactions, enable the transaction crash recovery feature by using `quarkus.transaction-manager.enable-recovery=true`, to safeguard your data in the event of application crashes or failures. The default value for XA Recovery is `false`.
* If your application employs eXtended Architecture (XA) transactions, enable the transaction crash recovery feature by using `quarkus.transaction-manager.enable-recovery=true`, to safeguard your data in the event of application crashes or failures.
The default value for XA Recovery is `false`.

[NOTE]
====
Expand All @@ -408,7 +415,6 @@ quarkus.datasource.TX_LOG.jdbc.transactions=disabled
This example uses TX_LOG as the datasource name.
====


== Why always having a transaction manager?

Does it work everywhere I want to?::
Expand Down

0 comments on commit 91f3077

Please sign in to comment.