"jason.greene(a)jboss.com" wrote : "alesj" wrote : You can already do
all of these things,
| | most of if just requires proper ClassLoadingMetaData / jboss-classloading.xml
configuration.
| |
|
| AFAICS a deployment can only exclude classes that it contains (excludes) or that it
exports (excludeExport). A deployment could achieve this by defining all the package
requirements for every EE and JBoss API it uses, however this could end up being overly
verbose compared to a simple exclusion. What I am talking about would be something like a
new excludeImport value which would take precedence over any import (either importAll or
via module imports). However, I don't want to add it if this would violate the
intentions of the design, or if you guys think it would be a bad practice.
I don't see a problem with it in principle.
If you add an "exclude import filter" to the ClassLoadingMetaData which gets
copied
into the ClassLoaderPolicy then it would just be a simple piece of code
that goes directly to loadClassLocally() instead of loadClassFromDomain()
when it matches the filter - and the same for resources/packages.
The only thing it would complicate/break would be the consistency checking of the
ClassLoaderSpace. If one of your imports also has something but you always want
to use your local version then there is a potential for ClassCastException, etc.
in cross classloader calls.
However, if you are using this feature then you've already said you don't want
to share, so presumably you've done the analysis?
Such an analysis can get quite complicated.
e.g. the common problem is people putting a different version of the jaxp classes
in WEB-INF/lib which then has knock on effects if for example you want you're
jaxb stuff to use it rather than the version in the JDK and not get ClassCastExceptions.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261031#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...