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

Quarkus 2.16 Migration guide / Transaction API examples #31508

Closed
pjgg opened this issue Mar 1, 2023 · 3 comments
Closed

Quarkus 2.16 Migration guide / Transaction API examples #31508

pjgg opened this issue Mar 1, 2023 · 3 comments

Comments

@pjgg
Copy link
Contributor

pjgg commented Mar 1, 2023

Describe the bug

Related to: #31507

Migration guide https://github.com/quarkusio/quarkus/wiki/Migration-Guide-2.16 are talking about the new Transaction API, more in detail is providing some example where this transaction result is returned RunOptions.ExceptionResult.ROLLBACK. In my opinion, based on what I saw on the source code, we should return TransactionExceptionResult.ROLLBACK

@pjgg pjgg added the kind/bug Something isn't working label Mar 1, 2023
@geoand geoand added area/documentation and removed kind/bug Something isn't working labels Mar 1, 2023
@gsmet
Copy link
Member

gsmet commented Mar 2, 2023

@pjgg I understand this was fixed by your PR? Should we close?

@pjgg
Copy link
Contributor Author

pjgg commented Mar 2, 2023

This is talking about the migration guide(GitHub Wiki) not the Quarkus/doc snippets, so is pending to be updated.

For example:

// After
QuarkusTransaction.requiringNew()
        .timeout(10)
        .exceptionHandler((throwable) -> {
            if (throwable instanceof SomeException) {
               return RunOptions.ExceptionResult.COMMIT;
            }
            return RunOptions.ExceptionResult.ROLLBACK;
        })
        .run(() -> { ... });
QuarkusTransaction.requiringNew()
        .timeout(10)
        .exceptionHandler((throwable) -> {
            if (throwable instanceof SomeException) {
               return RunOptions.ExceptionResult.COMMIT;
            }
            return RunOptions.ExceptionResult.ROLLBACK;
        })
        .call(() -> { ... });

All the references to RunOptions.ExceptionResult.ROLLBACK are deprecated.

@geoand
Copy link
Contributor

geoand commented Mar 5, 2024

Let's close this as we've moved way beyond 2.16

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants