I have started working on removing the excessive String usage due to creation of too many URLs in the vfs in the https://svn.jboss.org/repos/jbossas/projects/vfs/branches/urlconn-work branch. The current checkpoint changes include:
- The vfsurl and url as the primary key for a VirtualFileHandler has been dropped. Instead there is the URLConnection for the associated VFSContext and a relative path.
- The use of JarFile and JarURLConnection has been dropped. Instead there is a VFSJarFile abstraction that allows for alternate jar file implementations, and this is obtained from the URLConnection.getContent call.
- In working through some testsuite problems, its seems clear to me that the vfsjar notion should be dropped. A jar is not a protocol. Its a content type. A url like:
is a filesystem entity that may or may not include structured files encoded as jars. The StructuredVirtualFileHandler instances along the path should encapsulate this, not the url.
- The current protocol handlers based on VirtualFileURLConnection have a circular relationship to the VirtualFileHandler codebase. There are circular dependencies showing up in calls like URLConnection.getContent and URLConnection.getLastModified. This needs to be cleaned up by having the protocol handlers depend on AbstractURLHandler rather than the VirtualFileHandler. We were pushing url notions into AbstractVirtualFileHandler that should not be there.
- Still need to look at how the vfs protocol and contexts Bill added relate to these issues.
Once I get the testsuite running I'll update this thread. If you have any comments in the meantime post them here.