singhpk234 commented on code in PR #1482:
URL: https://github.com/apache/polaris/pull/1482#discussion_r2067521323


##########
quarkus/admin/src/main/java/org/apache/polaris/admintool/config/QuarkusProducers.java:
##########
@@ -76,4 +83,11 @@ public PolarisConfigurationStore configurationStore() {
     // A configuration store is not required when running the admin tool.
     return new PolarisConfigurationStore() {};
   }
+
+  @Produces
+  public DatasourceSupplier datasourceSupplier(
+      @Any RelationalJdbcConfiguration relationalJdbcConfiguration,
+      @All List<InstanceHandle<DataSource>> datasources) {
+    return new QuarkusDatasourceSupplier(relationalJdbcConfiguration, 
datasources);

Review Comment:
   I tried it but it didn't worked for me, here is what i did 
   
   - remove the code from producer to make this class object 
   - made the constructor of QuarkusDatasourceSupplier injectable 
   ```
     @Inject
     public QuarkusDatasourceSupplier(
         RelationalJdbcConfiguration relationalJdbcConfiguration,
         List<InstanceHandle<DataSource>> dataSources) {
       this.relationalJdbcConfiguration = relationalJdbcConfiguration;
       this.dataSources = dataSources;
     }
   ```
   
   It failed complaining 
   
   ```
   Caused by: jakarta.enterprise.inject.UnsatisfiedResolutionException: 
Unsatisfied dependency for type 
org.apache.polaris.extension.persistence.relational.jdbc.DatasourceSupplier and 
qualifiers [@Default]
        - injection target: 
org.apache.polaris.extension.persistence.relational.jdbc.JdbcMetaStoreManagerFactory#jdbcDatasource
        - declared on CLASS bean 
[types=[org.apache.polaris.extension.persistence.relational.jdbc.JdbcMetaStoreManagerFactory,
 java.lang.Object, 
org.apache.polaris.core.persistence.MetaStoreManagerFactory], 
qualifiers=[@Identifier("relational-jdbc"), @Any], 
target=org.apache.polaris.extension.persistence.relational.jdbc.JdbcMetaStoreManagerFactory]
        at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:547)
        at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:689)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:323)
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to