Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a extra note for jdbc object store configuration #34297

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions docs/src/main/asciidoc/transaction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,21 @@ NOTE: The `event` object represents the transaction ID, and defines `toString()`
TIP: In listener methods, you can access more information about the transaction in progress by accessing the `TransactionManager`,
which is a CDI bean and can be ``@Inject``ed.

== Configuring transaction log to be stored in a DataSource
[[jdbcstore]]
== Support for storing Quarkus transaction logs in a database

The Narayana project has the capability to store the transaction logs into a JDBC Datasource; this should be our recommendation for users needing transaction recovery capabilities, especially when running in volatile containers.
Transaction management can be configured to store transaction logs in a database by using a JDBC datasource.

To enable this capability, you need to set `quarkus.transaction-manager.object-store.type` to `jdbc` explicitly. Also, you can specify a datasource name to be used for the transaction log storage by setting `quarkus.transaction-manager.object-store.datasource`. It will use the default datasource configuration if not specified.
Database storage of transaction logs generally performs worse than filesystem storage, but may be necessary in cloud environments lacking persistent storage, for example, if your application container cannot use persistent volumes.

If you enable `quarkus.transaction-manager.object-store.create-table`, the transaction log table will be created automatically if it does not exist.
To enable this capability, explicitly set `quarkus.transaction-manager.object-store.type` to `jdbc`.

NOTE: When enabling this capability, the transaction node identifier must be set through `quarkus.transaction-manager.node-name`.
You can also specify the datasource name for the transaction log storage by setting `quarkus.transaction-manager.object-store.datasource`.
If no configuration is provided, Quarkus uses the xref:datasource.adoc#dev-services[default datasource].

When the `quarkus.transaction-manager.object-store.create-table` configuration is enabled, the transaction log table gets automatically created if it does not already exist.
jmartisk marked this conversation as resolved.
Show resolved Hide resolved

NOTE: To work around the known issue of Agroal having a different view on running transaction checks, set the datasource transaction type to `disabled`.

== Why always having a transaction manager?

Expand Down