You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Alessio Gambi (JIRA)" <ji...@apache.org> on 2013/10/17 15:21:01 UTC

[jira] [Created] (TAP5-2205) Add Exclusion Filters to IOCUtilities

Alessio Gambi created TAP5-2205:
-----------------------------------

             Summary: Add Exclusion Filters to IOCUtilities
                 Key: TAP5-2205
                 URL: https://issues.apache.org/jira/browse/TAP5-2205
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-ioc
    Affects Versions: 5.3.7, 5.4, 5.3.8
            Reporter: Alessio Gambi
            Priority: Minor


IOCUtilities provide the method addDefaultModules(builder) to automatically add all the libraries in the classpath.

However, when modules conflict, a module is broken, the current environment does not match modules's preconditions the application can't be easily started: either each single module but the broken one(s) must be loaded manually or broken service(s) are overridden.

Having the possibility to specify a filter over the modules found in the classpath seems to be a suitable improvement. In this way one can simply invoke IOCUtilities.addDefaultModules(builder, filter); to obtain the needed configuration.

An example to reproduce such a situation:
Create a project that depends only on tapestry-ioc, tapestry-beanvalidator, and other locally provided modules. tapestry-core not included. At startup the application fails because one service inside tapestry-beanvalidator cannot be created. The solution is to NOT include tapestry-beanvalidator as module, but just to keep it as dependency of the project, and then (manually in the local appModule) redefine a subset of its services.
 




--
This message was sent by Atlassian JIRA
(v6.1#6144)