-
1. Jboss 5.1.0.GA this.getClass().getResource() issue
mahdiiran Feb 28, 2011 12:53 AM (in response to mahdiiran)Dear All
I change this.getClass().getResource() with Thread.currentThread().getContextClassLoader().getResource() but the problem already exist !!! ???
ANY HELP!
-
2. Jboss 5.1.0.GA this.getClass().getResource() issue
alesj Feb 28, 2011 5:40 AM (in response to mahdiiran)JBoss' ClassLoading has always had this feature / notion of sharing resources across non-isolated deployments inside same classloading domain.
Unless you isolate your deployment, one can access any resource from your deployment, if both are in the same CL domain.
Same goes the other way around.
Read more about it here:
* http://java.dzone.com/articles/jboss-microcontainer-classloading
-
3. Re: Jboss 5.1.0.GA this.getClass().getResource() issue
mahdiiran Mar 5, 2011 1:09 AM (in response to alesj)Very thanks for your reply
I follow your enclosed URL and add some changes to default class loader behavior
I add the jboss-classloading.xml whit the following content
<classloading xmlns="urn:jboss:classloading:1.0"
domain="IsolatedWithParentDomain"
parent-domain="DefaultDomain"
top-level-classloader="true"
export-all="NON_EMPTY"
import-all="true"
parent-first="false">
</classloading>
After that I received some ClassCastException related to some duplicated jars like jaxb xmlxcerser jpa and etc
I fix all Jar conflicts and now my problem solved.
very thanks.