Skip to content

Use RESOURCE_LOCAL transactions for JPA map storage - #15249

Merged
pedroigor merged 1 commit into
keycloak:mainfrom
ahus1:is-15248-test-resource-local-on-quarkus-for-jpa-map-storage
Nov 1, 2022
Merged

pedroigor merged 1 commit into
keycloak:mainfrom
ahus1:is-15248-test-resource-local-on-quarkus-for-jpa-map-storage

Conversation

@ahus1

@ahus1 ahus1 commented Nov 1, 2022

Copy link
Copy Markdown
Member

Closes #15248

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use this option to choose between JTA and RESOURCE_LOCAL. See

public static final Option<Boolean> TRANSACTION_JTA_ENABLED = new OptionBuilder<>("transaction-jta-enabled", Boolean.class)
.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included in the latest commit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/quarkusio/quarkus/blob/main/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/FastBootMetadataBuilder.java#L287.

In the past, we had some discussions with Quarkus team about it. We can involve them again to see the implications of doing this. At that time, the discussions were around JTA, perhaps using resource local it can work well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As agreed in today's call, I'll reach out to experts in Quarkus/Hibernate/Agroal to discuss this. Still, this PR will be merged to fix the problems we currently experience.

@ahus1 ahus1 self-assigned this Nov 1, 2022
@ahus1
ahus1 force-pushed the is-15248-test-resource-local-on-quarkus-for-jpa-map-storage branch from c5d9e34 to d259092 Compare November 1, 2022 14:05
@ahus1 ahus1 changed the title Use RESOURCE_LOCAL transactions for JPA map storage [skip ci] Use RESOURCE_LOCAL transactions for JPA map storage Nov 1, 2022
@ahus1
ahus1 marked this pull request as ready for review November 1, 2022 19:39
@ahus1

ahus1 commented Nov 1, 2022

Copy link
Copy Markdown
Member Author

@vramik - after the builds are finally green this is now ready for review.

@ahus1
ahus1 requested a review from vramik November 1, 2022 19:40
@pedroigor
pedroigor merged commit 1b7ae48 into keycloak:main Nov 1, 2022
@ahus1
ahus1 deleted the is-15248-test-resource-local-on-quarkus-for-jpa-map-storage branch November 23, 2022 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JPA Map store JDBC transactions not rolled back on Hibernate transaction rollback when running in Quarkus

2 participants