Code review comment: I think you should be using the variant that creates a new `Closeable` context : `addCloseableContextDataLevel` that you can use in a try-with-resource.

Code before review:
private void dispatch(RoutingContext routingContext, InputStream is, VertxOutput output) {
ManagedContext requestContext = beanContainer.requestContext();
requestContext.activate();
routingContext.remove(QuarkusHttpUser.AUTH_FAILURE_HANDLER);
if (association != null) {
association.setIdentity(QuarkusHttpUser.getSecurityIdentity(routingContext, null));
}
currentVertxRequest.setCurrent(routingContext);
try {
Context ctx = vertx.getOrCreateContext();
HttpServerRequest request = routingContext.request();
ResteasyUriInfo uriInfo = VertxUtil.extractUriInfo(request, rootPath);
ResteasyHttpHeaders headers = VertxUtil.extractHttpHeaders(request);
HttpServerResponse response = request.response();
VertxHttpResponse vertxResponse = new VertxHttpResponse(request, dispatcher.getProviderFactory(),
request.method(), allocator, output, routingContext);
LazyHostSupplier hostSupplier = new LazyHostSupplier(request);
VertxHttpRequest vertxRequest = new VertxHttpRequest(ctx, routingContext, headers, uriInfo, request.rawMethod(),
hostSupplier,
dispatcher.getDispatcher(), vertxResponse, requestContext, executor);
vertxRequest.setInputStream(is);
try {
Map<Class<?>, Object> map = new HashMap<>();
map.put(SecurityContext.class, new QuarkusResteasySecurityContext(request, routingContext));
map.put(RoutingContext.class, routingContext);
ResteasyContext.pushContextDataMap(map);
ContextUtil.pushContext(routingContext);
dispatcher.service(ctx, request, response, vertxRequest, vertxResponse, true);
} catch (Failure e1) {
vertxResponse.setStatus(e1.getErrorCode());
if (e1.isLoggable()) {
log.error(e1);
}
} catch (Throwable ex) {
routingContext.fail(ex);
}
boolean suspended = vertxRequest.getAsyncContext().isSuspended();
boolean requestContextActive = requestContext.isActive();
if (!suspended) {
try {
if (requestContextActive) {
requestContext.terminate();
}
} finally {
try {
vertxResponse.finish();
} catch (IOException e) {
log.debug("IOException writing JAX-RS response", e);
}
}
} else {
requestContext.deactivate();
}
} catch (Throwable t) {
try {
routingContext.fail(t);
} finally {
if (requestContext.isActive()) {
requestContext.terminate();
}
}
}
}

Line under review: ResteasyContext.pushContextDataMap(map);

Code after addressing the review:
private void dispatch(RoutingContext routingContext, InputStream is, VertxOutput output) {
ManagedContext requestContext = beanContainer.requestContext();
requestContext.activate();
routingContext.remove(QuarkusHttpUser.AUTH_FAILURE_HANDLER);
if (association != null) {
association.setIdentity(QuarkusHttpUser.getSecurityIdentity(routingContext, null));
}
currentVertxRequest.setCurrent(routingContext);
try {
Context ctx = vertx.getOrCreateContext();
HttpServerRequest request = routingContext.request();
ResteasyUriInfo uriInfo = VertxUtil.extractUriInfo(request, rootPath);
ResteasyHttpHeaders headers = VertxUtil.extractHttpHeaders(request);
HttpServerResponse response = request.response();
VertxHttpResponse vertxResponse = new VertxHttpResponse(request, dispatcher.getProviderFactory(),
request.method(), allocator, output, routingContext);
LazyHostSupplier hostSupplier = new LazyHostSupplier(request);
VertxHttpRequest vertxRequest = new VertxHttpRequest(ctx, routingContext, headers, uriInfo, request.rawMethod(),
hostSupplier,
dispatcher.getDispatcher(), vertxResponse, requestContext, executor);
vertxRequest.setInputStream(is);
Map<Class<?>, Object> map = new HashMap<>();
map.put(SecurityContext.class, new QuarkusResteasySecurityContext(request, routingContext));
map.put(RoutingContext.class, routingContext);
try (ResteasyContext.CloseableContext restCtx = ResteasyContext.addCloseableContextDataLevel(map)) {
ContextUtil.pushContext(routingContext);
dispatcher.service(ctx, request, response, vertxRequest, vertxResponse, true);
} catch (Failure e1) {
vertxResponse.setStatus(e1.getErrorCode());
if (e1.isLoggable()) {
log.error(e1);
}
} catch (Throwable ex) {
routingContext.fail(ex);
}
boolean suspended = vertxRequest.getAsyncContext().isSuspended();
boolean requestContextActive = requestContext.isActive();
if (!suspended) {
try {
if (requestContextActive) {
requestContext.terminate();
}
} finally {
try {
vertxResponse.finish();
} catch (IOException e) {
log.debug("IOException writing JAX-RS response", e);
}
}
} else {
requestContext.deactivate();
}
} catch (Throwable t) {
try {
routingContext.fail(t);
} finally {
if (requestContext.isActive()) {
requestContext.terminate();
}
}
}
}