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

@JdbiUnitOfWork and @Transaction combinations? #54

Open
ahalma opened this issue Oct 27, 2021 · 1 comment
Open

@JdbiUnitOfWork and @Transaction combinations? #54

ahalma opened this issue Oct 27, 2021 · 1 comment
Assignees

Comments

@ahalma
Copy link

ahalma commented Oct 27, 2021

Thanks for this great project! I have a question about combining @Transaction annotated methods in my DAO, and @JdbiUnitOfWork methods in resources (that use those methods).

Could this potentially mess up things (two different mechanisms to achieve the same thing)? Or can I keep both?

@isopropylcyanide
Copy link
Owner

isopropylcyanide commented Jan 13, 2022

Hi @ahalma, apologies for the delay. Turns out I wasn't subscribed to updated on this repository.

Yes, please use just one abstraction. @Transaction will initiate a new handle and not necessarily inherit from @JdbiUnitOfWork as there's no concept of a connection propagation across boundaries. This will most certainly be a recipe for non deterministic bugs.

@isopropylcyanide isopropylcyanide self-assigned this Jan 13, 2022
@isopropylcyanide isopropylcyanide added the question Further information is requested label Jan 13, 2022
@isopropylcyanide isopropylcyanide removed the question Further information is requested label Feb 14, 2022
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

No branches or pull requests

2 participants