Repository: quarkusio/quarkus
Issue: Cannot inject reactive Pool/PgPool into gRPC Singleton

**Describe the bug**
A null reference is passed while injecting a reactive `Pool` or `PgPool` into any bean annotated with `@Singleton` if extension `quarkus-grpc` is added. Injection of my own Singleton works fine.

This mostly affects injection into a gRPC service implementation as these services only work if annotated with `@Singleton`. Injection into `@ApplicationScoped` keeps working as expected. Injection fails with `@Dependent` as well. I did not try any other.

Injection of an `@ApplicationScoped` bean into `@Singleton` still works, probably since its a Proxy. My understanding is `PgPool` is supposed to be a `Singleton` itself, so there shouldn't be a reason to not be able to inject it into a Singleton.

Injection of `PgPool` into Singleton/Dependent works fine in a regular REST project without `quarkus-grpc`.

Tried the following injection methods:
1. package-private field annotated with `@Inject`
2. constructor with `@Inject`
3. constructor without `@Inject`

**Expected behavior**
We should be able to inject reactive Pool/PgPool in gRPC Singletons.

**Actual behavior**
In a gRPC Singleton, injected Pool/PgPool is null at both construction and runtime.


**To Reproduce**
Steps to reproduce the behavior:
1. Create gRPC service with `quarkus-grpc`, `quarkus-reactive-pg-client`, `quarkus-resteasy`, , `quarkus-resteasy-jackson`, `quarkus-resteasy-mutiny`
2. Add `@Inject Pool pool` to the `@Singleton` extending a gRPC service.
4. In one of the service methods add a Null-Check on `pool` and return an error on null.
3. Launch quarkus
4. Test the method to confirm null.

**Configuration**
```properties
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=test
quarkus.datasource.password=test
quarkus.datasource.reactive.url=postgresql://localhost:5432/test
```

**Environment (please complete the following information):**
  - Output of `uname -a` or `ver`:
```
Darwin REMMACJ5Y8GTFM 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
```
 - Output of `java -version`:
```
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
```
 - Quarkus version or git rev: 1.5.1.Final
 - Build tool (ie. output of `mvnw --version` or `gradlew --version`): 
```
------------------------------------------------------------
Gradle 6.5
------------------------------------------------------------

Build time:   2020-06-02 20:46:21 UTC
Revision:     a27f41e4ae5e8a41ab9b19f8dd6d86d7b384dad4

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.2 (Oracle Corporation 11.0.2+9)
OS:           Mac OS X 10.15.5 x86_64
```

**Additional context**
Installed features: [cdi, grpc-client, grpc-server, mutiny, reactive-pg-client, resteasy-jackson, resteasy-mutiny, vertx]


Changed files:
extensions/reactive-mysql-client/deployment/src/main/java/io/quarkus/reactive/mysql/client/deployment/ReactiveMySQLClientProcessor.java
extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolProducer.java
independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java
extensions/reactive-db2-client/deployment/src/main/java/io/quarkus/reactive/db2/client/deployment/ReactiveDB2ClientProcessor.java
extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolRecorder.java
extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/VertxProcessor.java
extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolProducer.java
extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java
extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolProducer.java
extensions/reactive-pg-client/deployment/src/main/java/io/quarkus/reactive/pg/client/deployment/ReactivePgClientProcessor.java
extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolRecorder.java

diff --git a/extensions/reactive-db2-client/deployment/src/main/java/io/quarkus/reactive/db2/client/deployment/ReactiveDB2ClientProcessor.java b/extensions/reactive-db2-client/deployment/src/main/java/io/quarkus/reactive/db2/client/deployment/ReactiveDB2ClientProcessor.java
index 54f2731db25..ffc823a54c5 100644
--- a/extensions/reactive-db2-client/deployment/src/main/java/io/quarkus/reactive/db2/client/deployment/ReactiveDB2ClientProcessor.java
+++ b/extensions/reactive-db2-client/deployment/src/main/java/io/quarkus/reactive/db2/client/deployment/ReactiveDB2ClientProcessor.java
@@ -1,7 +1,9 @@
 package io.quarkus.reactive.db2.client.deployment;
 
+import javax.inject.Singleton;
+
 import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
-import io.quarkus.arc.deployment.BeanContainerBuildItem;
+import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
 import io.quarkus.datasource.common.runtime.DatabaseKind;
 import io.quarkus.datasource.runtime.DataSourcesBuildTimeConfig;
 import io.quarkus.datasource.runtime.DataSourcesRuntimeConfig;
@@ -23,6 +25,7 @@
 import io.quarkus.smallrye.health.deployment.spi.HealthBuildItem;
 import io.quarkus.vertx.deployment.VertxBuildItem;
 import io.vertx.db2client.DB2Pool;
+import io.vertx.sqlclient.Pool;
 
 class ReactiveDB2ClientProcessor {
 
@@ -38,7 +41,7 @@ ServiceStartBuildItem build(BuildProducer<FeatureBuildItem> feature,
             BuildProducer<VertxPoolBuildItem> vertxPool,
             DB2PoolRecorder recorder,
             VertxBuildItem vertx,
-            BeanContainerBuildItem beanContainer, ShutdownContextBuildItem shutdown,
+            BuildProducer<SyntheticBeanBuildItem> syntheticBeans, ShutdownContextBuildItem shutdown,
             DataSourcesBuildTimeConfig dataSourcesBuildTimeConfig, DataSourcesRuntimeConfig dataSourcesRuntimeConfig,
             DataSourceReactiveBuildTimeConfig dataSourceReactiveBuildTimeConfig,
             DataSourceReactiveRuntimeConfig dataSourceReactiveRuntimeConfig,
@@ -55,11 +58,16 @@ ServiceStartBuildItem build(BuildProducer<FeatureBuildItem> feature,
             return serviceStart;
         }
 
-        RuntimeValue<DB2Pool> db2PoolValue = recorder.configureDB2Pool(vertx.getVertx(), beanContainer.getValue(),
+        RuntimeValue<DB2Pool> db2PoolValue = recorder.configureDB2Pool(vertx.getVertx(),
                 dataSourcesRuntimeConfig, dataSourceReactiveRuntimeConfig, dataSourceReactiveDB2Config,
                 shutdown);
         db2Pool.produce(new DB2PoolBuildItem(db2PoolValue));
 
+        // Synthetic bean for DB2Pool
+        syntheticBeans.produce(SyntheticBeanBuildItem.configure(DB2Pool.class).addType(Pool.class).scope(Singleton.class)
+                .runtimeValue(db2PoolValue)
+                .setRuntimeInit().done());
+
         boolean isDefault = true; // assume always the default pool for now
         vertxPool.produce(new VertxPoolBuildItem(db2PoolValue, DatabaseKind.DB2, isDefault));
 
diff --git a/extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolProducer.java b/extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolProducer.java
index 69f33cee9dd..7b0734a0516 100644
--- a/extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolProducer.java
+++ b/extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolProducer.java
@@ -2,6 +2,7 @@
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
 import javax.inject.Singleton;
 
 import io.vertx.db2client.DB2Pool;
@@ -9,31 +10,15 @@
 @ApplicationScoped
 public class DB2PoolProducer {
 
-    private volatile DB2Pool db2Pool;
-    private io.vertx.mutiny.db2client.DB2Pool mutinyDB2Pool;
-
-    void initialize(DB2Pool db2Pool) {
-        this.db2Pool = db2Pool;
-    }
-
-    /**
-     * @return the <em>bare</em> PostGreSQL Pool instance.
-     */
-    @Singleton
-    @Produces
-    public DB2Pool db2Pool() {
-        return db2Pool;
-    }
+    @Inject
+    DB2Pool db2Pool;
 
     /**
      * @return the <em>mutiny</em> DB2 Pool instance. The instance is created lazily.
      */
     @Singleton
     @Produces
-    public synchronized io.vertx.mutiny.db2client.DB2Pool mutinyDB2Pool() {
-        if (mutinyDB2Pool == null) {
-            mutinyDB2Pool = io.vertx.mutiny.db2client.DB2Pool.newInstance(db2Pool);
-        }
-        return mutinyDB2Pool;
+    public io.vertx.mutiny.db2client.DB2Pool mutinyDB2Pool() {
+        return io.vertx.mutiny.db2client.DB2Pool.newInstance(db2Pool);
     }
 }
diff --git a/extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolRecorder.java b/extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolRecorder.java
index c26b5dd0ef7..d0f97ba3818 100644
--- a/extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolRecorder.java
+++ b/extensions/reactive-db2-client/runtime/src/main/java/io/quarkus/reactive/db2/client/runtime/DB2PoolRecorder.java
@@ -5,7 +5,6 @@
 
 import java.util.Map;
 
-import io.quarkus.arc.runtime.BeanContainer;
 import io.quarkus.credentials.CredentialsProvider;
 import io.quarkus.credentials.runtime.CredentialsProviderFinder;
 import io.quarkus.datasource.runtime.DataSourceRuntimeConfig;
@@ -22,7 +21,7 @@
 @Recorder
 public class DB2PoolRecorder {
 
-    public RuntimeValue<DB2Pool> configureDB2Pool(RuntimeValue<Vertx> vertx, BeanContainer container,
+    public RuntimeValue<DB2Pool> configureDB2Pool(RuntimeValue<Vertx> vertx,
             DataSourcesRuntimeConfig dataSourcesRuntimeConfig,
             DataSourceReactiveRuntimeConfig dataSourceReactiveRuntimeConfig,
             DataSourceReactiveDB2Config dataSourceReactiveDB2Config,
@@ -32,9 +31,6 @@ public RuntimeValue<DB2Pool> configureDB2Pool(RuntimeValue<Vertx> vertx, BeanCon
                 dataSourceReactiveRuntimeConfig,
                 dataSourceReactiveDB2Config);
 
-        DB2PoolProducer producer = container.instance(DB2PoolProducer.class);
-        producer.initialize(pool);
-
         shutdown.addShutdownTask(pool::close);
         return new RuntimeValue<>(pool);
     }
diff --git a/extensions/reactive-mysql-client/deployment/src/main/java/io/quarkus/reactive/mysql/client/deployment/ReactiveMySQLClientProcessor.java b/extensions/reactive-mysql-client/deployment/src/main/java/io/quarkus/reactive/mysql/client/deployment/ReactiveMySQLClientProcessor.java
index 473fb56c185..ca5c654b0a5 100644
--- a/extensions/reactive-mysql-client/deployment/src/main/java/io/quarkus/reactive/mysql/client/deployment/ReactiveMySQLClientProcessor.java
+++ b/extensions/reactive-mysql-client/deployment/src/main/java/io/quarkus/reactive/mysql/client/deployment/ReactiveMySQLClientProcessor.java
@@ -1,7 +1,9 @@
 package io.quarkus.reactive.mysql.client.deployment;
 
+import javax.inject.Singleton;
+
 import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
-import io.quarkus.arc.deployment.BeanContainerBuildItem;
+import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
 import io.quarkus.datasource.common.runtime.DatabaseKind;
 import io.quarkus.datasource.runtime.DataSourcesBuildTimeConfig;
 import io.quarkus.datasource.runtime.DataSourcesRuntimeConfig;
@@ -26,6 +28,7 @@
 import io.quarkus.smallrye.health.deployment.spi.HealthBuildItem;
 import io.quarkus.vertx.deployment.VertxBuildItem;
 import io.vertx.mysqlclient.MySQLPool;
+import io.vertx.sqlclient.Pool;
 
 @SuppressWarnings("deprecation")
 class ReactiveMySQLClientProcessor {
@@ -42,7 +45,7 @@ ServiceStartBuildItem build(BuildProducer<FeatureBuildItem> feature,
             BuildProducer<VertxPoolBuildItem> vertxPool,
             MySQLPoolRecorder recorder,
             VertxBuildItem vertx,
-            BeanContainerBuildItem beanContainer, ShutdownContextBuildItem shutdown,
+            BuildProducer<SyntheticBeanBuildItem> syntheticBeans, ShutdownContextBuildItem shutdown,
             BuildProducer<ExtensionSslNativeSupportBuildItem> sslNativeSupport,
             DataSourcesBuildTimeConfig dataSourcesBuildTimeConfig, DataSourcesRuntimeConfig dataSourcesRuntimeConfig,
             DataSourceReactiveBuildTimeConfig dataSourceReactiveBuildTimeConfig,
@@ -65,12 +68,17 @@ ServiceStartBuildItem build(BuildProducer<FeatureBuildItem> feature,
 
         boolean isLegacy = !dataSourcesBuildTimeConfig.defaultDataSource.dbKind.isPresent();
 
-        RuntimeValue<MySQLPool> mySqlPool = recorder.configureMySQLPool(vertx.getVertx(), beanContainer.getValue(),
+        RuntimeValue<MySQLPool> mySqlPool = recorder.configureMySQLPool(vertx.getVertx(),
                 dataSourcesRuntimeConfig, dataSourceReactiveRuntimeConfig, dataSourceReactiveMySQLConfig,
                 legacyDataSourcesRuntimeConfig, legacyDataSourceReactiveMySQLConfig, isLegacy,
                 shutdown);
         mysqlPool.produce(new MySQLPoolBuildItem(mySqlPool));
 
+        // Synthetic bean for MySQLPool
+        syntheticBeans.produce(SyntheticBeanBuildItem.configure(MySQLPool.class).addType(Pool.class).scope(Singleton.class)
+                .runtimeValue(mySqlPool)
+                .setRuntimeInit().done());
+
         boolean isDefault = true; // assume always the default pool for now
         vertxPool.produce(new VertxPoolBuildItem(mySqlPool, DatabaseKind.MYSQL, isDefault));
 
diff --git a/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolProducer.java b/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolProducer.java
index f6cda665960..a949a9e8119 100644
--- a/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolProducer.java
+++ b/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolProducer.java
@@ -2,6 +2,7 @@
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
 import javax.inject.Singleton;
 
 import org.jboss.logging.Logger;
@@ -13,44 +14,16 @@ public class MySQLPoolProducer {
 
     private static final Logger LOGGER = Logger.getLogger(MySQLPoolProducer.class);
 
-    private volatile MySQLPool mysqlPool;
-    private io.vertx.mutiny.mysqlclient.MySQLPool mutinyMySQLPool;
-
-    /**
-     * @deprecated The Axle API is deprecated and will be removed in the future, use {@link #mutinyMySQLPool} instead.
-     */
-    @Deprecated
-    private io.vertx.axle.mysqlclient.MySQLPool axleMySQLPool;
-
-    /**
-     * @deprecated The RX API is deprecated and will be removed in the future, use {@link #mutinyMySQLPool} instead.
-     */
-    @Deprecated
-    private io.vertx.reactivex.mysqlclient.MySQLPool rxMySQLPool;
-
-    void initialize(MySQLPool mysqlPool) {
-        this.mysqlPool = mysqlPool;
-    }
-
-    /**
-     * @return the <em>bare</em> MySQL Pool instance.
-     */
-    @Singleton
-    @Produces
-    public MySQLPool mysqlPool() {
-        return mysqlPool;
-    }
+    @Inject
+    MySQLPool mysqlPool;
 
     /**
      * @return the <em>mutiny</em> MySQL Pool instance. The instance is created lazily.
      */
     @Singleton
     @Produces
-    public synchronized io.vertx.mutiny.mysqlclient.MySQLPool mutinyMySQLPool() {
-        if (mutinyMySQLPool == null) {
-            mutinyMySQLPool = io.vertx.mutiny.mysqlclient.MySQLPool.newInstance(mysqlPool);
-        }
-        return mutinyMySQLPool;
+    public io.vertx.mutiny.mysqlclient.MySQLPool mutinyMySQLPool() {
+        return io.vertx.mutiny.mysqlclient.MySQLPool.newInstance(mysqlPool);
     }
 
     /**
@@ -62,14 +35,11 @@ public synchronized io.vertx.mutiny.mysqlclient.MySQLPool mutinyMySQLPool() {
     @Singleton
     @Produces
     @Deprecated
-    public synchronized io.vertx.axle.mysqlclient.MySQLPool axleMySQLPool() {
-        if (axleMySQLPool == null) {
-            LOGGER.warn(
-                    "`io.vertx.axle.mysqlclient.MySQLPool` is deprecated and will be removed in a future version - it is "
-                            + "recommended to switch to `io.vertx.mutiny.mysqlclient.MySQLPool`");
-            axleMySQLPool = io.vertx.axle.mysqlclient.MySQLPool.newInstance(mysqlPool);
-        }
-        return axleMySQLPool;
+    public io.vertx.axle.mysqlclient.MySQLPool axleMySQLPool() {
+        LOGGER.warn(
+                "`io.vertx.axle.mysqlclient.MySQLPool` is deprecated and will be removed in a future version - it is "
+                        + "recommended to switch to `io.vertx.mutiny.mysqlclient.MySQLPool`");
+        return io.vertx.axle.mysqlclient.MySQLPool.newInstance(mysqlPool);
     }
 
     /**
@@ -81,13 +51,10 @@ public synchronized io.vertx.axle.mysqlclient.MySQLPool axleMySQLPool() {
     @Singleton
     @Produces
     @Deprecated
-    public synchronized io.vertx.reactivex.mysqlclient.MySQLPool rxMySQLPool() {
-        if (rxMySQLPool == null) {
-            LOGGER.warn(
-                    "`io.vertx.reactivex.mysqlclient.MySQLPool` is deprecated and will be removed in a future version - it is "
-                            + "recommended to switch to `io.vertx.mutiny.mysqlclient.MySQLPool`");
-            rxMySQLPool = io.vertx.reactivex.mysqlclient.MySQLPool.newInstance(mysqlPool);
-        }
-        return rxMySQLPool;
+    public io.vertx.reactivex.mysqlclient.MySQLPool rxMySQLPool() {
+        LOGGER.warn(
+                "`io.vertx.reactivex.mysqlclient.MySQLPool` is deprecated and will be removed in a future version - it is "
+                        + "recommended to switch to `io.vertx.mutiny.mysqlclient.MySQLPool`");
+        return io.vertx.reactivex.mysqlclient.MySQLPool.newInstance(mysqlPool);
     }
 }
diff --git a/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java b/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java
index 6a16b2c184c..4dcde4001e7 100644
--- a/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java
+++ b/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java
@@ -13,7 +13,6 @@
 
 import org.jboss.logging.Logger;
 
-import io.quarkus.arc.runtime.BeanContainer;
 import io.quarkus.credentials.CredentialsProvider;
 import io.quarkus.credentials.runtime.CredentialsProviderFinder;
 import io.quarkus.datasource.runtime.DataSourceRuntimeConfig;
@@ -35,7 +34,7 @@ public class MySQLPoolRecorder {
 
     private static final Logger log = Logger.getLogger(MySQLPoolRecorder.class);
 
-    public RuntimeValue<MySQLPool> configureMySQLPool(RuntimeValue<Vertx> vertx, BeanContainer container,
+    public RuntimeValue<MySQLPool> configureMySQLPool(RuntimeValue<Vertx> vertx,
             DataSourcesRuntimeConfig dataSourcesRuntimeConfig,
             DataSourceReactiveRuntimeConfig dataSourceReactiveRuntimeConfig,
             DataSourceReactiveMySQLConfig dataSourceReactiveMySQLConfig,
@@ -54,9 +53,6 @@ public RuntimeValue<MySQLPool> configureMySQLPool(RuntimeValue<Vertx> vertx, Bea
                     legacyDataSourcesRuntimeConfig.defaultDataSource, legacyDataSourceReactiveMySQLConfig);
         }
 
-        MySQLPoolProducer producer = container.instance(MySQLPoolProducer.class);
-        producer.initialize(mysqlPool);
-
         shutdown.addShutdownTask(mysqlPool::close);
         return new RuntimeValue<>(mysqlPool);
     }
diff --git a/extensions/reactive-pg-client/deployment/src/main/java/io/quarkus/reactive/pg/client/deployment/ReactivePgClientProcessor.java b/extensions/reactive-pg-client/deployment/src/main/java/io/quarkus/reactive/pg/client/deployment/ReactivePgClientProcessor.java
index 53d48009576..87e4ef71fa5 100644
--- a/extensions/reactive-pg-client/deployment/src/main/java/io/quarkus/reactive/pg/client/deployment/ReactivePgClientProcessor.java
+++ b/extensions/reactive-pg-client/deployment/src/main/java/io/quarkus/reactive/pg/client/deployment/ReactivePgClientProcessor.java
@@ -1,7 +1,9 @@
 package io.quarkus.reactive.pg.client.deployment;
 
+import javax.inject.Singleton;
+
 import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
-import io.quarkus.arc.deployment.BeanContainerBuildItem;
+import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
 import io.quarkus.datasource.common.runtime.DatabaseKind;
 import io.quarkus.datasource.runtime.DataSourcesBuildTimeConfig;
 import io.quarkus.datasource.runtime.DataSourcesRuntimeConfig;
@@ -27,6 +29,7 @@
 import io.quarkus.smallrye.health.deployment.spi.HealthBuildItem;
 import io.quarkus.vertx.deployment.VertxBuildItem;
 import io.vertx.pgclient.PgPool;
+import io.vertx.sqlclient.Pool;
 
 @SuppressWarnings("deprecation")
 class ReactivePgClientProcessor {
@@ -49,7 +52,7 @@ ServiceStartBuildItem build(BuildProducer<FeatureBuildItem> feature,
             BuildProducer<VertxPoolBuildItem> vertxPool,
             PgPoolRecorder recorder,
             VertxBuildItem vertx,
-            BeanContainerBuildItem beanContainer,
+            BuildProducer<SyntheticBeanBuildItem> syntheticBeans,
             ShutdownContextBuildItem shutdown,
             BuildProducer<ExtensionSslNativeSupportBuildItem> sslNativeSupport,
             DataSourcesBuildTimeConfig dataSourcesBuildTimeConfig, DataSourcesRuntimeConfig dataSourcesRuntimeConfig,
@@ -72,12 +75,17 @@ ServiceStartBuildItem build(BuildProducer<FeatureBuildItem> feature,
 
         boolean isLegacy = !dataSourcesBuildTimeConfig.defaultDataSource.dbKind.isPresent();
 
-        RuntimeValue<PgPool> pool = recorder.configurePgPool(vertx.getVertx(), beanContainer.getValue(),
+        RuntimeValue<PgPool> pool = recorder.configurePgPool(vertx.getVertx(),
                 dataSourcesRuntimeConfig, dataSourceReactiveRuntimeConfig, dataSourceReactivePostgreSQLConfig,
                 legacyDataSourcesRuntimeConfig, legacyDataSourceReactivePostgreSQLConfig, isLegacy,
                 shutdown);
         pgPool.produce(new PgPoolBuildItem(pool));
 
+        // Synthetic bean for PgPool
+        syntheticBeans.produce(
+                SyntheticBeanBuildItem.configure(PgPool.class).addType(Pool.class).scope(Singleton.class).runtimeValue(pool)
+                        .setRuntimeInit().done());
+
         boolean isDefault = true; // assume always the default pool for now
         vertxPool.produce(new VertxPoolBuildItem(pool, DatabaseKind.POSTGRESQL, isDefault));
 
diff --git a/extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolProducer.java b/extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolProducer.java
index 35875950bac..c997c62f1c1 100644
--- a/extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolProducer.java
+++ b/extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolProducer.java
@@ -2,6 +2,7 @@
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
 import javax.inject.Singleton;
 
 import org.jboss.logging.Logger;
@@ -13,43 +14,16 @@ public class PgPoolProducer {
 
     private static final Logger LOGGER = Logger.getLogger(PgPoolProducer.class);
 
-    private volatile PgPool pgPool;
-    private io.vertx.mutiny.pgclient.PgPool mutinyPgPool;
-
-    /**
-     * @deprecated The Axle API is deprecated and will be removed in the future, use {@link #mutinyPgPool} instead.
-     */
-    @Deprecated
-    private io.vertx.axle.pgclient.PgPool axlePgPool;
-    /**
-     * @deprecated The RX API is deprecated and will be removed in the future, use {@link #mutinyPgPool} instead.
-     */
-    @Deprecated
-    private io.vertx.reactivex.pgclient.PgPool rxPgPool;
-
-    void initialize(PgPool pgPool) {
-        this.pgPool = pgPool;
-    }
-
-    /**
-     * @return the <em>bare</em> PostGreSQL Pool instance.
-     */
-    @Singleton
-    @Produces
-    public PgPool pgPool() {
-        return pgPool;
-    }
+    @Inject
+    PgPool pgPool;
 
     /**
      * @return the <em>mutiny</em> PostGreSQL Pool instance. The instance is created lazily.
      */
     @Singleton
     @Produces
-    public synchronized io.vertx.mutiny.pgclient.PgPool mutinyPgPool() {
-        if (mutinyPgPool == null) {
-            mutinyPgPool = io.vertx.mutiny.pgclient.PgPool.newInstance(pgPool);
-        }
-        return mutinyPgPool;
+    public io.vertx.mutiny.pgclient.PgPool mutinyPgPool() {
+        return io.vertx.mutiny.pgclient.PgPool.newInstance(pgPool);
     }
 
     /**
@@ -61,14 +35,11 @@ public synchronized io.vertx.mutiny.pgclient.PgPool mutinyPgPool() {
     @Singleton
     @Produces
     @Deprecated
-    public synchronized io.vertx.axle.pgclient.PgPool axlePgPool() {
-        if (axlePgPool == null) {
-            LOGGER.warn(
-                    "` io.vertx.axle.pgclient.PgPool` is deprecated and will be removed in a future version - it is "
-                            + "recommended to switch to `io.vertx.mutiny.pgclient.PgPool`");
-            axlePgPool = io.vertx.axle.pgclient.PgPool.newInstance(pgPool);
-        }
-        return axlePgPool;
+    public io.vertx.axle.pgclient.PgPool axlePgPool() {
+        LOGGER.warn(
+                "`io.vertx.axle.pgclient.PgPool` is deprecated and will be removed in a future version - it is "
+                        + "recommended to switch to `io.vertx.mutiny.pgclient.PgPool`");
+        return io.vertx.axle.pgclient.PgPool.newInstance(pgPool);
     }
 
     /**
@@ -80,13 +51,10 @@ public synchronized io.vertx.axle.pgclient.PgPool axlePgPool() {
     @Singleton
     @Produces
     @Deprecated
-    public synchronized io.vertx.reactivex.pgclient.PgPool rxPgPool() {
-        if (rxPgPool == null) {
-            LOGGER.warn(
-                    "` io.vertx.reactivex.pgclient.PgPool` is deprecated and will be removed in a future version - it is "
-                            + "recommended to switch to `io.vertx.mutiny.pgclient.PgPool`");
-            rxPgPool = io.vertx.reactivex.pgclient.PgPool.newInstance(pgPool);
-        }
-        return rxPgPool;
+    public io.vertx.reactivex.pgclient.PgPool rxPgPool() {
+        LOGGER.warn(
+                "`io.vertx.reactivex.pgclient.PgPool` is deprecated and will be removed in a future version - it is "
+                        + "recommended to switch to `io.vertx.mutiny.pgclient.PgPool`");
+        return io.vertx.reactivex.pgclient.PgPool.newInstance(pgPool);
     }
 }
diff --git a/extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolRecorder.java b/extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolRecorder.java
index 70e6b8a0f9b..7d4e7c5fd8a 100644
--- a/extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolRecorder.java
+++ b/extensions/reactive-pg-client/runtime/src/main/java/io/quarkus/reactive/pg/client/runtime/PgPoolRecorder.java
@@ -13,7 +13,6 @@
 
 import org.jboss.logging.Logger;
 
-import io.quarkus.arc.runtime.BeanContainer;
 import io.quarkus.credentials.CredentialsProvider;
 import io.quarkus.credentials.runtime.CredentialsProviderFinder;
 import io.quarkus.datasource.runtime.DataSourceRuntimeConfig;
@@ -35,7 +34,7 @@ public class PgPoolRecorder {
 
     private static final Logger log = Logger.getLogger(PgPoolRecorder.class);
 
-    public RuntimeValue<PgPool> configurePgPool(RuntimeValue<Vertx> vertx, BeanContainer container,
+    public RuntimeValue<PgPool> configurePgPool(RuntimeValue<Vertx> vertx,
             DataSourcesRuntimeConfig dataSourcesRuntimeConfig,
             DataSourceReactiveRuntimeConfig dataSourceReactiveRuntimeConfig,
             DataSourceReactivePostgreSQLConfig dataSourceReactivePostgreSQLConfig,
@@ -54,9 +53,6 @@ public RuntimeValue<PgPool> configurePgPool(RuntimeValue<Vertx> vertx, BeanConta
                     legacyDataSourcesRuntimeConfig.defaultDataSource, legacyDataSourceReactivePostgreSQLConfig);
         }
 
-        PgPoolProducer producer = container.instance(PgPoolProducer.class);
-        producer.initialize(pgPool);
-
         shutdown.addShutdownTask(pgPool::close);
         return new RuntimeValue<>(pgPool);
     }
diff --git a/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/VertxProcessor.java b/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/VertxProcessor.java
index 1f8f0a0a55f..6d602b3f0ce 100644
--- a/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/VertxProcessor.java
+++ b/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/VertxProcessor.java
@@ -18,12 +18,11 @@
 
 import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
 import io.quarkus.arc.deployment.AnnotationsTransformerBuildItem;
-import io.quarkus.arc.deployment.BeanContainerBuildItem;
+import io.quarkus.arc.deployment.BeanRegistrationPhaseBuildItem;
+import io.quarkus.arc.deployment.BeanRegistrationPhaseBuildItem.BeanConfiguratorBuildItem;
 import io.quarkus.arc.deployment.CustomScopeAnnotationsBuildItem;
 import io.quarkus.arc.deployment.UnremovableBeanBuildItem;
 import io.quarkus.arc.deployment.UnremovableBeanBuildItem.BeanClassAnnotationExclusion;
-import io.quarkus.arc.deployment.ValidationPhaseBuildItem;
-import io.quarkus.arc.deployment.ValidationPhaseBuildItem.ValidationErrorBuildItem;
 import io.quarkus.arc.processor.AnnotationStore;
 import io.quarkus.arc.processor.AnnotationsTransformer;
 import io.quarkus.arc.processor.BeanInfo;
@@ -71,7 +70,7 @@ AdditionalBeanBuildItem registerBean() {
 
     @BuildStep
     @Record(ExecutionTime.RUNTIME_INIT)
-    VertxBuildItem build(CoreVertxBuildItem vertx, VertxRecorder recorder, BeanContainerBuildItem beanContainer,
+    VertxBuildItem build(CoreVertxBuildItem vertx, VertxRecorder recorder,
             List<EventConsumerBusinessMethodItem> messageConsumerBusinessMethods,
             BuildProducer<GeneratedClassBuildItem> generatedClass,
             AnnotationProxyBuildItem annotationProxy, LaunchModeBuildItem launchMode, ShutdownContextBuildItem shutdown,
@@ -108,14 +107,13 @@ public UnremovableBeanBuildItem unremovableBeans() {
     }
 
     @BuildStep
-    void validateBeanDeployment(
-            ValidationPhaseBuildItem validationPhase,
+    void collectEventConsumers(
+            BeanRegistrationPhaseBuildItem beanRegistrationPhase,
             BuildProducer<EventConsumerBusinessMethodItem> messageConsumerBusinessMethods,
-            BuildProducer<ValidationErrorBuildItem> errors) {
-
-        // We need to collect all business methods annotated with @MessageConsumer first
-        AnnotationStore annotationStore = validationPhase.getContext().get(BuildExtension.Key.ANNOTATION_STORE);
-        for (BeanInfo bean : validationPhase.getContext().beans().classBeans()) {
+            BuildProducer<BeanConfiguratorBuildItem> errors) {
+        // We need to collect all business methods annotated with @ConsumeEvent first
+        AnnotationStore annotationStore = beanRegistrationPhase.getContext().get(BuildExtension.Key.ANNOTATION_STORE);
+        for (BeanInfo bean : beanRegistrationPhase.getContext().beans().classBeans()) {
             for (MethodInfo method : bean.getTarget().get().asClass().methods()) {
                 AnnotationInstance consumeEvent = annotationStore.getAnnotation(method, CONSUME_EVENT);
                 if (consumeEvent != null) {
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java
index b62c542e96d..0b9f2097096 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java
@@ -82,7 +82,7 @@ public B read(BeanConfiguratorBase<?, ?> base) {
 
     public B types(Class<?>... types) {
         for (Class<?> type : types) {
-            this.types.add(Type.create(DotName.createSimple(type.getName()), Kind.CLASS));
+            addType(type);
         }
         return self();
     }
@@ -102,6 +102,10 @@ public B addType(Type type) {
         return self();
     }
 
+    public B addType(Class<?> type) {
+        return addType(DotName.createSimple(type.getName()));
+    }
+
     public B addQualifier(Class<? extends Annotation> annotationClass) {
         return addQualifier(DotName.createSimple(annotationClass.getName()));
     }