[Deployers on JBoss (Deployers/JBoss)] - Re: HOWTO deploy webapp dynamically
by adrian@jboss.org
The relevant code is in the ServiceDeployer:
| public void deploy(DeploymentUnit unit, ServiceMetaData deployment) throws DeploymentException
| {
| ObjectName name = deployment.getObjectName();
| try
| {
| ObjectName loaderName = deployment.getClassLoaderName();
| if (loaderName == null)
| {
| ClassLoader cl = unit.getClassLoader();
| if (cl != null && cl instanceof RepositoryClassLoader)
| loaderName = ((RepositoryClassLoader) cl).getObjectName();
| // TODO add to RealClassLoader
| else if (cl != null && cl instanceof RealClassLoader)
| loaderName = ((RealClassLoader) cl).getObjectName();
| else
| loaderName = defaultClassLoader;
| }
|
I'd guess the actual classloader Thomas is passing in, is not a RealClassLoader
(but it probably has one as a parent) so this code should loop through
ClassLoader::getParent() until it finds one that is, before trying to use
"defaultClassLoader" which doesn't look like it is even configured.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132644#4132644
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132644
17 years