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

resteasy reactive in legumes #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

resteasy reactive in legumes #18

wants to merge 1 commit into from

Conversation

brunobat
Copy link
Owner

@brunobat brunobat commented Oct 11, 2023

Transform the Legumes service from imperative to reactive stack... Not really sure what to do with the artemis client.

public void remove(final LegumeItem legume) {
manager.remove(legume);
public void removeLegume(final String legumeId) {
find("SELECT h FROM Legume h WHERE h.id=?1", legumeId).firstResult().onItem().transform(legume -> {
Copy link

Choose a reason for hiding this comment

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

Does it have to be select?
Can't you just do "delete from x where x.id = ?!"?

Copy link
Owner Author

@brunobat brunobat Oct 12, 2023

Choose a reason for hiding this comment

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

lol, yeah.🤦🏻‍♂️

@@ -33,68 +33,84 @@ public class LegumeResource implements LegumeApi {
@Inject
MessageSender messageSender;

@Transactional
public Response provision() {
@WithTransaction
Copy link

Choose a reason for hiding this comment

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

Why Panache's @tx instead of plain Jakarta @tx ?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Reactive code requires a different annotation. I got a warning message.

quarkus.datasource.username: sa
quarkus.datasource.password:
quarkus.datasource.jdbc.max-size: 20
#quarkus.datasource.db-kind=h2
Copy link

Choose a reason for hiding this comment

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

Commented out on purpose?

Copy link
Owner Author

Choose a reason for hiding this comment

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

there is no reactive driver support for H2

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.

2 participants