|
@@ -16,9 +16,7 @@ import org.hibernate.reactive.mutiny.Mutiny;
|
|
|
|
|
|
import io.quarkus.benchmark.model.World;
|
|
import io.quarkus.benchmark.model.World;
|
|
import io.quarkus.benchmark.repository.WorldRepository;
|
|
import io.quarkus.benchmark.repository.WorldRepository;
|
|
-import io.smallrye.context.api.CurrentThreadContext;
|
|
|
|
import io.smallrye.mutiny.Uni;
|
|
import io.smallrye.mutiny.Uni;
|
|
-import org.eclipse.microprofile.context.ThreadContext;
|
|
|
|
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
@Path("/")
|
|
@Path("/")
|
|
@@ -29,14 +27,12 @@ public class DbResource {
|
|
|
|
|
|
@GET
|
|
@GET
|
|
@Path("db")
|
|
@Path("db")
|
|
- @CurrentThreadContext(propagated = {}, cleared = {}, unchanged = ThreadContext.ALL_REMAINING)
|
|
|
|
public Uni<World> db() {
|
|
public Uni<World> db() {
|
|
return worldRepository.findStateless();
|
|
return worldRepository.findStateless();
|
|
}
|
|
}
|
|
|
|
|
|
@GET
|
|
@GET
|
|
@Path("queries")
|
|
@Path("queries")
|
|
- @CurrentThreadContext(propagated = {}, cleared = {}, unchanged = ThreadContext.ALL_REMAINING)
|
|
|
|
public Uni<List<World>> queries(@QueryParam("queries") String queries) {
|
|
public Uni<List<World>> queries(@QueryParam("queries") String queries) {
|
|
final int queryCount = parseQueryCount(queries);
|
|
final int queryCount = parseQueryCount(queries);
|
|
return worldRepository.findStateless(queryCount);
|
|
return worldRepository.findStateless(queryCount);
|
|
@@ -44,7 +40,6 @@ public class DbResource {
|
|
|
|
|
|
@GET
|
|
@GET
|
|
@Path("createData")
|
|
@Path("createData")
|
|
- @CurrentThreadContext(propagated = {}, cleared = {}, unchanged = ThreadContext.ALL_REMAINING)
|
|
|
|
public Uni<Void> createData() {
|
|
public Uni<Void> createData() {
|
|
return worldRepository.createData();
|
|
return worldRepository.createData();
|
|
}
|
|
}
|
|
@@ -55,7 +50,6 @@ public class DbResource {
|
|
|
|
|
|
@GET
|
|
@GET
|
|
@Path("updates")
|
|
@Path("updates")
|
|
- @CurrentThreadContext(propagated = {}, cleared = {}, unchanged = ThreadContext.ALL_REMAINING)
|
|
|
|
public Uni<List<World>> updates(@QueryParam("queries") String queries) {
|
|
public Uni<List<World>> updates(@QueryParam("queries") String queries) {
|
|
return worldRepository.inSession(session -> {
|
|
return worldRepository.inSession(session -> {
|
|
|
|
|