1 2 Previous Next 19 Replies Latest reply on Oct 20, 2006 6:22 PM by bill.burke Go to original post
      • 15. Re: AbstractDeploymentUnit.getMetaDataFiles()
        starksm64

        This is fixed. See the FileVFSUnitTestCase testClassScanFilesonly and testFilesOnlyJar tests.

        • 16. Re: AbstractDeploymentUnit.getMetaDataFiles()
          starksm64

           

          "bill.burke@jboss.com" wrote:
          "scott.stark@jboss.org" wrote:
          I have always thought jar urls were fundamentally flawed since they never have dealt with nested jars, and mix content with another protocol. Its also not really a protocol issue. I would like jar urls to disappear and whether or not a file was a compressed archive be a detail of the VFS.


          That's great you want to do this, but various SPIs in JavaEE5 require passing valid URLs. I'm running into this problem right now with nested jars within an EAR. PU need to pass in URL of the persistence.xml file but it is fucked up URL:

          jar:file:/.../foo.ear!/ejb.jar/META-INF/persistence.xml

          URL handler tries to open ejb.jar/META-INF/persistence.xml as a JarEntry within foo.ear (which its not obviously)

          Are we going to do:

          vfs:file:/.../foo.ear/ejb.jar/META-INF/persistence.xml?

          Is this something I can work on please as it is blocking me.

          Thanks,

          Bill


          Its something you can work on now that the structural deployer related vfs issues have been done. Instead of going with another nested url syntax, we may want:

          vfs-file:/.../foo.ear/ejb.jar/META-INF/persistence.xml

          so that URL/URI accessors like getPath, getHost, etc. work. They don't work with opaque url syntaxes.



          • 17. Re: AbstractDeploymentUnit.getMetaDataFiles()
            bill.burke

            so, VirtualFile.toURL() will return:

            vfs-file:/.../blah.ear/foo.jar/META-INF/persistence.xml

            cool?

            That's of course if the VFS is file based.

            • 18. Re: AbstractDeploymentUnit.getMetaDataFiles()
              starksm64

              Yes, I think that is what we need to try first. The -file refers to the protocol of the vfs context root. Another reason not to nest urls is that file:/.../foo.ear/ejb.jar/META-INF/persistence.xml is not going to be a valid url unless the ear and jar are unpacked. Let the vfs deal with this.

              • 19. Re: AbstractDeploymentUnit.getMetaDataFiles()
                bill.burke

                 

                "scott.stark@jboss.org" wrote:
                Yes, I think that is what we need to try first. The -file refers to the protocol of the vfs context root. Another reason not to nest urls is that file:/.../foo.ear/ejb.jar/META-INF/persistence.xml is not going to be a valid url unless the ear and jar are unpacked. Let the vfs deal with this.


                I can't believe how easy this was once I figured out how to plug in a URLConnectionHandler. check out containter module:

                org.jboss.net.protocol.vfsfile

                Now I just have to modify the VirtualFile so that a VFS url is regurgitated from VirtualFile.toURL()



                1 2 Previous Next