[jboss-jira] [JBoss JIRA] (WFCORE-1160) Definition of capabilities where the service return type is generic.

Darran Lofthouse (JIRA) issues at jboss.org
Wed Nov 25 05:57:00 EST 2015


    [ https://issues.jboss.org/browse/WFCORE-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133683#comment-13133683 ] 

Darran Lofthouse commented on WFCORE-1160:
------------------------------------------

This is reminding me why I did not raise a Jira issue the last time I encountered this problem - what I realised then was the MSC based injection also has exactly the same issue so even if solved at the capability level we still don't have it solved at the service level.

Your last sentence is correct, any solution should cover an arbitrary number of types.

This is actually pulling me back to a point I was at a couple of days ago - maybe it will be easier all round if within the Elytron project I just create a new interface CredentialSecurityFactory which is an extension of SecurityFactory but with the generic type specified as Credential.  From a capabilities perspective and an MSC perspective, strongly typed dependencies and capability resolution will work unhindered.



> Definition of capabilities where the service return type is generic.
> --------------------------------------------------------------------
>
>                 Key: WFCORE-1160
>                 URL: https://issues.jboss.org/browse/WFCORE-1160
>             Project: WildFly Core
>          Issue Type: Enhancement
>          Components: Domain Management
>            Reporter: Darran Lofthouse
>            Assignee: Brian Stansberry
>              Labels: affects_elytron
>
> Within Elytron we have the following interface: -
> {code}
> public interface SecurityFactory<T> {}
> {code}
> It is desirable to define capabilities where the generic type is specified so that as we wire together the various services we can be sure the correct SecurityFactory services are injected in the correct locations.
> As it stands our only option is going to be a runtime check so incorrectly wired SecurityFactory references will only occur late.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list