I've nearly got the DeploymentContext to be invisible.
It is still used in some places, e.g. the testsuite so I've got deprecated methods
that give access to it from the MainDeployer.
Another example is the "hack" in the bootstrap that takes the
classloader of the first deployed, the one for "server/xxx/conf/"
as the classloader to run the bootstrap with.
It is also still used by the ClassLoaderFactory api.
It should just be a matter time to work through where it is still used
and this class can finally be made into an implementation detail
that just consolidates deployment information in one place whereas
others provides facades over the portions relevant for what they are doing.
You can find methods on the [VFS]DeploymentUnit now that should give you
everything you need.
* DeploymentResource[Class]Loader
One part of this change was the re-introduction of what used to be
DeploymentInfo.localCL that was used to load resources during deployment.
This now has an equaivalent from VFSDeploymentUnit.getDeploymentResourceClassLoader().
You cannot use this for classloading but you can use it to load resources.
If you don't need the ClassLoader api (which is quite heavy and has
well known issues in the Sun JDK - e.g. locking/caching)
then just use VFSDeploymentUnit.getDeploymentResourceLoader()
api.
The classloader is actually implemented on top of this.
For simple use cases there is a convience method:
VirtualFile file = VFSDeploymentUnit.getFile(path);
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058834#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...