"anil.saldhana(a)jboss.com" wrote : This is because I got the policy working for
the vfs urls and now the mc releases have switched to real urls.
|
You can do something like this:
| import org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule;
| import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
| import org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy;
| import org.jboss.deployers.plugins.classloading.AbstractClassLoaderDescribeDeployer;
| import org.jboss.deployers.spi.DeploymentException;
| import org.jboss.deployers.structure.spi.DeploymentUnit;
| import
org.jboss.deployers.vfs.plugins.classloader.VFSDeploymentClassLoaderPolicyModule;
|
| /**
| * VFSClassLoaderDescribeDeployer that exposes realURL flag in
VFSDeploymentClassLoaderPolicyModule.
| *
| * @author ales.justin(a)jboss.org
| */
| public class VFSClassLoaderDescribeDeployer extends
AbstractClassLoaderDescribeDeployer
| {
| /**
| * The useRealURL flag.
| */
| private boolean useRealURL;
|
| protected ClassLoaderPolicyModule createModule(DeploymentUnit unit,
ClassLoadingMetaData classLoadingMetaData) throws DeploymentException
| {
| return new UseRealFlagVFSDeploymentClassLoaderPolicyModule(unit);
| }
|
| private class UseRealFlagVFSDeploymentClassLoaderPolicyModule extends
VFSDeploymentClassLoaderPolicyModule
| {
| private UseRealFlagVFSDeploymentClassLoaderPolicyModule(DeploymentUnit
deploymentUnit)
| {
| super(deploymentUnit);
| }
|
| @Override
| protected VFSClassLoaderPolicy determinePolicy()
| {
| VFSClassLoaderPolicy policy = super.determinePolicy();
| policy.setUseRealURL(useRealURL);
| return policy;
| }
| }
|
| /**
| * Set use real url flag.
| *
| * @param useRealURL the real url flag
| */
| public void setUseRealURL(boolean useRealURL)
| {
| this.useRealURL = useRealURL;
| }
| }
|
And change the existing VFSClassLoaderDescribeDeployer in deployers.xml.
Just make sure you add this class where deployers.xml classpath points to.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193038#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...