[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: vfsmemory url problem
alesj
do-not-reply at jboss.com
Wed Aug 20 05:09:34 EDT 2008
I think the real problem is in InMemoryClassesDeployer.
It's the way we create classes VirtualFile.
| public void deploy(VFSDeploymentUnit unit) throws DeploymentException
| {
| try
| {
| URL dynamicClassRoot = new URL("vfsmemory", new GUID().toString(), "");
| MemoryFileFactory.createRoot(dynamicClassRoot);
| URL classesURL = new URL(dynamicClassRoot, "classes");
| VirtualFile classes = MemoryFileFactory.createDirectory(classesURL);
| unit.addAttachment(DYNAMIC_CLASS_URL_KEY, dynamicClassRoot);
| unit.addAttachment(DYNAMIC_CLASS_KEY, classes);
| unit.prependClassPath(classes);
| log.debug("Dynamic class root for " + unit.getName() + " is " + dynamicClassRoot);
|
It should be a root.
Otherwise I don't see how we can handle VFS::getRoot call on
a vfs's in-memory url that's not a root - as in our case.
We could create new vfs in-memory context for a given non-root url,
but that would mean memory leakage, since we would have no handle
to delete that context from memory.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171442#4171442
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171442
More information about the jboss-dev-forums
mailing list