[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: VFS and directory handling
alesj
do-not-reply at jboss.com
Thu May 29 10:18:41 EDT 2008
"alesj" wrote :
| For NoCopy handling, I can't see any other way then doing either this
|
| | // hack the JPA url
| | VirtualFile root = di.getRootFile();
| | URL url = root.toURL();
| | String urlString = url.toExternalForm();
| | if (urlString.startsWith("vfs"))
| | {
| | // unpack, since that's the only way
| | // to make sure we point to file
| | VirtualFile file = VFSUtils.unpack(root);
| | url = file.toURL();
| | urlString = url.toExternalForm();
| | if (urlString.startsWith("vfs"))
| | url = new URL(urlString.substring(3));
| | }
| | pi.setPersistenceUnitRootUrl(url);
| |
|
This is probably bad as well - calling VFSUtils.unpack after classpath has been set.
Since pushing something to JPA to do some resources lookup, and that this is NOT part of classloader is surely wrong. :-(
Currently I'm out of ideas ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154316#4154316
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154316
More information about the jboss-dev-forums
mailing list