[ 
https://issues.apache.org/jira/browse/KNOX-2395?focusedWorklogId=456627&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-456627
 ]

ASF GitHub Bot logged work on KNOX-2395:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Jul/20 13:57
            Start Date: 09/Jul/20 13:57
    Worklog Time Spent: 10m 
      Work Description: pzampino commented on a change in pull request #358:
URL: https://github.com/apache/knox/pull/358#discussion_r452234789



##########
File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/factory/AliasServiceFactory.java
##########
@@ -44,22 +41,17 @@ public Service create(GatewayServices gatewayServices, 
ServiceType serviceType,
       final AliasService defaultAliasService = new DefaultAliasService();
       ((DefaultAliasService) 
defaultAliasService).setMasterService(getMasterService(gatewayServices));
       ((DefaultAliasService) 
defaultAliasService).setKeystoreService(getKeystoreService(gatewayServices));
-      defaultAliasService.init(gatewayConfig, options); //invoking init on 
DefaultAliasService twice is ok (in case implementation is set to 'default')
-      switch (implementation) {
-      case DEFAULT_IMPLEMENTATION_NAME:
-      case "":
+      defaultAliasService.init(gatewayConfig, options); // invoking init on 
DefaultAliasService twice is ok (in case implementation is set to 'default')
+
+      if (matchesImplementation(implementation, DefaultAliasService.class, 
true)) {

Review comment:
       Why is the DefaultAliasService always created and initialized?
   Could this not be done only when there is no implementation, or if the 
specified implementation is the default one?

##########
File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/factory/RemoteRegistryClientServiceFactory.java
##########
@@ -26,20 +26,26 @@
 import org.apache.knox.gateway.services.ServiceLifecycleException;
 import org.apache.knox.gateway.services.ServiceType;
 import 
org.apache.knox.gateway.services.config.client.RemoteConfigurationRegistryClientService;
+import org.apache.knox.gateway.services.security.AliasService;
 
 // There are two implementations of 'RemoteConfigurationRegistryClientService':
 // - LocalFileSystemRemoteConfigurationRegistryClientService
 // - CuratorClientService
 // However, the first one - local - is for test-only purposes
 public class RemoteRegistryClientServiceFactory extends AbstractServiceFactory 
{
 
+  private final AliasServiceFactory aliasServiceFactory = new 
AliasServiceFactory();
+
   @Override
   public Service create(GatewayServices gatewayServices, ServiceType 
serviceType, GatewayConfig gatewayConfig, Map<String, String> options, String 
implementation)

Review comment:
       Can this implementation not be overridden?




----------------------------------------------------------------
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.

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 456627)
    Time Spent: 1h 10m  (was: 1h)

> Make Gateway Services Pluggable
> -------------------------------
>
>                 Key: KNOX-2395
>                 URL: https://issues.apache.org/jira/browse/KNOX-2395
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>    Affects Versions: 1.4.0
>            Reporter: Philip Zampino
>            Assignee: Sandor Molnar
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> For at least some gateway services, it would be useful to provide the ability 
> to choose an implementation without requiring a code change (as it is today).
> Either DefaultGatewayServices should reference gateway-site configuration for 
> default implementation overrides, OR the default implementations of the 
> affected services should do the same.
> Being able to effect behavior through config in this way will make Knox more 
> pluggable, not merely extensible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to