Skip to content

Commit

Permalink
Merge pull request #1174 from rsvoboda/kafka-panache-reactive.context…
Browse files Browse the repository at this point in the history
….prop.fix

Add @ActivateRequestContext to start a request scope explicitly
  • Loading branch information
rsvoboda committed Sep 13, 2022
2 parents f6acff6 + a51d7c9 commit d8b2788
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

import io.quarkus.hibernate.reactive.panache.Panache;
import io.smallrye.mutiny.Uni;
import io.smallrye.reactive.messaging.annotations.Blocking;
import org.eclipse.microprofile.reactive.messaging.Incoming;

import javax.enterprise.context.ApplicationScoped;
import javax.transaction.Transactional;
import javax.enterprise.context.control.ActivateRequestContext;

@ApplicationScoped
public class PriceStorage {

@Incoming("prices")
@ActivateRequestContext
Uni<Void> store(int priceInUsd) {
Price price = new Price();
price.value = priceInUsd;
Expand Down

0 comments on commit d8b2788

Please sign in to comment.