[jboss-dev-forums] [Deployers on JBoss (Deployers/JBoss)] - Re: HOWTO deploy webapp dynamically
adrian@jboss.org
do-not-reply at jboss.com
Tue Feb 26 08:10:08 EST 2008
"thomas.diesler at jboss.com" wrote : I read http://labs.jboss.com/file-access/default/members/jbossmc/freezone/docs/2.0.x/userGuide/pt04.html
| Is there anywhere else this is documented?
|
| How do I set the deployments class path?
| I cant do
|
|
| | // There is one top level deployment
| | ContextInfo context = factory.addContext(unit, "");
| | context.addClassPathEntry(entry);
| |
|
I don't know if the non-VFS stuff is documentated?
There's certainly lots of examples in the testsuite.
The user guide just tells people how to do normal things. ;-)
You certainly can't add a classpath entry if you don't a virtual file system
to back your deployment. It doesn't mean anything.
anonymous wrote :
| In my case, the deployment should use the context class loader of the calling component.
|
You can override how the classloader gets "constructed" with an attachment
(the ClassLoaderFactory)
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/trunk/deployers-spi/src/main/org/jboss/deployers/spi/deployer/helpers/AbstractClassLoaderDeployer.java?revision=69940&view=markup
which tells the classloader deployer to not use it's own mechanism
but to use the attached factory.
Although I don't like this mechanism and I'm currently reworking it
with proper classloader metadata including dependencies.
e.g. So for now, you could write a ClassLoaderFactory
that just returns a preset classloader.
It should be obvious why this is bad, since you're going to leak that classloader
unless you have tight control on when the thing gets undeployed
(either the original deployment or the deployment you are constructing).
Using the ClassLoaderFactory side steps the dependency checks/rules.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132159#4132159
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132159
More information about the jboss-dev-forums
mailing list