[jboss-dev-forums] [Design of POJO Server] - Re: Classloader problem with NamingRestartUnitTestCase
adrian@jboss.org
do-not-reply at jboss.com
Tue Feb 5 14:24:21 EST 2008
The ClassAdapter is retrieved during this processing in AbstractKernelConfigurator
| public BeanInfo getBeanInfo(BeanMetaData metaData) throws Throwable
| {
| ClassLoader cl = Configurator.getClassLoader(metaData);
| String className = metaData.getBean();
| if (className == null)
| return null;
| return getBeanInfo(className, cl);
| }
|
The links are:
BeanInfo -> ClassAdapter -> ClassInfo -> Class
The AnnotatedElement is just the real Class.
The Configurator.getClassLoader(...) uses the thread context classloader
to load the class if there isn't a specific one configured (which in your case
there isn't - that comes with the next gen of the MC :-).
So it looks like there are three options for why it fails.
1) The TCL is wrong. e.g. something is setting the TCL on the RMI thread
and not resetting it.
2) Somehow it is able to lookup the old class in the old classloader
without getting an error
3) There is some bad caching going on somewhere
(the BeanInfo/ClassInfo caches are based on classloader so (1) would
also appear as this problem).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126722#4126722
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126722
More information about the jboss-dev-forums
mailing list