adutra commented on code in PR #2540:
URL: https://github.com/apache/polaris/pull/2540#discussion_r2395001363
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -169,6 +142,34 @@ public PolarisAuthorizer polarisAuthorizer(RealmConfig
realmConfig) {
return new PolarisAuthorizerImpl(realmConfig);
}
+ @Produces
+ @RequestScoped
+ public ResolverFactory resolverFactory(
+ PolarisDiagnostics diagnostics,
+ RealmContext realmContext,
+ RealmConfig realmConfig,
+ MetaStoreManagerFactory metaStoreManagerFactory,
+ CallContext callContext,
+ PolarisMetaStoreManager polarisMetaStoreManager) {
+ EntityCache entityCache =
+ metaStoreManagerFactory.getOrCreateEntityCache(realmContext,
realmConfig);
+ return (securityContext, referenceCatalogName) ->
+ new Resolver(
+ diagnostics,
+ callContext.getPolarisCallContext(),
+ polarisMetaStoreManager,
+ securityContext,
+ entityCache,
+ referenceCatalogName);
+ }
+
+ @Produces
+ @RequestScoped
+ public ResolutionManifestFactory resolutionManifestFactory(
+ PolarisDiagnostics diagnostics, RealmContext realmContext,
ResolverFactory resolverFactory) {
+ return new ResolutionManifestFactoryImpl(diagnostics, realmContext,
resolverFactory);
Review Comment:
Just a small nit: why do you need this bean to be produced by a producer
method? Wouldn't it be enough to annotate `ResolutionManifestFactoryImpl` with
`@RequestScoped`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]