[ 
https://issues.apache.org/jira/browse/KNOX-1789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775293#comment-16775293
 ] 

Kevin Risden commented on KNOX-1789:
------------------------------------

Found some sticky interconnections between AliasService and 
DefaultTokenAuthorityService.

Currently the DefaultTokenAuthorityService assumes that the AliasService is 
started before calling its init method. Since AliasService is also a service, 
it doesn't make sense that it would be started.

However, DefaultGatewayServices in its init method calls the AliasService start 
method. This is unique only to the AliasService. The aliasservice start method 
is actually called twice once in DefaultGatewayServices init and once in 
DefaultGatewayServices start. This can cause issues since there is no guarantee 
that start doesn't have side effects.

Found this while trying to split out the Zookeeper remote alias implementation 
and the start method being called twice will create two listeners on Zookeeper. 
Once one will be cleaned up at the end.

> Refactor RemoteAliasService to use service loading
> --------------------------------------------------
>
>                 Key: KNOX-1789
>                 URL: https://issues.apache.org/jira/browse/KNOX-1789
>             Project: Apache Knox
>          Issue Type: Improvement
>            Reporter: Kevin Risden
>            Assignee: Kevin Risden
>            Priority: Major
>             Fix For: 1.3.0
>
>
> Currently RemoteAliasService is setup to only have a Zookeeper 
> implementation. It would be better to make this generic with service loading 
> and configuration. This would allow plugging in different Remote alias 
> implementations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to