[jboss-jira] [JBoss JIRA] (WFLY-2539) Avoid adding dependency on batch impl to applications

Cheng Fang (JIRA) jira-events at lists.jboss.org
Tue Nov 19 11:40:05 EST 2013


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

Cheng Fang commented on WFLY-2539:
----------------------------------

11:29:55 - jamezp: Nihility dmlloyd How would the API know which implementation to use if it's not on the CP? Or I guess the better question is how do you get the impl on the CP?
11:30:19 - dmlloyd: the API should look to its own class loader to find the implementation
11:30:53 - dmlloyd: it should only look at the deployment (i.e. TCCL) when there is the possibility of multiple implementations (this is very rare though)
11:31:02 - jamezp: So you add a dependency on the API module.xml then?
11:31:15 - dmlloyd: yes, typically with services="import"
11:32:19 - jamezp: Ah, got it. Just misunderstood. Makes perfect sense. Thanks for the clarification.

11:36:51 - cfang: jamezp: I just checked a few other api modules, found javax/faces, javax/xml/bind, javax/ws/rs all have this type of dependency on impl modules. So I guess we could do the same
                
> Avoid adding dependency on batch impl to applications
> -----------------------------------------------------
>
>                 Key: WFLY-2539
>                 URL: https://issues.jboss.org/browse/WFLY-2539
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: EE
>    Affects Versions: 8.0.0.Beta1
>            Reporter: Cheng Fang
>            Assignee: James Perkins
>
> Ony batch api needs to be added as dependency to all deployed apps.  Batch impl modules should not be exposed to application deployments.
> from IRC discussion on 11/19/2013:
> 10:57:05 - Nihility: […] currently we are stuffing batch implementation details into every module thats bad
> 10:57:29 - Nihility: cfang: jamezp_afk the only deps that a user deployment should have is on APIs
> 10:57:50 - Nihility: cfang: jamezp_afk the APIs then depend on an impl either dynamically or in their module.xml
> 10:58:55 - Nihility: cfang: jamezp_afk its ok to add the APIs to every deployment
> 10:58:55 - dmlloyd: not implementation modules
> 10:59:01 - cfang: Nihility: I recall we did come up with some coarse grained logic to reduce the impact
> 11:01:25 - dmlloyd: cfang, but the point is that the impl modules should not be on any application at all, batch or not
> 11:02:06 - Nihility: cfang: right the rule is basically a propagation rule. The user only sees what it can access, which are APIS, the APIs can see impl classes and thats isolation
> 11:02:33 - Nihility: cfang: its the reason that a user, for example can use their own XML parser
> 11:03:10 - Nihility: cfang: we have some exceptions because third party code isn't always correct
> 11:03:34 - Nihility: cfang: but we should strive for at least our code to be properly isolated. It's not urgent but it has something we need to fix

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jboss-jira mailing list