"alesj" wrote : 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.
|
This would do the trick
| public void deploy(VFSDeploymentUnit unit) throws DeploymentException
| {
| try
| {
| URL dynamicClassRoot = new URL("vfsmemory", new GUID() +
"/classes", "");
| VirtualFile classes =
MemoryFileFactory.createRoot(dynamicClassRoot).getRoot();
| 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);
|
Dunno why would we want to have classes as a child to guid root?
The only thing that I see useful is that we might group different
in-memory deployment's contents under the same guid 'group' root.
e.g. currently we have 'classes', we might have some other grouping notion
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171450#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...