RE: [JBoss-dev] Fix for bug in AbstractWebContainer

2002-02-12 Thread Matt Humphrey

Ok, I can see handling it via a separate web container classloader.
However, please be aware that NO classloader is handling it currently,
i.e. use of Wars with classes under WEB-INF/classes does not work at
all.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of
Scott M Stark
Sent: Tuesday, February 12, 2002 5:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-dev] Fix for bug in AbstractWebContainer


I think the handling of the WEB-INF/classes at the JBoss class loader
level is dubious and its subject to being ripped out as soon as I take a
close look at it. In general patches are to be submitted through
sourceforge JBoss project.


Scott Stark
Chief Technology Officer
JBoss Group, LLC

- Original Message -
From: "Matt Humphrey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 1:58 PM
Subject: [JBoss-dev] Fix for bug in AbstractWebContainer


> It appears that deployment of WAR files was broken when the new 
> Unified Classloader was implemented. The problem seems to be that a 
> classloader
for
> the WEB-INF/classes directory within the WAR is not created, and 
> instead a classloader for some arbitrary subdirectory of 
> WEB-INF/classes is created. Here is a snippet of the broken code (from
> AbstractWebContainer.parseWEBINFClasses):
>
> File outFile = new File(localCopyDir, 
> di.shortName+".webinf"+File.separator+name);
> outFile.getParentFile().mkdirs();
> if (!uclCreated)
> {
>   DeploymentInfo sub = new 
> DeploymentInfo(outFile.getParentFile().toURL(), di);
>   // There is no copying over, just use the url for the UCL
>   sub.localUrl = sub.url;
>
>   // Create a URL for the sub
>   sub.createClassLoaders();
>   uclCreated = true;
>   di.subDeployments.add(sub);
> }
>
> For example, if the first file under WEB-INF/classes it finds is 
> WEB-INF/classes/org/blah/foo.class, it will create a sub-deployment 
> (and hence a classloader) for WEB-INF/classes/org/blah/ when what we 
> really wanted was a sub-deployment for WEB-INF/classes/. Here is my 
> fix:
>
> File outFile = new File(localCopyDir, 
> di.shortName+".webinf"+File.separator+name);
>
> outFile.getParentFile().mkdirs();
>
> if (!uclCreated)
> {
> // ** NEW CODE
>   File classesFile = new File(localCopyDir, 
> di.shortName+".webinf"+File.separator+"WEB-INF"+File.separator+"classe
> s");
>
>   DeploymentInfo sub = new DeploymentInfo(classesFile.toURL(), 
> di); // ** END NEW CODE
>
>   // There is no copying over, just use the url for the UCL
>   sub.localUrl = sub.url;
>
>   // Create a URL for the sub
>   sub.createClassLoaders();
>
>   uclCreated = true;
>
>   di.subDeployments.add(sub);
> }
>
> I apologize if I am not submitting this fix in the correct format; I 
> am
new
> to open source development.
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> ___
> Jboss-development mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Fix for bug in AbstractWebContainer

2002-02-12 Thread Scott M Stark

I think the handling of the WEB-INF/classes at the JBoss class loader
level is dubious and its subject to being ripped out as soon as I
take a close look at it. In general patches are to be submitted through
sourceforge JBoss project.


Scott Stark
Chief Technology Officer
JBoss Group, LLC

- Original Message -
From: "Matt Humphrey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 1:58 PM
Subject: [JBoss-dev] Fix for bug in AbstractWebContainer


> It appears that deployment of WAR files was broken when the new Unified
> Classloader was implemented. The problem seems to be that a classloader
for
> the WEB-INF/classes directory within the WAR is not created, and instead a
> classloader for some arbitrary subdirectory of WEB-INF/classes is created.
> Here is a snippet of the broken code (from
> AbstractWebContainer.parseWEBINFClasses):
>
> File outFile = new File(localCopyDir,
> di.shortName+".webinf"+File.separator+name);
> outFile.getParentFile().mkdirs();
> if (!uclCreated)
> {
>   DeploymentInfo sub = new
> DeploymentInfo(outFile.getParentFile().toURL(), di);
>   // There is no copying over, just use the url for the UCL
>   sub.localUrl = sub.url;
>
>   // Create a URL for the sub
>   sub.createClassLoaders();
>   uclCreated = true;
>   di.subDeployments.add(sub);
> }
>
> For example, if the first file under WEB-INF/classes it finds is
> WEB-INF/classes/org/blah/foo.class, it will create a sub-deployment (and
> hence a classloader) for WEB-INF/classes/org/blah/ when what we really
> wanted was a sub-deployment for WEB-INF/classes/. Here is my fix:
>
> File outFile = new File(localCopyDir,
> di.shortName+".webinf"+File.separator+name);
>
> outFile.getParentFile().mkdirs();
>
> if (!uclCreated)
> {
> // ** NEW CODE
>   File classesFile = new File(localCopyDir,
> di.shortName+".webinf"+File.separator+"WEB-INF"+File.separator+"classes");
>
>   DeploymentInfo sub = new DeploymentInfo(classesFile.toURL(), di);
> // ** END NEW CODE
>
>   // There is no copying over, just use the url for the UCL
>   sub.localUrl = sub.url;
>
>   // Create a URL for the sub
>   sub.createClassLoaders();
>
>   uclCreated = true;
>
>   di.subDeployments.add(sub);
> }
>
> I apologize if I am not submitting this fix in the correct format; I am
new
> to open source development.
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development