Customised classloading mechanism[1] was introduced to AS during it's 5.1.0
release, for AS 6.0.0 we are planning to improve this support by adding
resource loading customisations as well.

Why need resource management ?

1.) New JavaEE-WP runtime is required  to have number of configuration
files on Carbon environment, basically to load SPs and extensions belong to
frameworks such as OWB, MyFaces etc. but loading these SPs/extensions under
other runtimes will cause problems. To support both worlds we need to
control resource loading in such way that those resources only visible to
"Javaee" CRE but not for others.

2.) If we recall our original issue with CXF/Spring with AS 5.0.X
versions[2] , the root cause was we can't have multiple (incompatible) CXF
versions within our Carbon environment because CXF's bus extension
discovery mechanism collect and load extensions from multiple versions of
CXF bundles. We get rid of this issue by moving CXF dependencies out of
Carbon environment and introducing runtime concept. But still if a user
brings back some incompatible CXF/Spring dependencies to Carbon environment
above issue will appear again. Also note that CXF is just an one example
only, by controlling resource loading we can solve this kind of issues
easily.

3.) Also note that during early stage of Carbon 4.3.0 release we had to
customise resource loading up to some extend to solve JSP rendering issue
mentioned here[3].


Solution ?

Introduce a new element called "DelegatedResources" under
"DelegatedEnvironment" element to control resource loading.

Example :

<DelegatedEnvironment>
            <Name>Carbon</Name>

            <DelegatedPackages>

*,!org.springframework.*,!org.apache.webbeans.*,!org.apache.xbean.*,!org.apache.myfaces.*
            </DelegatedPackages>

          *  <DelegatedResources>*

*,!META-INF/services/org.apache.webbeans.spi.plugins.OpenWebBeansPlugin,!META-INF/openwebbeans/openwebbeans.properties,!META-INF/standard-faces-config.xml
           *</DelegatedResources>*

</DelegatedEnvironment>



[1] - "[Architecture] Customized WebappClassLoader for WSO2 AS"
[2] - "CXF class loading issue was {Re: [IMPORTANT] Bringing up carbon
4.1.0 early to fix urgent AS requirements}"
[3] - [BLOCKER] Not possible to import javax JDK packages from JSP pages.

Thanks !
-- 
Sagara Gunathunga

Senior Technical Lead; WSO2, Inc.;  http://wso2.com
V.P Apache Web Services;    http://ws.apache.org/
Linkedin; http://www.linkedin.com/in/ssagara
Blog ;  http://ssagara.blogspot.com
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to