0 Replies Latest reply on Dec 2, 2006 12:20 PM by Scott Stark

    VirtualFile.finalize, JBMICROCONT-115

    Scott Stark Master

      The current sporadic read errors in jboss5 are due to the VirtualFile.finalize closing any open streams associated with the VirtualFile. This is an invalid ownership notion with the current VirtualFile.openStream implementation as one can have access to streams without holding a reference to the VirtualFile. Since its such a tricky problem to debug, its not a good idea to require a usage policy of keeping a reference to the VirtualFile and using its close method to close all associated streams.

      The finalize method should be removed, and either one keeps a reference to the VirtualFile to use its close, or is responsible for closing any streams one opens.