mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Work started] (SSHD-841) Use Nio2ServiceFactoryFactory as the hardwired default if no other found or explicitly set
Date Fri, 24 Aug 2018 15:44:00 GMT

     [ https://issues.apache.org/jira/browse/SSHD-841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Work on SSHD-841 started by Goldstein Lyor.
-------------------------------------------
> Use Nio2ServiceFactoryFactory as the hardwired default if no other found or explicitly
set
> ------------------------------------------------------------------------------------------
>
>                 Key: SSHD-841
>                 URL: https://issues.apache.org/jira/browse/SSHD-841
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Goldstein Lyor
>            Assignee: Goldstein Lyor
>            Priority: Major
>
> The current code uses {{ServiceLoader#load}} mechanism to detect any 3rd party provided
{{IoServiceFactoryFactory}}-ies. However, since {{Nio2ServiceFactoryFactory}} is always present
in the {{sshd-core}}, it is always picked up along with any others that the user may have
placed in the classpath. Furthermore, the service loading mechanism makes no guarantees as
to the order in which registered services are scanned. Since the mechanism that instantiates
the factory uses the "first" detected factory it is pretty much useless - unless the user
configures the {{org.apache.sshd.common.io.IoServiceFactoryFactory}} system property.
> The correct flow should be:
> * Consult {{org.apache.sshd.common.io.IoServiceFactoryFactory}} system property
> * If no specific factory specified - scan the service loaders
> * If *exactly* one found then use it - fail if multiple ones registered
> * Otherwise use {{Nio2ServiceFactoryFactory}} 



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

Mime
View raw message