diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index e619ba81ba904..bda02188c0e7e 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -18,7 +18,7 @@
1.0.2.1
1.0.11.4
2.3.0.Final
- 4.6.0.Final
+ 4.6.1.Final
0.33.0
1.0.0
0.4.0
diff --git a/extensions/resteasy-classic/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java b/extensions/resteasy-classic/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java
index 69368a6711e28..2f1bf7e5aabca 100644
--- a/extensions/resteasy-classic/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java
+++ b/extensions/resteasy-classic/rest-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientProcessor.java
@@ -50,7 +50,6 @@
import io.quarkus.arc.BeanDestroyer;
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.arc.deployment.BeanArchiveIndexBuildItem;
-import io.quarkus.arc.deployment.BeanContainerListenerBuildItem;
import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
import io.quarkus.arc.deployment.SyntheticBeanBuildItem.ExtendedBeanConfigurator;
import io.quarkus.arc.processor.BuiltinScope;
@@ -119,12 +118,6 @@ void setupClientBuilder(BuildProducer resources) {
resources.produce(new NativeImageResourceBuildItem("META-INF/services/javax.ws.rs.client.ClientBuilder"));
}
- @Record(ExecutionTime.STATIC_INIT)
- @BuildStep
- BeanContainerListenerBuildItem fixExtension(RestClientRecorder restClientRecorder) {
- return new BeanContainerListenerBuildItem(restClientRecorder.hackAroundExtension());
- }
-
@BuildStep
NativeImageProxyDefinitionBuildItem addProxy() {
return new NativeImageProxyDefinitionBuildItem(ResteasyConfiguration.class.getName());
diff --git a/extensions/resteasy-classic/rest-client/runtime/pom.xml b/extensions/resteasy-classic/rest-client/runtime/pom.xml
index cab37f9ea57de..da3c7868365ce 100644
--- a/extensions/resteasy-classic/rest-client/runtime/pom.xml
+++ b/extensions/resteasy-classic/rest-client/runtime/pom.xml
@@ -40,10 +40,6 @@
jboss-interceptors-api_1.2_spec
-
- org.jboss.resteasy
- resteasy-cdi
-
diff --git a/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/QuarkusRestClientBuilder.java b/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/QuarkusRestClientBuilder.java
index 57dfa99225b55..2ac9de1a25155 100644
--- a/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/QuarkusRestClientBuilder.java
+++ b/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/QuarkusRestClientBuilder.java
@@ -350,7 +350,7 @@ public T build(Class aClass) throws IllegalStateException, RestClientDefi
T proxy = (T) Proxy.newProxyInstance(classLoader, interfaces,
new ProxyInvocationHandler(aClass, actualClient, getLocalProviderInstances(), client, getBeanManager()));
- ClientHeaderProviders.registerForClass(aClass, proxy);
+ ClientHeaderProviders.registerForClass(aClass, proxy, getBeanManager());
return proxy;
}
diff --git a/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java b/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java
index 133f7e3598748..93f61f897b3ba 100644
--- a/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java
+++ b/extensions/resteasy-classic/rest-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java
@@ -1,22 +1,17 @@
package io.quarkus.restclient.runtime;
-import java.lang.reflect.Field;
import java.util.Set;
-import javax.enterprise.inject.spi.CDI;
import javax.ws.rs.RuntimeType;
import org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver;
import org.jboss.resteasy.client.jaxrs.internal.ResteasyClientBuilderImpl;
import org.jboss.resteasy.core.providerfactory.ResteasyProviderFactoryImpl;
import org.jboss.resteasy.microprofile.client.RestClientBuilderImpl;
-import org.jboss.resteasy.microprofile.client.RestClientExtension;
import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
import org.jboss.resteasy.spi.InjectorFactory;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
-import io.quarkus.arc.runtime.BeanContainer;
-import io.quarkus.arc.runtime.BeanContainerListener;
import io.quarkus.runtime.RuntimeValue;
import io.quarkus.runtime.annotations.Recorder;
@@ -25,21 +20,6 @@ public class RestClientRecorder {
public static ResteasyProviderFactory providerFactory;
- public BeanContainerListener hackAroundExtension() {
- return new BeanContainerListener() {
- @Override
- public void created(BeanContainer container) {
- try {
- Field f = RestClientExtension.class.getDeclaredField("manager");
- f.setAccessible(true);
- f.set(null, CDI.current().getBeanManager());
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- };
- }
-
public void setRestClientBuilderResolver() {
RestClientBuilderResolver.setInstance(new BuilderResolver());
}