smolnar82 commented on code in PR #826: URL: https://github.com/apache/knox/pull/826#discussion_r1473933619
########## gateway-server/src/main/java/org/apache/knox/gateway/services/factory/TokenStateServiceFactory.java: ########## @@ -61,17 +62,32 @@ protected Service createService(GatewayServices gatewayServices, ServiceType ser service.init(gatewayConfig, options); } catch (ServiceLifecycleException e) { LOG.errorInitializingService(implementation, e.getMessage(), e); - service = new AliasBasedTokenStateService(); - ((AliasBasedTokenStateService) service).setAliasService(getAliasService(gatewayServices)); + service = useDerbyDatabaseTokenStateService(gatewayServices, gatewayConfig, options); } + } else if (matchesImplementation(implementation, DerbyDBTokenStateService.class, true)) { Review Comment: The service loader approach is already in use by `org.apache.knox.gateway.services.GatewayServiceFactory`. Thus, if someone wants to add their own implementation without contributing here, in the Knox project, they can do that by overriding the existing `TokenStateServiceFactory` and having that custom factory inserted into the `org.apache.knox.gateway.services.ServiceFactory` file within their custom JAR. However, I see that's a different discussion we should start in Knox's DEV e-mail list. As of now, all service implementations work that way and I would rather not do this work in the scope of this JIRA. Any objection? -- 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: dev-unsubscr...@knox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org