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

@Rollback annotation is JTA-specific: should be reusable for Hibernate Reactive with Panache #24500

Closed
FroMage opened this issue Mar 23, 2022 · 2 comments · Fixed by #24531
Closed
Labels
area/hibernate-orm Hibernate ORM area/hibernate-reactive Hibernate Reactive area/panache area/persistence OBSOLETE, DO NOT USE kind/enhancement New feature or request
Milestone

Comments

@FroMage
Copy link
Member

FroMage commented Mar 23, 2022

Description

In #22202 I screwed up and should have anticipated that we'd need that annotation also for HR.

It's acceptable that we have own own @ReactiveTransactional annotation because we don't want the ORM (actually JTA) and HR to walk on each other's feet. But it's not acceptable to ask users to decorate their exceptions with both @Rollback (from JTA) and @ReactiveRollback (from HR/Panache) because that adds two dependencies "just in case" the exception user uses ORM or HR.

So I vote to move that exception to a new extension quarkus-transactions that only has a runtime module containing the single class @Rollback, and zero dependency.

Not sure about the name, should it be plural or what? Should we add the annotation some other place, perhaps in an existing module such as quarkus-hibernate-orm which is after all, included by hibernate-reactive?

@Sanne or @DavideD would that be better/acceptable do you think?

Sorry about the urgency, but I think it'd be nice to figure this one out before we release 2.8, which currently has the new annotation, before it starts being used.

Implementation ideas

No response

@FroMage FroMage added kind/enhancement New feature or request area/panache area/hibernate-orm Hibernate ORM area/hibernate-reactive Hibernate Reactive labels Mar 23, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 23, 2022

/cc @DavideD, @Sanne, @gavinking, @loicmathieu

@quarkus-bot quarkus-bot bot added the area/persistence OBSOLETE, DO NOT USE label Mar 23, 2022
@FroMage
Copy link
Member Author

FroMage commented Mar 24, 2022

Actuall, I can't make narayana depend on ORM, because the dependency is the other way around. I could leave the annotation in narayana, except HR excludes narayana from its ORM import. So I have no choice but make a new module. I'll open a PR for this.

FroMage added a commit to FroMage/quarkus that referenced this issue Mar 24, 2022
FroMage added a commit to FroMage/quarkus that referenced this issue Mar 29, 2022
@quarkus-bot quarkus-bot bot added this to the 2.9 - main milestone Mar 29, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Mar 29, 2022
@gsmet gsmet modified the milestones: 2.9 - main, 2.8.0.Final Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-orm Hibernate ORM area/hibernate-reactive Hibernate Reactive area/panache area/persistence OBSOLETE, DO NOT USE kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants