[jboss-dev-forums] [Design of Embedded JBoss] - Re: Shortcomings of Virtual Archives (in progress)

ALRubinger do-not-reply at jboss.com
Mon Jul 13 12:35:13 EDT 2009


"jason.greene at jboss.com" wrote : There really is no need for the "classes" to appear in VFS. If someone wants to get a stream for a class instance, they would normally  do clazz.getClassLoader().getResource(clazz.getName()) anyway, because there is no guarantee that a class visible to the deployment is actually in the deployment

In some cases, the classes do need to be in the virtual archive.

This has to work the same way a physical deployment would.  In a real JAR, we've got class files.  So the deployment CL picks those up and uses them if the FQN is not already handled by a parent CL.

The only difference in the testing scenario is that the classes *are* all visible to a parent CL (usually the appCL) because the test launcher will put everything on java.class.path.  In this case copying the bytes again within memory is a waste.

However, I could conceivably add classes as resources from elsewhere on the file system, and these are not covered under java.class.path.  In that case, the bytes need to be copied and in memory within the virtual archive.

S,
ALR

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4243333#4243333

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243333



More information about the jboss-dev-forums mailing list